@cascivo/react 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,18 @@
1
1
  "use client";
2
2
 
3
- import { useSignal as e, useSignalEffect as t } from "@cascivo/core";
3
+ import { useSignal as e, useSignalEffect as t, useSignals as n } from "@cascivo/core";
4
4
  //#region ../components/src/toc/use-toc-from-region.ts
5
- function n(n, r = {}) {
6
- let i = r.selector ?? "h2, h3, h4", a = e([]);
5
+ function r(r, i = {}) {
6
+ n();
7
+ let a = i.selector ?? "h2, h3, h4", o = e([]);
7
8
  return t(() => {
8
- let e = n.current;
9
- e && (a.value = Array.from(e.querySelectorAll(i)).filter((e) => e.id !== "").map((e) => ({
9
+ let e = r.current;
10
+ e && (o.value = Array.from(e.querySelectorAll(a)).filter((e) => e.id !== "").map((e) => ({
10
11
  id: e.id,
11
12
  label: e.textContent?.trim() ?? "",
12
13
  level: Number(e.tagName.slice(1)) || 2
13
14
  })));
14
- }), a;
15
+ }), o;
15
16
  }
16
17
  //#endregion
17
- export { n as useTocFromRegion };
18
+ export { r as useTocFromRegion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascivo/react",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "Prebuilt cascivo design system components — use without copying source",
6
6
  "keywords": [
@@ -44,8 +44,8 @@
44
44
  "provenance": true
45
45
  },
46
46
  "dependencies": {
47
- "@cascivo/core": "^0.3.1",
48
- "@cascivo/i18n": "^0.2.6"
47
+ "@cascivo/core": "^0.4.0",
48
+ "@cascivo/i18n": "^0.2.7"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/jest-dom": "^6.9.1",
package/readme.body.md CHANGED
@@ -35,9 +35,18 @@ Components ship with `'use client'` preserved in the bundle, so they work inside
35
35
  RSC without any extra wrapper.
36
36
 
37
37
  > **No bundler? (CDN, import maps, plain `<link>`)** Import the aggregate sheet
38
- > `@cascivo/react/styles.css` — it contains every component's CSS in one file.
39
- > With a bundler you don't need it; import it only if you prefer one explicit
40
- > stylesheet over per-component tree-shaking.
38
+ > `@cascivo/react/styles.css` — every component's CSS in one file (~273 KB /
39
+ > ~37 KB gzip, not tree-shaken). With a bundler (CSR) you don't need it; import it
40
+ > only if you prefer one explicit stylesheet over per-component tree-shaking, or
41
+ > for Vite SSR (below), where it is required.
42
+
43
+ > **Vite SSR / TanStack Start / Remix / workerd?** Those per-component `.css`
44
+ > imports need a bundler to resolve them; a bare server-side ESM loader throws
45
+ > `Unknown file extension ".css"`. Add `ssr: { noExternal: [/^@cascivo\//] }` (or
46
+ > the `cascivoSsr()` plugin from `@cascivo/vite-plugin`) and import
47
+ > `@cascivo/react/styles.css` once in your root entry. Full recipe:
48
+ > [USING-WITH-VITE-SSR.md](https://github.com/cascivo/cascivo/blob/main/docs/USING-WITH-VITE-SSR.md).
49
+ > Next.js App Router needs none of this.
41
50
 
42
51
  ## Use
43
52
 
@@ -335,7 +344,7 @@ routing break after adding one of these, check that the import resolves to
335
344
  - **DashboardLayout** — Dashboard page layout with stats strip, main content area, and optional aside.
336
345
  - **FeatureGrid** — Feature section — AutoGrid of items with optional title, description, and icon slots. Icons are optional; the grid works text-only. Replace demo content before shipping.
337
346
  - **Flex** — Flex layout primitive for vertical or horizontal stacking with gap control.
338
- - **Grid** — CSS grid layout primitive with responsive column collapsing.
347
+ - **Grid** — CSS grid layout primitive with responsive column collapsing. Establishes its own containment, so responsive `cols` adapt to the grid’s own slot width with no wrapper or container ancestor required.
339
348
  - **Hero** — Page hero section — centered or split layout with eyebrow, title, description, actions and media slots. Replace demo content before shipping.
340
349
  - **Indicator** — Positions an overlay element (badge, dot, count) at a corner of its child
341
350
  - **Join** — Groups adjacent children into a seamless joined element by removing interior borders and radii