@vllnt/ui 0.4.0-canary.4c6891e → 0.4.0-canary.927b45a

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.
package/CHANGELOG.md CHANGED
@@ -83,7 +83,7 @@ _Nothing yet._
83
83
 
84
84
  ### Changed
85
85
 
86
- - Documentation domain moved to `ui.vllnt.ai` / `storybook.vllnt.ai`.
86
+ - Documentation domain moved to `ui.vllnt.com` / `storybook.vllnt.ai`.
87
87
  - Default package registry is the public npm registry (no longer GitHub Packages).
88
88
  - README component tables expanded to cover all 144 components organized by family.
89
89
 
package/README.md CHANGED
@@ -134,7 +134,7 @@ which set `data-theme` on the document root. Render `<ThemePresetProvider />`
134
134
  once near the root to restore the saved preset before paint.
135
135
 
136
136
  To design and export your own theme, use the visual editor at
137
- [`/themes`](https://ui.vllnt.ai/themes) — it exports a CSS block, a
137
+ [`/themes`](https://ui.vllnt.com/themes) — it exports a CSS block, a
138
138
  `npx shadcn add` command, or design tokens.
139
139
 
140
140
  ## Component Patterns
@@ -31,18 +31,14 @@ function useActiveSection(sections) {
31
31
  }
32
32
  });
33
33
  return () => {
34
- sections.forEach((section) => {
35
- const element = document.querySelector(`#${section.id}`);
36
- if (element) {
37
- observer.unobserve(element);
38
- }
39
- });
34
+ observer.disconnect();
40
35
  };
41
36
  }, [sections]);
42
37
  return activeSection;
43
38
  }
44
39
  function TableOfContents({
45
40
  as: Heading = "h3",
41
+ label = "On This Page",
46
42
  sections
47
43
  }) {
48
44
  const activeSection = useActiveSection(sections);
@@ -50,7 +46,7 @@ function TableOfContents({
50
46
  return null;
51
47
  }
52
48
  return /* @__PURE__ */ jsx("aside", { className: "hidden xl:block", children: /* @__PURE__ */ jsx("div", { className: "sticky top-8", children: /* @__PURE__ */ jsxs("div", { className: "border-l-2 border-border pl-4", children: [
53
- /* @__PURE__ */ jsx(Heading, { className: "text-sm font-semibold mb-4 text-muted-foreground uppercase tracking-wider", children: "On This Page" }),
49
+ /* @__PURE__ */ jsx(Heading, { className: "text-sm font-semibold mb-4 text-muted-foreground uppercase tracking-wider", children: label }),
54
50
  /* @__PURE__ */ jsx("nav", { className: "space-y-2", children: sections.map((section) => /* @__PURE__ */ jsx(
55
51
  "button",
56
52
  {
package/dist/index.d.ts CHANGED
@@ -5071,12 +5071,14 @@ declare function SidebarProvider({ children }: {
5071
5071
  type TableOfContentsProps = {
5072
5072
  /** Heading tag for the "On This Page" label. Defaults to `h3`. */
5073
5073
  as?: HeadingTag;
5074
+ /** Heading label. Override to translate it. Defaults to `On This Page`. */
5075
+ label?: string;
5074
5076
  sections: {
5075
5077
  id: string;
5076
5078
  title: string;
5077
5079
  }[];
5078
5080
  };
5079
- declare function TableOfContents({ as: Heading, sections, }: TableOfContentsProps): react_jsx_runtime.JSX.Element | null;
5081
+ declare function TableOfContents({ as: Heading, label, sections, }: TableOfContentsProps): react_jsx_runtime.JSX.Element | null;
5080
5082
 
5081
5083
  type TopBarProps = React.ComponentPropsWithoutRef<"header"> & {
5082
5084
  leading?: ReactNode;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@vllnt/ui",
3
- "version": "0.4.0-canary.4c6891e",
3
+ "version": "0.4.0-canary.927b45a",
4
4
  "description": "React component library — 309 components built on Radix UI, Tailwind CSS, and CVA",
5
5
  "license": "MIT",
6
6
  "author": "vllnt",
7
- "homepage": "https://ui.vllnt.ai",
7
+ "homepage": "https://ui.vllnt.com",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/vllnt/ui.git",