@almadar/ui 5.76.5 → 5.76.7

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.
Files changed (64) hide show
  1. package/dist/avl/index.cjs +23 -83
  2. package/dist/avl/index.css +3 -3
  3. package/dist/avl/index.js +23 -83
  4. package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
  5. package/dist/components/core/molecules/Card.d.ts +1 -1
  6. package/dist/components/core/molecules/DataGrid.d.ts +1 -1
  7. package/dist/components/core/molecules/DataList.d.ts +1 -1
  8. package/dist/components/core/molecules/DocPagination.d.ts +8 -1
  9. package/dist/components/core/molecules/DocSearch.d.ts +8 -1
  10. package/dist/components/core/molecules/FlipCard.d.ts +1 -1
  11. package/dist/components/core/molecules/MapView.d.ts +18 -1
  12. package/dist/components/core/molecules/SortableList.d.ts +1 -1
  13. package/dist/components/core/molecules/TableView.d.ts +1 -1
  14. package/dist/components/core/molecules/markdown/CodeBlock.d.ts +1 -1
  15. package/dist/components/core/organisms/DataTable.d.ts +1 -1
  16. package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +10 -1
  17. package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +2 -1
  18. package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
  19. package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +6 -1
  20. package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +6 -1
  21. package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +12 -1
  22. package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +2 -1
  23. package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +2 -1
  24. package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +11 -1
  25. package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +8 -1
  26. package/dist/components/game/2d/atoms/ActionButton.d.ts +2 -1
  27. package/dist/components/game/2d/atoms/ChoiceButton.d.ts +2 -1
  28. package/dist/components/game/2d/atoms/ComboCounter.d.ts +2 -1
  29. package/dist/components/game/2d/atoms/ControlButton.d.ts +2 -1
  30. package/dist/components/game/2d/atoms/DamageNumber.d.ts +2 -1
  31. package/dist/components/game/2d/atoms/DialogueBubble.d.ts +2 -1
  32. package/dist/components/game/2d/atoms/GameIcon.d.ts +2 -1
  33. package/dist/components/game/2d/atoms/HealthBar.d.ts +2 -1
  34. package/dist/components/game/2d/atoms/ItemSlot.d.ts +2 -1
  35. package/dist/components/game/2d/atoms/MiniMap.d.ts +2 -1
  36. package/dist/components/game/2d/atoms/ResourceCounter.d.ts +2 -1
  37. package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +2 -1
  38. package/dist/components/game/2d/atoms/StatusEffect.d.ts +2 -1
  39. package/dist/components/game/2d/atoms/TimerDisplay.d.ts +2 -1
  40. package/dist/components/game/2d/atoms/TurnIndicator.d.ts +2 -1
  41. package/dist/components/game/2d/atoms/WaypointMarker.d.ts +2 -1
  42. package/dist/components/game/2d/molecules/GameHud.d.ts +2 -1
  43. package/dist/components/game/2d/molecules/GameMenu.d.ts +2 -1
  44. package/dist/components/game/2d/molecules/InventoryGrid.d.ts +2 -1
  45. package/dist/components/game/2d/molecules/ResourceBar.d.ts +2 -1
  46. package/dist/components/game/2d/molecules/StatBadge.d.ts +2 -1
  47. package/dist/components/game/2d/organisms/SimulationCanvas.d.ts +5 -5
  48. package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
  49. package/dist/components/index.cjs +19 -79
  50. package/dist/components/index.css +3 -3
  51. package/dist/components/index.js +19 -79
  52. package/dist/hooks/useGitHub.d.ts +7 -7
  53. package/dist/marketing/index.cjs +2 -2
  54. package/dist/marketing/index.js +2 -2
  55. package/dist/providers/EventBusProvider.d.ts +1 -1
  56. package/dist/providers/SelectionProvider.d.ts +1 -1
  57. package/dist/providers/ServerBridge.d.ts +1 -1
  58. package/dist/providers/index.cjs +19 -79
  59. package/dist/providers/index.css +3 -3
  60. package/dist/providers/index.js +19 -79
  61. package/dist/runtime/index.cjs +19 -79
  62. package/dist/runtime/index.css +3 -3
  63. package/dist/runtime/index.js +19 -79
  64. package/package.json +1 -1
@@ -4039,7 +4039,11 @@ var init_Switch = __esm({
4039
4039
  disabled,
4040
4040
  onClick: handleClick,
4041
4041
  className: cn(
4042
- "relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
4042
+ // Fixed rem sizes instead of spacing tokens: themes like atelier
4043
+ // redefine --space-11 to 68px, which makes w-11 enormous and leaves
4044
+ // the thumb stuck near the left edge. The switch geometry must stay
4045
+ // proportional regardless of a theme's density scale.
4046
+ "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
4043
4047
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
4044
4048
  isChecked ? "bg-primary" : "bg-muted",
4045
4049
  disabled && "cursor-not-allowed opacity-50"
@@ -4048,8 +4052,8 @@ var init_Switch = __esm({
4048
4052
  "span",
4049
4053
  {
4050
4054
  className: cn(
4051
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
4052
- isChecked ? "translate-x-5" : "translate-x-0"
4055
+ "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
4056
+ isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
4053
4057
  )
4054
4058
  }
4055
4059
  )
@@ -12350,9 +12354,9 @@ var init_BehaviorView = __esm({
12350
12354
  }
12351
12355
  });
12352
12356
 
12353
- // node_modules/katex/dist/katex.min.css
12357
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
12354
12358
  var init_katex_min = __esm({
12355
- "node_modules/katex/dist/katex.min.css"() {
12359
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
12356
12360
  }
12357
12361
  });
12358
12362
  exports.Tabs = void 0;
@@ -12710,7 +12714,7 @@ function generateDiff(oldVal, newVal) {
12710
12714
  }
12711
12715
  return diff;
12712
12716
  }
12713
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS; exports.CodeBlock = void 0;
12717
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS; exports.CodeBlock = void 0;
12714
12718
  var init_CodeBlock = __esm({
12715
12719
  "components/core/molecules/markdown/CodeBlock.tsx"() {
12716
12720
  init_cn();
@@ -12827,9 +12831,13 @@ var init_CodeBlock = __esm({
12827
12831
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
12828
12832
  DIFF_STYLES = {
12829
12833
  add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
12834
+ added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
12830
12835
  remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
12831
- context: { bg: "", prefix: " ", text: "text-foreground" }
12836
+ removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
12837
+ context: { bg: "", prefix: " ", text: "text-foreground" },
12838
+ unchanged: { bg: "", prefix: " ", text: "text-foreground" }
12832
12839
  };
12840
+ DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
12833
12841
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
12834
12842
  HIDDEN_LINE_NUMBERS = { display: "none" };
12835
12843
  exports.CodeBlock = React80__namespace.default.memo(
@@ -13194,7 +13202,7 @@ var init_CodeBlock = __esm({
13194
13202
  }
13195
13203
  ),
13196
13204
  /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "overflow-auto bg-muted/20", style: { maxHeight }, children: diffLines ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column" }, className: "font-mono text-xs", children: diffLines.map((line, idx) => {
13197
- const style = DIFF_STYLES[line.type];
13205
+ const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
13198
13206
  return /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
13199
13207
  showLineNumbers && /* @__PURE__ */ jsxRuntime.jsx(
13200
13208
  exports.Typography,
@@ -15902,7 +15910,7 @@ var init_BookTableOfContents = __esm({
15902
15910
  style: { direction },
15903
15911
  children: [
15904
15912
  /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
15905
- parts.map((part, partIdx) => {
15913
+ (Array.isArray(parts) ? parts : []).map((part, partIdx) => {
15906
15914
  const chapters = Array.isArray(part.chapters) ? part.chapters : [];
15907
15915
  return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "sm", children: [
15908
15916
  /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", children: [
@@ -35470,8 +35478,6 @@ function SimulationCanvas({
35470
35478
  preset: presetProp,
35471
35479
  width = 600,
35472
35480
  height = 400,
35473
- running,
35474
- speed = 1,
35475
35481
  bodies: externalBodies,
35476
35482
  className
35477
35483
  }) {
@@ -35482,59 +35488,6 @@ function SimulationCanvas({
35482
35488
  React80.useEffect(() => {
35483
35489
  bodiesRef.current = structuredClone(preset.bodies);
35484
35490
  }, [preset]);
35485
- const step = React80.useCallback(() => {
35486
- const dt = Math.min(1 / 60 * speed, 1 / 15);
35487
- const gx = preset.gravity?.x ?? 0;
35488
- const gy = preset.gravity?.y ?? 9.81;
35489
- const bodies = bodiesRef.current;
35490
- const maxVel = Math.max(width, height) * 5;
35491
- for (const body of bodies) {
35492
- if (body.fixed) continue;
35493
- body.vx += gx * dt;
35494
- body.vy += gy * dt;
35495
- body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
35496
- body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
35497
- body.x += body.vx * dt;
35498
- body.y += body.vy * dt;
35499
- if (body.y + body.radius > height) {
35500
- body.y = height - body.radius;
35501
- body.vy = -body.vy * 0.8;
35502
- }
35503
- if (body.y - body.radius < 0) {
35504
- body.y = body.radius;
35505
- body.vy = -body.vy * 0.8;
35506
- }
35507
- if (body.x + body.radius > width) {
35508
- body.x = width - body.radius;
35509
- body.vx = -body.vx * 0.8;
35510
- }
35511
- if (body.x - body.radius < 0) {
35512
- body.x = body.radius;
35513
- body.vx = -body.vx * 0.8;
35514
- }
35515
- }
35516
- if (preset.constraints) {
35517
- for (const c of preset.constraints) {
35518
- const a = bodies[c.bodyA];
35519
- const b = bodies[c.bodyB];
35520
- if (!a || !b) continue;
35521
- const dx = b.x - a.x;
35522
- const dy = b.y - a.y;
35523
- const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
35524
- const diff = (dist - c.length) / dist;
35525
- const fx = dx * diff * c.stiffness;
35526
- const fy = dy * diff * c.stiffness;
35527
- if (!a.fixed) {
35528
- a.vx += fx * dt;
35529
- a.vy += fy * dt;
35530
- }
35531
- if (!b.fixed) {
35532
- b.vx -= fx * dt;
35533
- b.vy -= fy * dt;
35534
- }
35535
- }
35536
- }
35537
- }, [preset, width, height, speed]);
35538
35491
  const draw = React80.useCallback(() => {
35539
35492
  const canvas = canvasRef.current;
35540
35493
  if (!canvas) return;
@@ -35636,21 +35589,8 @@ function SimulationCanvas({
35636
35589
  return interp.startLoop(drawInterpolated);
35637
35590
  }, [externalBodies !== void 0, interp.startLoop]);
35638
35591
  React80.useEffect(() => {
35639
- if (externalBodies !== void 0) return;
35640
- if (!running) return;
35641
- let raf;
35642
- const loop = () => {
35643
- step();
35644
- draw();
35645
- raf = requestAnimationFrame(loop);
35646
- };
35647
- raf = requestAnimationFrame(loop);
35648
- return () => cancelAnimationFrame(raf);
35649
- }, [running, step, draw, externalBodies]);
35650
- React80.useEffect(() => {
35651
- if (externalBodies !== void 0) return;
35652
35592
  draw();
35653
- }, [draw, externalBodies]);
35593
+ }, [draw]);
35654
35594
  React80.useEffect(() => {
35655
35595
  if (typeof window === "undefined") return;
35656
35596
  const canvas = canvasRef.current;
@@ -42012,7 +41952,7 @@ var init_RichBlockEditor = __esm({
42012
41952
  changeEvent,
42013
41953
  readOnly = false,
42014
41954
  placeholder,
42015
- enableBlocks = false,
41955
+ enableBlocks = true,
42016
41956
  showToolbar = true,
42017
41957
  className
42018
41958
  }) => {
@@ -1,4 +1,4 @@
1
- /* node_modules/katex/dist/katex.min.css */
1
+ /* node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css */
2
2
  @font-face {
3
3
  font-display: block;
4
4
  font-family: KaTeX_AMS;
@@ -214,11 +214,11 @@
214
214
  border-color: currentColor;
215
215
  }
216
216
  .katex .katex-version:after {
217
- content: "0.16.45";
217
+ content: "0.16.47";
218
218
  }
219
219
  .katex .katex-mathml {
220
- clip: rect(1px, 1px, 1px, 1px);
221
220
  border: 0;
221
+ clip-path: inset(50%);
222
222
  height: 1px;
223
223
  overflow: hidden;
224
224
  padding: 0;
@@ -3993,7 +3993,11 @@ var init_Switch = __esm({
3993
3993
  disabled,
3994
3994
  onClick: handleClick,
3995
3995
  className: cn(
3996
- "relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
3996
+ // Fixed rem sizes instead of spacing tokens: themes like atelier
3997
+ // redefine --space-11 to 68px, which makes w-11 enormous and leaves
3998
+ // the thumb stuck near the left edge. The switch geometry must stay
3999
+ // proportional regardless of a theme's density scale.
4000
+ "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
3997
4001
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
3998
4002
  isChecked ? "bg-primary" : "bg-muted",
3999
4003
  disabled && "cursor-not-allowed opacity-50"
@@ -4002,8 +4006,8 @@ var init_Switch = __esm({
4002
4006
  "span",
4003
4007
  {
4004
4008
  className: cn(
4005
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
4006
- isChecked ? "translate-x-5" : "translate-x-0"
4009
+ "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
4010
+ isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
4007
4011
  )
4008
4012
  }
4009
4013
  )
@@ -12304,9 +12308,9 @@ var init_BehaviorView = __esm({
12304
12308
  }
12305
12309
  });
12306
12310
 
12307
- // node_modules/katex/dist/katex.min.css
12311
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
12308
12312
  var init_katex_min = __esm({
12309
- "node_modules/katex/dist/katex.min.css"() {
12313
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
12310
12314
  }
12311
12315
  });
12312
12316
  var Tabs;
@@ -12664,7 +12668,7 @@ function generateDiff(oldVal, newVal) {
12664
12668
  }
12665
12669
  return diff;
12666
12670
  }
12667
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
12671
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
12668
12672
  var init_CodeBlock = __esm({
12669
12673
  "components/core/molecules/markdown/CodeBlock.tsx"() {
12670
12674
  init_cn();
@@ -12781,9 +12785,13 @@ var init_CodeBlock = __esm({
12781
12785
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
12782
12786
  DIFF_STYLES = {
12783
12787
  add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
12788
+ added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
12784
12789
  remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
12785
- context: { bg: "", prefix: " ", text: "text-foreground" }
12790
+ removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
12791
+ context: { bg: "", prefix: " ", text: "text-foreground" },
12792
+ unchanged: { bg: "", prefix: " ", text: "text-foreground" }
12786
12793
  };
12794
+ DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
12787
12795
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
12788
12796
  HIDDEN_LINE_NUMBERS = { display: "none" };
12789
12797
  CodeBlock = React80__default.memo(
@@ -13148,7 +13156,7 @@ var init_CodeBlock = __esm({
13148
13156
  }
13149
13157
  ),
13150
13158
  /* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight }, children: diffLines ? /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column" }, className: "font-mono text-xs", children: diffLines.map((line, idx) => {
13151
- const style = DIFF_STYLES[line.type];
13159
+ const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
13152
13160
  return /* @__PURE__ */ jsxs(HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
13153
13161
  showLineNumbers && /* @__PURE__ */ jsx(
13154
13162
  Typography,
@@ -15856,7 +15864,7 @@ var init_BookTableOfContents = __esm({
15856
15864
  style: { direction },
15857
15865
  children: [
15858
15866
  /* @__PURE__ */ jsx(Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
15859
- parts.map((part, partIdx) => {
15867
+ (Array.isArray(parts) ? parts : []).map((part, partIdx) => {
15860
15868
  const chapters = Array.isArray(part.chapters) ? part.chapters : [];
15861
15869
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
15862
15870
  /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
@@ -35424,8 +35432,6 @@ function SimulationCanvas({
35424
35432
  preset: presetProp,
35425
35433
  width = 600,
35426
35434
  height = 400,
35427
- running,
35428
- speed = 1,
35429
35435
  bodies: externalBodies,
35430
35436
  className
35431
35437
  }) {
@@ -35436,59 +35442,6 @@ function SimulationCanvas({
35436
35442
  useEffect(() => {
35437
35443
  bodiesRef.current = structuredClone(preset.bodies);
35438
35444
  }, [preset]);
35439
- const step = useCallback(() => {
35440
- const dt = Math.min(1 / 60 * speed, 1 / 15);
35441
- const gx = preset.gravity?.x ?? 0;
35442
- const gy = preset.gravity?.y ?? 9.81;
35443
- const bodies = bodiesRef.current;
35444
- const maxVel = Math.max(width, height) * 5;
35445
- for (const body of bodies) {
35446
- if (body.fixed) continue;
35447
- body.vx += gx * dt;
35448
- body.vy += gy * dt;
35449
- body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
35450
- body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
35451
- body.x += body.vx * dt;
35452
- body.y += body.vy * dt;
35453
- if (body.y + body.radius > height) {
35454
- body.y = height - body.radius;
35455
- body.vy = -body.vy * 0.8;
35456
- }
35457
- if (body.y - body.radius < 0) {
35458
- body.y = body.radius;
35459
- body.vy = -body.vy * 0.8;
35460
- }
35461
- if (body.x + body.radius > width) {
35462
- body.x = width - body.radius;
35463
- body.vx = -body.vx * 0.8;
35464
- }
35465
- if (body.x - body.radius < 0) {
35466
- body.x = body.radius;
35467
- body.vx = -body.vx * 0.8;
35468
- }
35469
- }
35470
- if (preset.constraints) {
35471
- for (const c of preset.constraints) {
35472
- const a = bodies[c.bodyA];
35473
- const b = bodies[c.bodyB];
35474
- if (!a || !b) continue;
35475
- const dx = b.x - a.x;
35476
- const dy = b.y - a.y;
35477
- const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
35478
- const diff = (dist - c.length) / dist;
35479
- const fx = dx * diff * c.stiffness;
35480
- const fy = dy * diff * c.stiffness;
35481
- if (!a.fixed) {
35482
- a.vx += fx * dt;
35483
- a.vy += fy * dt;
35484
- }
35485
- if (!b.fixed) {
35486
- b.vx -= fx * dt;
35487
- b.vy -= fy * dt;
35488
- }
35489
- }
35490
- }
35491
- }, [preset, width, height, speed]);
35492
35445
  const draw = useCallback(() => {
35493
35446
  const canvas = canvasRef.current;
35494
35447
  if (!canvas) return;
@@ -35590,21 +35543,8 @@ function SimulationCanvas({
35590
35543
  return interp.startLoop(drawInterpolated);
35591
35544
  }, [externalBodies !== void 0, interp.startLoop]);
35592
35545
  useEffect(() => {
35593
- if (externalBodies !== void 0) return;
35594
- if (!running) return;
35595
- let raf;
35596
- const loop = () => {
35597
- step();
35598
- draw();
35599
- raf = requestAnimationFrame(loop);
35600
- };
35601
- raf = requestAnimationFrame(loop);
35602
- return () => cancelAnimationFrame(raf);
35603
- }, [running, step, draw, externalBodies]);
35604
- useEffect(() => {
35605
- if (externalBodies !== void 0) return;
35606
35546
  draw();
35607
- }, [draw, externalBodies]);
35547
+ }, [draw]);
35608
35548
  useEffect(() => {
35609
35549
  if (typeof window === "undefined") return;
35610
35550
  const canvas = canvasRef.current;
@@ -41966,7 +41906,7 @@ var init_RichBlockEditor = __esm({
41966
41906
  changeEvent,
41967
41907
  readOnly = false,
41968
41908
  placeholder,
41969
- enableBlocks = false,
41909
+ enableBlocks = true,
41970
41910
  showToolbar = true,
41971
41911
  className
41972
41912
  }) => {
@@ -25,7 +25,7 @@ export interface GitHubRepo {
25
25
  /**
26
26
  * Hook to get GitHub connection status
27
27
  */
28
- export declare function useGitHubStatus(): import("@tanstack/react-query").UseQueryResult<GitHubStatus, Error>;
28
+ export declare function useGitHubStatus(): import("@tanstack/react-query").UseQueryResult<NoInfer<GitHubStatus>, Error>;
29
29
  /**
30
30
  * Hook to connect GitHub (initiate OAuth flow)
31
31
  */
@@ -39,20 +39,20 @@ export declare function useDisconnectGitHub(): import("@tanstack/react-query").U
39
39
  /**
40
40
  * Hook to list GitHub repositories
41
41
  */
42
- export declare function useGitHubRepos(page?: number, perPage?: number): import("@tanstack/react-query").UseQueryResult<{
42
+ export declare function useGitHubRepos(page?: number, perPage?: number): import("@tanstack/react-query").UseQueryResult<NoInfer<{
43
43
  repos: GitHubRepo[];
44
44
  page: number;
45
45
  perPage: number;
46
- }, Error>;
46
+ }>, Error>;
47
47
  /**
48
48
  * Hook to get repository details
49
49
  */
50
- export declare function useGitHubRepo(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
50
+ export declare function useGitHubRepo(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<NoInfer<{
51
51
  repo: GitHubRepo;
52
- }, Error>;
52
+ }>, Error>;
53
53
  /**
54
54
  * Hook to list repository branches
55
55
  */
56
- export declare function useGitHubBranches(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
56
+ export declare function useGitHubBranches(owner: string, repo: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<NoInfer<{
57
57
  branches: string[];
58
- }, Error>;
58
+ }>, Error>;
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
28
28
  var React11__default = /*#__PURE__*/_interopDefault(React11);
29
29
  var LucideIcons2__namespace = /*#__PURE__*/_interopNamespace(LucideIcons2);
30
30
 
31
- // node_modules/clsx/dist/clsx.mjs
31
+ // node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
32
32
  function r(e) {
33
33
  var t, f3, n = "";
34
34
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -43,7 +43,7 @@ function clsx() {
43
43
  return n;
44
44
  }
45
45
 
46
- // node_modules/tailwind-merge/dist/bundle-mjs.mjs
46
+ // node_modules/.pnpm/tailwind-merge@2.6.1/node_modules/tailwind-merge/dist/bundle-mjs.mjs
47
47
  var CLASS_PART_SEPARATOR = "-";
48
48
  var createClassGroupUtils = (config) => {
49
49
  const classMap = createClassMap(config);
@@ -4,7 +4,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import * as LucideIcons2 from 'lucide-react';
5
5
  import { Loader2, X } from 'lucide-react';
6
6
 
7
- // node_modules/clsx/dist/clsx.mjs
7
+ // node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
8
8
  function r(e) {
9
9
  var t, f3, n = "";
10
10
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -19,7 +19,7 @@ function clsx() {
19
19
  return n;
20
20
  }
21
21
 
22
- // node_modules/tailwind-merge/dist/bundle-mjs.mjs
22
+ // node_modules/.pnpm/tailwind-merge@2.6.1/node_modules/tailwind-merge/dist/bundle-mjs.mjs
23
23
  var CLASS_PART_SEPARATOR = "-";
24
24
  var createClassGroupUtils = (config) => {
25
25
  const classMap = createClassMap(config);
@@ -43,5 +43,5 @@ interface EventBusProviderProps {
43
43
  */
44
44
  isolated?: boolean;
45
45
  }
46
- export declare function EventBusProvider({ children, isolated }: EventBusProviderProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function EventBusProvider({ children, isolated }: EventBusProviderProps): React.JSX.Element;
47
47
  export type { EventBusContextType };
@@ -50,7 +50,7 @@ interface SelectionProviderProps {
50
50
  * }
51
51
  * ```
52
52
  */
53
- export declare function SelectionProvider({ children, debug, compareEntities, }: SelectionProviderProps): import("react/jsx-runtime").JSX.Element;
53
+ export declare function SelectionProvider({ children, debug, compareEntities, }: SelectionProviderProps): React.JSX.Element;
54
54
  /**
55
55
  * Hook to access selection state.
56
56
  *
@@ -98,5 +98,5 @@ export interface ServerBridgeProviderProps {
98
98
  transport?: ServerBridgeTransport;
99
99
  children: ReactNode;
100
100
  }
101
- export declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, children, }: ServerBridgeProviderProps): import("react/jsx-runtime").JSX.Element;
101
+ export declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, children, }: ServerBridgeProviderProps): import("react").JSX.Element;
102
102
  export {};
@@ -4727,7 +4727,11 @@ var init_Switch = __esm({
4727
4727
  disabled,
4728
4728
  onClick: handleClick,
4729
4729
  className: cn(
4730
- "relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
4730
+ // Fixed rem sizes instead of spacing tokens: themes like atelier
4731
+ // redefine --space-11 to 68px, which makes w-11 enormous and leaves
4732
+ // the thumb stuck near the left edge. The switch geometry must stay
4733
+ // proportional regardless of a theme's density scale.
4734
+ "relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
4731
4735
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
4732
4736
  isChecked ? "bg-primary" : "bg-muted",
4733
4737
  disabled && "cursor-not-allowed opacity-50"
@@ -4736,8 +4740,8 @@ var init_Switch = __esm({
4736
4740
  "span",
4737
4741
  {
4738
4742
  className: cn(
4739
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
4740
- isChecked ? "translate-x-5" : "translate-x-0"
4743
+ "pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
4744
+ isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
4741
4745
  )
4742
4746
  }
4743
4747
  )
@@ -18899,8 +18903,6 @@ function SimulationCanvas({
18899
18903
  preset: presetProp,
18900
18904
  width = 600,
18901
18905
  height = 400,
18902
- running,
18903
- speed = 1,
18904
18906
  bodies: externalBodies,
18905
18907
  className
18906
18908
  }) {
@@ -18911,59 +18913,6 @@ function SimulationCanvas({
18911
18913
  React107.useEffect(() => {
18912
18914
  bodiesRef.current = structuredClone(preset.bodies);
18913
18915
  }, [preset]);
18914
- const step = React107.useCallback(() => {
18915
- const dt = Math.min(1 / 60 * speed, 1 / 15);
18916
- const gx = preset.gravity?.x ?? 0;
18917
- const gy = preset.gravity?.y ?? 9.81;
18918
- const bodies = bodiesRef.current;
18919
- const maxVel = Math.max(width, height) * 5;
18920
- for (const body of bodies) {
18921
- if (body.fixed) continue;
18922
- body.vx += gx * dt;
18923
- body.vy += gy * dt;
18924
- body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
18925
- body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
18926
- body.x += body.vx * dt;
18927
- body.y += body.vy * dt;
18928
- if (body.y + body.radius > height) {
18929
- body.y = height - body.radius;
18930
- body.vy = -body.vy * 0.8;
18931
- }
18932
- if (body.y - body.radius < 0) {
18933
- body.y = body.radius;
18934
- body.vy = -body.vy * 0.8;
18935
- }
18936
- if (body.x + body.radius > width) {
18937
- body.x = width - body.radius;
18938
- body.vx = -body.vx * 0.8;
18939
- }
18940
- if (body.x - body.radius < 0) {
18941
- body.x = body.radius;
18942
- body.vx = -body.vx * 0.8;
18943
- }
18944
- }
18945
- if (preset.constraints) {
18946
- for (const c of preset.constraints) {
18947
- const a = bodies[c.bodyA];
18948
- const b = bodies[c.bodyB];
18949
- if (!a || !b) continue;
18950
- const dx = b.x - a.x;
18951
- const dy = b.y - a.y;
18952
- const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
18953
- const diff = (dist - c.length) / dist;
18954
- const fx = dx * diff * c.stiffness;
18955
- const fy = dy * diff * c.stiffness;
18956
- if (!a.fixed) {
18957
- a.vx += fx * dt;
18958
- a.vy += fy * dt;
18959
- }
18960
- if (!b.fixed) {
18961
- b.vx -= fx * dt;
18962
- b.vy -= fy * dt;
18963
- }
18964
- }
18965
- }
18966
- }, [preset, width, height, speed]);
18967
18916
  const draw = React107.useCallback(() => {
18968
18917
  const canvas = canvasRef.current;
18969
18918
  if (!canvas) return;
@@ -19065,21 +19014,8 @@ function SimulationCanvas({
19065
19014
  return interp.startLoop(drawInterpolated);
19066
19015
  }, [externalBodies !== void 0, interp.startLoop]);
19067
19016
  React107.useEffect(() => {
19068
- if (externalBodies !== void 0) return;
19069
- if (!running) return;
19070
- let raf;
19071
- const loop = () => {
19072
- step();
19073
- draw();
19074
- raf = requestAnimationFrame(loop);
19075
- };
19076
- raf = requestAnimationFrame(loop);
19077
- return () => cancelAnimationFrame(raf);
19078
- }, [running, step, draw, externalBodies]);
19079
- React107.useEffect(() => {
19080
- if (externalBodies !== void 0) return;
19081
19017
  draw();
19082
- }, [draw, externalBodies]);
19018
+ }, [draw]);
19083
19019
  React107.useEffect(() => {
19084
19020
  if (typeof window === "undefined") return;
19085
19021
  const canvas = canvasRef.current;
@@ -23095,9 +23031,9 @@ var init_BehaviorView = __esm({
23095
23031
  }
23096
23032
  });
23097
23033
 
23098
- // node_modules/katex/dist/katex.min.css
23034
+ // node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
23099
23035
  var init_katex_min = __esm({
23100
- "node_modules/katex/dist/katex.min.css"() {
23036
+ "node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
23101
23037
  }
23102
23038
  });
23103
23039
  var Tabs;
@@ -23411,7 +23347,7 @@ function generateDiff(oldVal, newVal) {
23411
23347
  }
23412
23348
  return diff;
23413
23349
  }
23414
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
23350
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
23415
23351
  var init_CodeBlock = __esm({
23416
23352
  "components/core/molecules/markdown/CodeBlock.tsx"() {
23417
23353
  init_cn();
@@ -23528,9 +23464,13 @@ var init_CodeBlock = __esm({
23528
23464
  CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
23529
23465
  DIFF_STYLES = {
23530
23466
  add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
23467
+ added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
23531
23468
  remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
23532
- context: { bg: "", prefix: " ", text: "text-foreground" }
23469
+ removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
23470
+ context: { bg: "", prefix: " ", text: "text-foreground" },
23471
+ unchanged: { bg: "", prefix: " ", text: "text-foreground" }
23533
23472
  };
23473
+ DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
23534
23474
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
23535
23475
  HIDDEN_LINE_NUMBERS = { display: "none" };
23536
23476
  CodeBlock = React107__namespace.default.memo(
@@ -23895,7 +23835,7 @@ var init_CodeBlock = __esm({
23895
23835
  }
23896
23836
  ),
23897
23837
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight }, children: diffLines ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column" }, className: "font-mono text-xs", children: diffLines.map((line, idx) => {
23898
- const style = DIFF_STYLES[line.type];
23838
+ const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
23899
23839
  return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
23900
23840
  showLineNumbers && /* @__PURE__ */ jsxRuntime.jsx(
23901
23841
  Typography,
@@ -26562,7 +26502,7 @@ var init_BookTableOfContents = __esm({
26562
26502
  style: { direction },
26563
26503
  children: [
26564
26504
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
26565
- parts.map((part, partIdx) => {
26505
+ (Array.isArray(parts) ? parts : []).map((part, partIdx) => {
26566
26506
  const chapters = Array.isArray(part.chapters) ? part.chapters : [];
26567
26507
  return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
26568
26508
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", children: [
@@ -40507,7 +40447,7 @@ var init_RichBlockEditor = __esm({
40507
40447
  changeEvent,
40508
40448
  readOnly = false,
40509
40449
  placeholder,
40510
- enableBlocks = false,
40450
+ enableBlocks = true,
40511
40451
  showToolbar = true,
40512
40452
  className
40513
40453
  }) => {