@heyramzi/ui 2.0.0 → 2.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyramzi/ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Svelte 5 UI for apps: primitives, effects and animations, plus tasks, charts, slides, an editor, onboarding and a canvas as subpaths.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -337,44 +337,44 @@
337
337
  "dependencies": {
338
338
  "@dagrejs/dagre": "^3.1.1",
339
339
  "@shadcn-svelte/primitives": "^0.0.1",
340
- "@tiptap/core": "^3.31.4",
341
- "@tiptap/extension-drag-handle": "^3.31.4",
342
- "@tiptap/extension-image": "^3.31.4",
343
- "@tiptap/extension-placeholder": "^3.31.4",
344
- "@tiptap/pm": "^3.31.4",
345
- "@tiptap/starter-kit": "^3.31.4",
340
+ "@tiptap/core": "^3.32.0",
341
+ "@tiptap/extension-drag-handle": "^3.32.0",
342
+ "@tiptap/extension-image": "^3.32.0",
343
+ "@tiptap/extension-placeholder": "^3.32.0",
344
+ "@tiptap/pm": "^3.32.0",
345
+ "@tiptap/starter-kit": "^3.32.0",
346
346
  "@zag-js/svelte": "^1.46.0",
347
347
  "@zag-js/tour": "^1.46.0",
348
348
  "clsx": "^2.1.1",
349
349
  "d3-scale": "^4.0.2",
350
350
  "d3-shape": "^3.2.0",
351
- "layerchart": "^2.5.1",
352
- "markdown-it": "^15.0.2",
353
- "marked": "^18.1.0",
351
+ "layerchart": "^2.8.1",
352
+ "markdown-it": "^15.0.3",
353
+ "marked": "^18.1.1",
354
354
  "perfect-freehand": "^1.2.3",
355
- "phosphor-svelte": "^3.1.0",
355
+ "phosphor-svelte": "^3.1.1",
356
356
  "roughjs": "^4.6.6",
357
357
  "shiki": "^4.5.0",
358
358
  "tailwind-merge": "^3.7.0",
359
359
  "tailwind-variants": "^3.3.1",
360
- "zod": "^4.6.5"
360
+ "zod": "^4.6.7"
361
361
  },
362
362
  "devDependencies": {
363
363
  "@internationalized/date": "^3.12.4",
364
364
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
365
365
  "@types/d3-scale": "^4.0.9",
366
366
  "@types/d3-shape": "^3.2.0",
367
- "@types/node": "^26.6.4",
367
+ "@types/node": "^26.6.5",
368
368
  "@xyflow/svelte": "^1.7.0",
369
- "bits-ui": "^2.19.5",
370
- "jsdom": "^30.1.2",
369
+ "bits-ui": "^2.20.0",
370
+ "jsdom": "^30.1.3",
371
371
  "mode-watcher": "^1.1.0",
372
372
  "svelte": "^5.57.2",
373
- "svelte-check": "^4.7.6",
373
+ "svelte-check": "^4.7.7",
374
374
  "svelte-sonner": "^1.2.1",
375
375
  "typescript": "~7.0.2",
376
- "vite-plus": "^1.0.0",
377
- "vitest": "^5.0.3"
376
+ "vite-plus": "^1.3.0",
377
+ "vitest": "^5.0.5"
378
378
  },
379
379
  "peerDependencies": {
380
380
  "@internationalized/date": "^3.12.4",
@@ -69,6 +69,8 @@ const DEMO_ALIASES = [
69
69
  ["$lib/utils.js", "@heyramzi/utils"],
70
70
  // The peer here is the runes build, published under its own name.
71
71
  ["@tabler/icons-svelte/", "@tabler/icons-svelte-runes/"],
72
+ // Upstream's docs live under /docs/components; ours are at /components, and the prerender follows the link.
73
+ ['href="/docs/components"', 'href="/components"'],
72
74
  ];
73
75
 
74
76
  /* Registry primitives this package does not ship: no product imports them. Skipped, so a sync does not bring them back. */
@@ -3,6 +3,7 @@
3
3
  // IMPORTS
4
4
  // =========================
5
5
  import { Editor } from "@tiptap/core";
6
+ import { untrack } from "svelte";
6
7
  import "./content.css";
7
8
  import { buildExtensions } from "./extensions.js";
8
9
  import { buildSlashItems, type SlashItem } from "./slash-items.js";
@@ -176,7 +177,7 @@ function deleteActiveImage() {
176
177
  activeImageElement = null;
177
178
  }
178
179
 
179
- $effect(() => {
180
+ function mount() {
180
181
  if (!editorElement || editorInstance) return;
181
182
 
182
183
  const extensions = buildExtensions({ preset, placeholder, blockIds });
@@ -270,6 +271,12 @@ $effect(() => {
270
271
  editorInstance?.destroy();
271
272
  editorInstance = null;
272
273
  };
274
+ }
275
+
276
+ // Only the element mounts the editor. Read tracked, `content` (fed back by onchange) and the
277
+ // `tick++` each transaction makes would destroy and rebuild it until Svelte stops the loop.
278
+ $effect(() => {
279
+ if (editorElement) return untrack(mount);
273
280
  });
274
281
  </script>
275
282
 
@@ -28,7 +28,12 @@ const SITE = join(PKG, "..", "..", "site", "src", "lib");
28
28
 
29
29
  describe("site gallery coverage", () => {
30
30
  it("gives every animation a stage", () => {
31
- const section = readFileSync(join(SITE, "demos", "motion.svelte"), "utf8");
31
+ // Each animation's stage is its own file under demos/motion/.
32
+ const stages = join(SITE, "demos", "motion");
33
+ const section = readdirSync(stages)
34
+ .filter((file) => file.endsWith(".svelte"))
35
+ .map((file) => readFileSync(join(stages, file), "utf8"))
36
+ .join("\n");
32
37
  const missing = readdirSync(join(PKG, "src", "animations"))
33
38
  .filter((file) => file.endsWith(".css") && file !== "index.css")
34
39
  .filter((file) => !section.includes(`animations/${file.replace(".css", "")}`));
@@ -43,6 +48,20 @@ describe("site gallery coverage", () => {
43
48
  expect(vendored.filter((name) => !manifest.includes(`name: "${name}"`))).toEqual([]);
44
49
  });
45
50
 
51
+ it("gives every component, AI part and effect a place on the site", () => {
52
+ const walk = (dir: string): string[] =>
53
+ readdirSync(dir, { withFileTypes: true }).flatMap((d) =>
54
+ d.isDirectory() ? walk(join(dir, d.name)) : /\.(svelte|ts)$/.test(d.name) ? [join(dir, d.name)] : [],
55
+ );
56
+ const site = walk(join(SITE, "..")).map((file) => readFileSync(file, "utf8")).join("\n");
57
+ const parts = ["components", "ai", "effects"].flatMap((top) =>
58
+ readdirSync(join(PKG, "src", top), { withFileTypes: true })
59
+ .filter((d) => d.isDirectory())
60
+ .map((d) => `${top}/${d.name}`),
61
+ );
62
+ expect(parts.filter((part) => !site.includes(`${part}/`) && !site.includes(`${part}"`))).toEqual([]);
63
+ });
64
+
46
65
  it("keeps a demo file behind every listed primitive", () => {
47
66
  const manifest = readFileSync(join(SITE, "shadcn-demos", "index.ts"), "utf8");
48
67
  const listed = [...manifest.matchAll(/name: "([a-z-]+)"/g)].map((m) => m[1]);