From 8a726ea1a5ed45908b87d3dc0dd47999938bc207 Mon Sep 17 00:00:00 2001 From: Hunter Garrett Date: Fri, 21 Aug 2026 09:40:25 -0400 Subject: [PATCH 1/7] refactor: extract framework-agnostic core into src/core Co-Authored-By: Claude Fable 5 --- packages/bones/src/core/attributes.ts | 86 +++++++++++++++++++++++++ packages/bones/src/create-bones.ts | 84 +++--------------------- packages/bones/tests/attributes.test.ts | 85 ++++++++++++++++++++++++ 3 files changed, 179 insertions(+), 76 deletions(-) create mode 100644 packages/bones/src/core/attributes.ts create mode 100644 packages/bones/tests/attributes.test.ts diff --git a/packages/bones/src/core/attributes.ts b/packages/bones/src/core/attributes.ts new file mode 100644 index 0000000..9f1d63c --- /dev/null +++ b/packages/bones/src/core/attributes.ts @@ -0,0 +1,86 @@ +export type BoneType = "text" | "block" | "container"; + +// --------------------------------------------------------------------------- +// minMax — variable-length skeleton helper +// +// Returns a descriptor that `boneAttributes("text", { length: minMax(4, 12) })` +// uses to produce a different deterministic width per call index. Ideal inside +// repeat() loops for natural-looking skeleton lists. +// --------------------------------------------------------------------------- + +const MIN_MAX_BRAND = Symbol("minMax"); + +export interface MinMax { + readonly [MIN_MAX_BRAND]: true; + readonly min: number; + readonly max: number; +} + +export function minMax(min: number, max: number): MinMax { + return { [MIN_MAX_BRAND]: true, min, max }; +} + +export function isMinMax(value: unknown): value is MinMax { + return typeof value === "object" && value !== null && MIN_MAX_BRAND in value; +} + +export interface BoneOptions { + length?: number | MinMax; + contained?: boolean; +} + +// --------------------------------------------------------------------------- +// boneAttributes — the framework-agnostic attribute contract +// +// Returns the HTML attributes that mark an element as a skeleton for the CSS +// engine: `data-bone` marks shape, `aria-busy` marks state. Renderers (the +// React adapter in src/react, future custom elements) spread or set these +// on elements. +// --------------------------------------------------------------------------- + +export interface BoneAttributes { + "data-bone": BoneType; + "aria-busy": true; + src?: string; + style?: Record; +} + +export const TRANSPARENT_PIXEL = + "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; + +export function resolveLength( + length: number | MinMax | undefined, + callIndex: number, +): number | undefined { + if (length == null) return undefined; + if (typeof length === "number") return length; + // MinMax: deterministic variation based on call index + const range = length.max - length.min + 1; + return length.min + ((callIndex * 7 + 3) % range); +} + +export function boneAttributes( + type: BoneType, + options?: BoneOptions, + callIndex = 0, +): BoneAttributes { + const attrs: BoneAttributes = { "data-bone": type, "aria-busy": true }; + + if (type === "text") { + const style: Record = {}; + if (options?.contained) { + style["--bone-contained"] = 1; + } + const length = resolveLength(options?.length, callIndex); + if (length) { + style["--bone-length"] = length; + } + if (Object.keys(style).length > 0) attrs.style = style; + } + + if (type === "block") { + attrs.src = TRANSPARENT_PIXEL; + } + + return attrs; +} diff --git a/packages/bones/src/create-bones.ts b/packages/bones/src/create-bones.ts index 5c1a7c7..cd50333 100644 --- a/packages/bones/src/create-bones.ts +++ b/packages/bones/src/create-bones.ts @@ -1,4 +1,11 @@ import { cache, cloneElement, createElement, isValidElement, type ReactNode } from "react"; +import { boneAttributes } from "./core/attributes.ts"; +import type { BoneOptions, BoneType, MinMax } from "./core/attributes.ts"; + +// Re-export the framework-agnostic pieces so the React entry's public API is +// unchanged by the core extraction. +export { minMax, isMinMax } from "./core/attributes.ts"; +export type { BoneOptions, BoneType, MinMax }; // --------------------------------------------------------------------------- // Server-safe loading context via React.cache @@ -9,41 +16,10 @@ import { cache, cloneElement, createElement, isValidElement, type ReactNode } fr export const getBonesContext = cache(() => ({ loading: false })); -export type BoneType = "text" | "block" | "container"; - -// --------------------------------------------------------------------------- -// minMax — variable-length skeleton helper -// -// Returns a descriptor that `bone("text", { length: minMax(4, 12) })` uses to -// produce a different deterministic width on each call within a createBones -// instance. Ideal inside repeat() loops for natural-looking skeleton lists. -// --------------------------------------------------------------------------- - -const MIN_MAX_BRAND = Symbol("minMax"); - -export interface MinMax { - readonly [MIN_MAX_BRAND]: true; - readonly min: number; - readonly max: number; -} - -export function minMax(min: number, max: number): MinMax { - return { [MIN_MAX_BRAND]: true, min, max }; -} - -export function isMinMax(value: unknown): value is MinMax { - return typeof value === "object" && value !== null && MIN_MAX_BRAND in value; -} - function withKey(node: ReactNode, key: string | number): ReactNode { return isValidElement(node) ? cloneElement(node, { key }) : node; } -export interface BoneOptions { - length?: number | MinMax; - contained?: boolean; -} - // --------------------------------------------------------------------------- // readPromise — throw-promise pattern for Suspense integration // @@ -87,35 +63,8 @@ export function readPromise(promise: Promise): T { // When `data` is a Promise it delegates to `readPromise` for Suspense support. // --------------------------------------------------------------------------- -const TRANSPARENT_PIXEL = - "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; - type BoneProps = Record; -function resolveLength(length: number | MinMax | undefined, callIndex: number): number | undefined { - if (length == null) return undefined; - if (typeof length === "number") return length; - // MinMax: deterministic variation based on call index - const range = length.max - length.min + 1; - return length.min + ((callIndex * 7 + 3) % range); -} - -function buildTextStyle( - options: BoneOptions | undefined, - resolvedLength: number | undefined, -): Record | undefined { - const style: Record = {}; - - if (options?.contained) { - style["--bone-contained"] = 1; - } - if (resolvedLength) { - style["--bone-length"] = resolvedLength; - } - - return Object.keys(style).length > 0 ? style : undefined; -} - // --------------------------------------------------------------------------- // forceBones — sentinel for forced skeleton mode // @@ -202,24 +151,7 @@ export function createBones( const bone = (type: BoneType, options?: BoneOptions): BoneProps => { if (!isLoading) return {}; - - const callIndex = boneCallIndex++; - const props: BoneProps = { - "data-bone": type, - "aria-busy": true, - }; - - if (type === "text") { - const length = resolveLength(options?.length, callIndex); - const style = buildTextStyle(options, length); - if (style) props.style = style; - } - - if (type === "block") { - props.src = TRANSPARENT_PIXEL; - } - - return props; + return { ...boneAttributes(type, options, boneCallIndex++) }; }; function repeat( diff --git a/packages/bones/tests/attributes.test.ts b/packages/bones/tests/attributes.test.ts new file mode 100644 index 0000000..3b1a3e8 --- /dev/null +++ b/packages/bones/tests/attributes.test.ts @@ -0,0 +1,85 @@ +import { describe, expect, test } from "vite-plus/test"; +import { + boneAttributes, + isMinMax, + minMax, + resolveLength, + TRANSPARENT_PIXEL, +} from "../src/core/attributes.ts"; + +describe("boneAttributes", () => { + test("text bone has data-bone and aria-busy only", () => { + expect(boneAttributes("text")).toEqual({ "data-bone": "text", "aria-busy": true }); + }); + + test("text bone with length sets --bone-length", () => { + expect(boneAttributes("text", { length: 12 })).toEqual({ + "data-bone": "text", + "aria-busy": true, + style: { "--bone-length": 12 }, + }); + }); + + test("contained text bone sets --bone-contained", () => { + expect(boneAttributes("text", { contained: true, length: 7 })).toEqual({ + "data-bone": "text", + "aria-busy": true, + style: { "--bone-contained": 1, "--bone-length": 7 }, + }); + }); + + test("block bone carries the transparent pixel src", () => { + expect(boneAttributes("block")).toEqual({ + "data-bone": "block", + "aria-busy": true, + src: TRANSPARENT_PIXEL, + }); + }); + + test("container bone has no style or src", () => { + expect(boneAttributes("container")).toEqual({ + "data-bone": "container", + "aria-busy": true, + }); + }); + + test("options are ignored for non-text bones", () => { + expect(boneAttributes("block", { length: 5 }).style).toBeUndefined(); + }); +}); + +describe("resolveLength", () => { + test("passes plain numbers through", () => { + expect(resolveLength(9, 0)).toBe(9); + expect(resolveLength(9, 3)).toBe(9); + }); + + test("returns undefined for undefined", () => { + expect(resolveLength(undefined, 3)).toBeUndefined(); + }); + + test("minMax varies deterministically with call index", () => { + const range = minMax(4, 12); + const widths = [0, 1, 2, 3].map((i) => resolveLength(range, i)); + // min + ((i * 7 + 3) % 9) + expect(widths).toEqual([7, 5, 12, 10]); + }); + + test("minMax stays within bounds", () => { + const range = minMax(4, 12); + for (let i = 0; i < 50; i++) { + const width = resolveLength(range, i); + expect(width).toBeGreaterThanOrEqual(4); + expect(width).toBeLessThanOrEqual(12); + } + }); +}); + +describe("minMax", () => { + test("isMinMax accepts minMax descriptors and rejects lookalikes", () => { + expect(isMinMax(minMax(1, 2))).toBe(true); + expect(isMinMax({ min: 1, max: 2 })).toBe(false); + expect(isMinMax(null)).toBe(false); + expect(isMinMax(7)).toBe(false); + }); +}); From 815405ea6eb031aab85badfe7c700ded22ebaa28 Mon Sep 17 00:00:00 2001 From: Hunter Garrett Date: Fri, 21 Aug 2026 09:46:03 -0400 Subject: [PATCH 2/7] refactor: split package into core and react subpath entries Co-Authored-By: Claude Fable 5 --- packages/bones/package.json | 9 +++++++++ packages/bones/src/index.ts | 17 ++++++++--------- packages/bones/src/{ => react}/bones.ts | 0 packages/bones/src/{ => react}/create-bones.ts | 6 +++--- packages/bones/src/react/index.ts | 9 +++++++++ packages/bones/tests/create-bones.test.tsx | 2 +- packages/bones/tests/css-skeleton.test.tsx | 2 +- packages/bones/tests/read-promise.test.tsx | 2 +- packages/bones/vite.config.ts | 2 +- 9 files changed, 33 insertions(+), 16 deletions(-) rename packages/bones/src/{ => react}/bones.ts (100%) rename packages/bones/src/{ => react}/create-bones.ts (97%) create mode 100644 packages/bones/src/react/index.ts diff --git a/packages/bones/package.json b/packages/bones/package.json index a68b107..e83a332 100644 --- a/packages/bones/package.json +++ b/packages/bones/package.json @@ -22,6 +22,7 @@ ], "exports": { ".": "./dist/index.mjs", + "./react": "./dist/react/index.mjs", "./package.json": "./package.json", "./css": { "style": "./src/css/bones.css", @@ -55,5 +56,13 @@ "peerDependencies": { "react": ">=18", "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } } diff --git a/packages/bones/src/index.ts b/packages/bones/src/index.ts index 69026b6..1b37797 100644 --- a/packages/bones/src/index.ts +++ b/packages/bones/src/index.ts @@ -1,9 +1,8 @@ -export { createBones, readPromise, forceBones, minMax, isMinMax } from "./create-bones.ts"; -export { Bones, BonesForce } from "./bones.ts"; -export type { - BoneType, - BoneOptions, - MinMax, - CreateBonesOptions, - CreateBonesReturn, -} from "./create-bones.ts"; +export { + boneAttributes, + isMinMax, + minMax, + resolveLength, + TRANSPARENT_PIXEL, +} from "./core/attributes.ts"; +export type { BoneAttributes, BoneOptions, BoneType, MinMax } from "./core/attributes.ts"; diff --git a/packages/bones/src/bones.ts b/packages/bones/src/react/bones.ts similarity index 100% rename from packages/bones/src/bones.ts rename to packages/bones/src/react/bones.ts diff --git a/packages/bones/src/create-bones.ts b/packages/bones/src/react/create-bones.ts similarity index 97% rename from packages/bones/src/create-bones.ts rename to packages/bones/src/react/create-bones.ts index cd50333..f3ad701 100644 --- a/packages/bones/src/create-bones.ts +++ b/packages/bones/src/react/create-bones.ts @@ -1,10 +1,10 @@ import { cache, cloneElement, createElement, isValidElement, type ReactNode } from "react"; -import { boneAttributes } from "./core/attributes.ts"; -import type { BoneOptions, BoneType, MinMax } from "./core/attributes.ts"; +import { boneAttributes } from "../core/attributes.ts"; +import type { BoneOptions, BoneType, MinMax } from "../core/attributes.ts"; // Re-export the framework-agnostic pieces so the React entry's public API is // unchanged by the core extraction. -export { minMax, isMinMax } from "./core/attributes.ts"; +export { minMax, isMinMax } from "../core/attributes.ts"; export type { BoneOptions, BoneType, MinMax }; // --------------------------------------------------------------------------- diff --git a/packages/bones/src/react/index.ts b/packages/bones/src/react/index.ts new file mode 100644 index 0000000..69026b6 --- /dev/null +++ b/packages/bones/src/react/index.ts @@ -0,0 +1,9 @@ +export { createBones, readPromise, forceBones, minMax, isMinMax } from "./create-bones.ts"; +export { Bones, BonesForce } from "./bones.ts"; +export type { + BoneType, + BoneOptions, + MinMax, + CreateBonesOptions, + CreateBonesReturn, +} from "./create-bones.ts"; diff --git a/packages/bones/tests/create-bones.test.tsx b/packages/bones/tests/create-bones.test.tsx index e52d49d..2b0a7d1 100644 --- a/packages/bones/tests/create-bones.test.tsx +++ b/packages/bones/tests/create-bones.test.tsx @@ -1,7 +1,7 @@ import { cleanup, render, screen, act } from "@testing-library/react"; import { Suspense } from "react"; import { afterEach, describe, expect, test } from "vite-plus/test"; -import { createBones, forceBones } from "../src/create-bones.ts"; +import { createBones, forceBones } from "../src/react/create-bones.ts"; const mockData = { name: "Pikachu" }; diff --git a/packages/bones/tests/css-skeleton.test.tsx b/packages/bones/tests/css-skeleton.test.tsx index 4dfd368..bc02f84 100644 --- a/packages/bones/tests/css-skeleton.test.tsx +++ b/packages/bones/tests/css-skeleton.test.tsx @@ -1,6 +1,6 @@ import { cleanup, render } from "@testing-library/react"; import { afterEach, describe, expect, test } from "vite-plus/test"; -import { createBones, forceBones } from "../src/create-bones.ts"; +import { createBones, forceBones } from "../src/react/create-bones.ts"; const mockData = { text: "Hello World" }; diff --git a/packages/bones/tests/read-promise.test.tsx b/packages/bones/tests/read-promise.test.tsx index 494cd8c..604049d 100644 --- a/packages/bones/tests/read-promise.test.tsx +++ b/packages/bones/tests/read-promise.test.tsx @@ -3,7 +3,7 @@ import { Suspense } from "react"; import { afterEach, describe, expect, test } from "vite-plus/test"; // readPromise is internal — import directly from source -import { readPromise } from "../src/create-bones.ts"; +import { readPromise } from "../src/react/create-bones.ts"; function ReadPromiseTest({ promise }: { promise: Promise }) { const result = readPromise(promise); diff --git a/packages/bones/vite.config.ts b/packages/bones/vite.config.ts index cd9c3e9..bf8ab09 100644 --- a/packages/bones/vite.config.ts +++ b/packages/bones/vite.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ "*": "vp check --fix", }, pack: { - entry: ["src/index.ts"], + entry: ["src/index.ts", "src/react/index.ts"], unbundle: true, copy: "src/css", dts: { From 69d5aec4667437aca9772c0f7f07869387c49b88 Mon Sep 17 00:00:00 2001 From: Hunter Garrett Date: Fri, 21 Aug 2026 09:52:15 -0400 Subject: [PATCH 3/7] refactor: rename @lovo/bones to @camp-dev/bones Co-Authored-By: Claude Fable 5 --- .changeset/config.json | 2 +- apps/demo/app/compare/page.tsx | 2 +- apps/demo/app/compare/pokemon/[id]/page.tsx | 2 +- apps/demo/app/layout.tsx | 2 +- apps/demo/app/pokemon/[id]/page.tsx | 2 +- apps/demo/app/pokemon/[id]/tabs-section.tsx | 2 +- apps/demo/components/animations-demo/animations-demo.tsx | 2 +- apps/demo/components/article-preview/article-preview.tsx | 2 +- apps/demo/components/base-stats-card/base-stats-card.tsx | 2 +- .../components/dex-entries-panel/dex-entries-panel.tsx | 2 +- .../evolution-chain-card/evolution-chain-card.tsx | 2 +- .../forced-skeletons-demo/forced-skeletons-demo.tsx | 2 +- apps/demo/components/hero-section/hero-section.test.tsx | 2 +- apps/demo/components/hero-section/hero-section.tsx | 2 +- apps/demo/components/info-card/info-card.tsx | 2 +- apps/demo/components/locations-panel/locations-panel.tsx | 2 +- apps/demo/components/moves-panel/moves-interactive.tsx | 2 +- apps/demo/components/moves-panel/moves-panel.tsx | 2 +- .../multi-line-text-demo/multi-line-text-demo.tsx | 2 +- apps/demo/components/pokemon-card/pokemon-card.tsx | 2 +- .../pokemon-detail-view/pokemon-detail-view.tsx | 2 +- apps/demo/components/pokemon-grid/pokemon-grid.tsx | 2 +- apps/demo/components/pokemon-hero/pokemon-hero.tsx | 2 +- apps/demo/components/stat-bar/stat-bar.tsx | 2 +- apps/demo/components/suspense-demo/suspense-demo.tsx | 2 +- apps/demo/components/theming-demo/theming-demo.tsx | 6 +++--- .../components/type-defense-card/type-defense-card.tsx | 2 +- apps/demo/package.json | 4 ++-- apps/docs/app/layout.tsx | 2 +- apps/docs/components/demo/pokemon-card.tsx | 2 +- apps/docs/package.json | 4 ++-- package.json | 8 ++++---- packages/bones/package.json | 8 ++++---- pnpm-lock.yaml | 4 ++-- 34 files changed, 45 insertions(+), 45 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index ba89546..4d6a1a2 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,6 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "lovo-hq/bones" }], + "changelog": ["@changesets/changelog-github", { "repo": "campdotdev/bones" }], "commit": false, "fixed": [], "linked": [], diff --git a/apps/demo/app/compare/page.tsx b/apps/demo/app/compare/page.tsx index a1ca2b4..2f1e166 100644 --- a/apps/demo/app/compare/page.tsx +++ b/apps/demo/app/compare/page.tsx @@ -1,4 +1,4 @@ -import { BonesForce } from "bones"; +import { BonesForce } from "bones/react"; import { HeroSection } from "@/components/hero-section/hero-section"; import { DemoSection } from "@/components/demo-section/demo-section"; import { PokemonGrid } from "@/components/pokemon-grid/pokemon-grid"; diff --git a/apps/demo/app/compare/pokemon/[id]/page.tsx b/apps/demo/app/compare/pokemon/[id]/page.tsx index bc66454..33b64d8 100644 --- a/apps/demo/app/compare/pokemon/[id]/page.tsx +++ b/apps/demo/app/compare/pokemon/[id]/page.tsx @@ -1,4 +1,4 @@ -import { BonesForce, forceBones } from "bones"; +import { BonesForce, forceBones } from "bones/react"; import Link from "next/link"; import { PokemonHero } from "@/components/pokemon-hero/pokemon-hero"; import { BaseStatsCard } from "@/components/base-stats-card/base-stats-card"; diff --git a/apps/demo/app/layout.tsx b/apps/demo/app/layout.tsx index 7afc538..a69f1a0 100644 --- a/apps/demo/app/layout.tsx +++ b/apps/demo/app/layout.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { cookies, headers } from "next/headers"; -import { BonesForce } from "bones"; +import { BonesForce } from "bones/react"; import { BonesDevTool } from "@/components/bones-devtool/bones-devtool"; import "bones/css"; import "./globals.css"; diff --git a/apps/demo/app/pokemon/[id]/page.tsx b/apps/demo/app/pokemon/[id]/page.tsx index 22ac8db..1b09f3e 100644 --- a/apps/demo/app/pokemon/[id]/page.tsx +++ b/apps/demo/app/pokemon/[id]/page.tsx @@ -1,4 +1,4 @@ -import { Bones } from "bones"; +import { Bones } from "bones/react"; import Link from "next/link"; import { cookies } from "next/headers"; import { delay } from "@/lib/delay"; diff --git a/apps/demo/app/pokemon/[id]/tabs-section.tsx b/apps/demo/app/pokemon/[id]/tabs-section.tsx index 518d4a4..47c7cdd 100644 --- a/apps/demo/app/pokemon/[id]/tabs-section.tsx +++ b/apps/demo/app/pokemon/[id]/tabs-section.tsx @@ -1,4 +1,4 @@ -import { Bones } from "bones"; +import { Bones } from "bones/react"; import type { PokemonMoveEntry, MoveDetail, EncounterLocation } from "@/lib/pokeapi"; import { DetailTabs } from "@/components/detail-tabs/detail-tabs"; import { MovesPanel } from "@/components/moves-panel/moves-panel"; diff --git a/apps/demo/components/animations-demo/animations-demo.tsx b/apps/demo/components/animations-demo/animations-demo.tsx index 9296d93..dd9ac0c 100644 --- a/apps/demo/components/animations-demo/animations-demo.tsx +++ b/apps/demo/components/animations-demo/animations-demo.tsx @@ -1,4 +1,4 @@ -import { BonesForce } from "bones"; +import { BonesForce } from "bones/react"; import { DemoSection } from "@/components/demo-section/demo-section"; import { PokemonCard } from "@/components/pokemon-card/pokemon-card"; import styles from "./styles.module.css"; diff --git a/apps/demo/components/article-preview/article-preview.tsx b/apps/demo/components/article-preview/article-preview.tsx index 792f3e1..7ef9afc 100644 --- a/apps/demo/components/article-preview/article-preview.tsx +++ b/apps/demo/components/article-preview/article-preview.tsx @@ -1,4 +1,4 @@ -import { createBones } from "bones"; +import { createBones } from "bones/react"; import styles from "./styles.module.css"; interface Article { diff --git a/apps/demo/components/base-stats-card/base-stats-card.tsx b/apps/demo/components/base-stats-card/base-stats-card.tsx index bbd2180..c8c79eb 100644 --- a/apps/demo/components/base-stats-card/base-stats-card.tsx +++ b/apps/demo/components/base-stats-card/base-stats-card.tsx @@ -1,4 +1,4 @@ -import { createBones } from "bones"; +import { createBones } from "bones/react"; import type { PokemonData } from "@/lib/pokeapi"; import styles from "./styles.module.css"; diff --git a/apps/demo/components/dex-entries-panel/dex-entries-panel.tsx b/apps/demo/components/dex-entries-panel/dex-entries-panel.tsx index cb4dae7..a3e1c4b 100644 --- a/apps/demo/components/dex-entries-panel/dex-entries-panel.tsx +++ b/apps/demo/components/dex-entries-panel/dex-entries-panel.tsx @@ -1,4 +1,4 @@ -import { createBones, minMax } from "bones"; +import { createBones, minMax } from "bones/react"; import styles from "./styles.module.css"; const VERSION_TO_GENERATION: Record = { diff --git a/apps/demo/components/evolution-chain-card/evolution-chain-card.tsx b/apps/demo/components/evolution-chain-card/evolution-chain-card.tsx index 1c190ed..8617d2c 100644 --- a/apps/demo/components/evolution-chain-card/evolution-chain-card.tsx +++ b/apps/demo/components/evolution-chain-card/evolution-chain-card.tsx @@ -1,5 +1,5 @@ import Image from "next/image"; -import { createBones } from "bones"; +import { createBones } from "bones/react"; import type { EvolutionChain } from "@/lib/pokeapi"; import styles from "./styles.module.css"; diff --git a/apps/demo/components/forced-skeletons-demo/forced-skeletons-demo.tsx b/apps/demo/components/forced-skeletons-demo/forced-skeletons-demo.tsx index affc26d..6bc1ef5 100644 --- a/apps/demo/components/forced-skeletons-demo/forced-skeletons-demo.tsx +++ b/apps/demo/components/forced-skeletons-demo/forced-skeletons-demo.tsx @@ -1,4 +1,4 @@ -import { BonesForce } from "bones"; +import { BonesForce } from "bones/react"; import { fetchPokemonList } from "@/lib/pokeapi"; import { DemoSection } from "@/components/demo-section/demo-section"; import { PokemonGrid } from "@/components/pokemon-grid/pokemon-grid"; diff --git a/apps/demo/components/hero-section/hero-section.test.tsx b/apps/demo/components/hero-section/hero-section.test.tsx index 9a79a76..75498be 100644 --- a/apps/demo/components/hero-section/hero-section.test.tsx +++ b/apps/demo/components/hero-section/hero-section.test.tsx @@ -20,6 +20,6 @@ describe("HeroSection", () => { const docsLink = screen.getByRole("link", { name: "Docs" }); const githubLink = screen.getByRole("link", { name: "GitHub" }); expect(docsLink.getAttribute("href")).toBe("https://bones.lovo.sh"); - expect(githubLink.getAttribute("href")).toBe("https://github.com/lovo-hq/bones"); + expect(githubLink.getAttribute("href")).toBe("https://github.com/campdotdev/bones"); }); }); diff --git a/apps/demo/components/hero-section/hero-section.tsx b/apps/demo/components/hero-section/hero-section.tsx index b91518c..2cedb33 100644 --- a/apps/demo/components/hero-section/hero-section.tsx +++ b/apps/demo/components/hero-section/hero-section.tsx @@ -13,7 +13,7 @@ export function HeroSection() {