@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.
- package/dist/avl/index.cjs +23 -83
- package/dist/avl/index.css +3 -3
- package/dist/avl/index.js +23 -83
- package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
- package/dist/components/core/molecules/Card.d.ts +1 -1
- package/dist/components/core/molecules/DataGrid.d.ts +1 -1
- package/dist/components/core/molecules/DataList.d.ts +1 -1
- package/dist/components/core/molecules/DocPagination.d.ts +8 -1
- package/dist/components/core/molecules/DocSearch.d.ts +8 -1
- package/dist/components/core/molecules/FlipCard.d.ts +1 -1
- package/dist/components/core/molecules/MapView.d.ts +18 -1
- package/dist/components/core/molecules/SortableList.d.ts +1 -1
- package/dist/components/core/molecules/TableView.d.ts +1 -1
- package/dist/components/core/molecules/markdown/CodeBlock.d.ts +1 -1
- package/dist/components/core/organisms/DataTable.d.ts +1 -1
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +10 -1
- package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +6 -1
- package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +6 -1
- package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +12 -1
- package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +2 -1
- package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +11 -1
- package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +8 -1
- package/dist/components/game/2d/atoms/ActionButton.d.ts +2 -1
- package/dist/components/game/2d/atoms/ChoiceButton.d.ts +2 -1
- package/dist/components/game/2d/atoms/ComboCounter.d.ts +2 -1
- package/dist/components/game/2d/atoms/ControlButton.d.ts +2 -1
- package/dist/components/game/2d/atoms/DamageNumber.d.ts +2 -1
- package/dist/components/game/2d/atoms/DialogueBubble.d.ts +2 -1
- package/dist/components/game/2d/atoms/GameIcon.d.ts +2 -1
- package/dist/components/game/2d/atoms/HealthBar.d.ts +2 -1
- package/dist/components/game/2d/atoms/ItemSlot.d.ts +2 -1
- package/dist/components/game/2d/atoms/MiniMap.d.ts +2 -1
- package/dist/components/game/2d/atoms/ResourceCounter.d.ts +2 -1
- package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +2 -1
- package/dist/components/game/2d/atoms/StatusEffect.d.ts +2 -1
- package/dist/components/game/2d/atoms/TimerDisplay.d.ts +2 -1
- package/dist/components/game/2d/atoms/TurnIndicator.d.ts +2 -1
- package/dist/components/game/2d/atoms/WaypointMarker.d.ts +2 -1
- package/dist/components/game/2d/molecules/GameHud.d.ts +2 -1
- package/dist/components/game/2d/molecules/GameMenu.d.ts +2 -1
- package/dist/components/game/2d/molecules/InventoryGrid.d.ts +2 -1
- package/dist/components/game/2d/molecules/ResourceBar.d.ts +2 -1
- package/dist/components/game/2d/molecules/StatBadge.d.ts +2 -1
- package/dist/components/game/2d/organisms/SimulationCanvas.d.ts +5 -5
- package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
- package/dist/components/index.cjs +19 -79
- package/dist/components/index.css +3 -3
- package/dist/components/index.js +19 -79
- package/dist/hooks/useGitHub.d.ts +7 -7
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/EventBusProvider.d.ts +1 -1
- package/dist/providers/SelectionProvider.d.ts +1 -1
- package/dist/providers/ServerBridge.d.ts +1 -1
- package/dist/providers/index.cjs +19 -79
- package/dist/providers/index.css +3 -3
- package/dist/providers/index.js +19 -79
- package/dist/runtime/index.cjs +19 -79
- package/dist/runtime/index.css +3 -3
- package/dist/runtime/index.js +19 -79
- package/package.json +1 -1
package/dist/providers/index.css
CHANGED
|
@@ -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.
|
|
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;
|
package/dist/providers/index.js
CHANGED
|
@@ -4682,7 +4682,11 @@ var init_Switch = __esm({
|
|
|
4682
4682
|
disabled,
|
|
4683
4683
|
onClick: handleClick,
|
|
4684
4684
|
className: cn(
|
|
4685
|
-
|
|
4685
|
+
// Fixed rem sizes instead of spacing tokens: themes like atelier
|
|
4686
|
+
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
4687
|
+
// the thumb stuck near the left edge. The switch geometry must stay
|
|
4688
|
+
// proportional regardless of a theme's density scale.
|
|
4689
|
+
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
4686
4690
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4687
4691
|
isChecked ? "bg-primary" : "bg-muted",
|
|
4688
4692
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -4691,8 +4695,8 @@ var init_Switch = __esm({
|
|
|
4691
4695
|
"span",
|
|
4692
4696
|
{
|
|
4693
4697
|
className: cn(
|
|
4694
|
-
"pointer-events-none block h-
|
|
4695
|
-
isChecked ? "translate-x-
|
|
4698
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
4699
|
+
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
4696
4700
|
)
|
|
4697
4701
|
}
|
|
4698
4702
|
)
|
|
@@ -18854,8 +18858,6 @@ function SimulationCanvas({
|
|
|
18854
18858
|
preset: presetProp,
|
|
18855
18859
|
width = 600,
|
|
18856
18860
|
height = 400,
|
|
18857
|
-
running,
|
|
18858
|
-
speed = 1,
|
|
18859
18861
|
bodies: externalBodies,
|
|
18860
18862
|
className
|
|
18861
18863
|
}) {
|
|
@@ -18866,59 +18868,6 @@ function SimulationCanvas({
|
|
|
18866
18868
|
useEffect(() => {
|
|
18867
18869
|
bodiesRef.current = structuredClone(preset.bodies);
|
|
18868
18870
|
}, [preset]);
|
|
18869
|
-
const step = useCallback(() => {
|
|
18870
|
-
const dt = Math.min(1 / 60 * speed, 1 / 15);
|
|
18871
|
-
const gx = preset.gravity?.x ?? 0;
|
|
18872
|
-
const gy = preset.gravity?.y ?? 9.81;
|
|
18873
|
-
const bodies = bodiesRef.current;
|
|
18874
|
-
const maxVel = Math.max(width, height) * 5;
|
|
18875
|
-
for (const body of bodies) {
|
|
18876
|
-
if (body.fixed) continue;
|
|
18877
|
-
body.vx += gx * dt;
|
|
18878
|
-
body.vy += gy * dt;
|
|
18879
|
-
body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
|
|
18880
|
-
body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
|
|
18881
|
-
body.x += body.vx * dt;
|
|
18882
|
-
body.y += body.vy * dt;
|
|
18883
|
-
if (body.y + body.radius > height) {
|
|
18884
|
-
body.y = height - body.radius;
|
|
18885
|
-
body.vy = -body.vy * 0.8;
|
|
18886
|
-
}
|
|
18887
|
-
if (body.y - body.radius < 0) {
|
|
18888
|
-
body.y = body.radius;
|
|
18889
|
-
body.vy = -body.vy * 0.8;
|
|
18890
|
-
}
|
|
18891
|
-
if (body.x + body.radius > width) {
|
|
18892
|
-
body.x = width - body.radius;
|
|
18893
|
-
body.vx = -body.vx * 0.8;
|
|
18894
|
-
}
|
|
18895
|
-
if (body.x - body.radius < 0) {
|
|
18896
|
-
body.x = body.radius;
|
|
18897
|
-
body.vx = -body.vx * 0.8;
|
|
18898
|
-
}
|
|
18899
|
-
}
|
|
18900
|
-
if (preset.constraints) {
|
|
18901
|
-
for (const c of preset.constraints) {
|
|
18902
|
-
const a = bodies[c.bodyA];
|
|
18903
|
-
const b = bodies[c.bodyB];
|
|
18904
|
-
if (!a || !b) continue;
|
|
18905
|
-
const dx = b.x - a.x;
|
|
18906
|
-
const dy = b.y - a.y;
|
|
18907
|
-
const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
|
|
18908
|
-
const diff = (dist - c.length) / dist;
|
|
18909
|
-
const fx = dx * diff * c.stiffness;
|
|
18910
|
-
const fy = dy * diff * c.stiffness;
|
|
18911
|
-
if (!a.fixed) {
|
|
18912
|
-
a.vx += fx * dt;
|
|
18913
|
-
a.vy += fy * dt;
|
|
18914
|
-
}
|
|
18915
|
-
if (!b.fixed) {
|
|
18916
|
-
b.vx -= fx * dt;
|
|
18917
|
-
b.vy -= fy * dt;
|
|
18918
|
-
}
|
|
18919
|
-
}
|
|
18920
|
-
}
|
|
18921
|
-
}, [preset, width, height, speed]);
|
|
18922
18871
|
const draw = useCallback(() => {
|
|
18923
18872
|
const canvas = canvasRef.current;
|
|
18924
18873
|
if (!canvas) return;
|
|
@@ -19020,21 +18969,8 @@ function SimulationCanvas({
|
|
|
19020
18969
|
return interp.startLoop(drawInterpolated);
|
|
19021
18970
|
}, [externalBodies !== void 0, interp.startLoop]);
|
|
19022
18971
|
useEffect(() => {
|
|
19023
|
-
if (externalBodies !== void 0) return;
|
|
19024
|
-
if (!running) return;
|
|
19025
|
-
let raf;
|
|
19026
|
-
const loop = () => {
|
|
19027
|
-
step();
|
|
19028
|
-
draw();
|
|
19029
|
-
raf = requestAnimationFrame(loop);
|
|
19030
|
-
};
|
|
19031
|
-
raf = requestAnimationFrame(loop);
|
|
19032
|
-
return () => cancelAnimationFrame(raf);
|
|
19033
|
-
}, [running, step, draw, externalBodies]);
|
|
19034
|
-
useEffect(() => {
|
|
19035
|
-
if (externalBodies !== void 0) return;
|
|
19036
18972
|
draw();
|
|
19037
|
-
}, [draw
|
|
18973
|
+
}, [draw]);
|
|
19038
18974
|
useEffect(() => {
|
|
19039
18975
|
if (typeof window === "undefined") return;
|
|
19040
18976
|
const canvas = canvasRef.current;
|
|
@@ -23050,9 +22986,9 @@ var init_BehaviorView = __esm({
|
|
|
23050
22986
|
}
|
|
23051
22987
|
});
|
|
23052
22988
|
|
|
23053
|
-
// node_modules/katex/dist/katex.min.css
|
|
22989
|
+
// node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
|
|
23054
22990
|
var init_katex_min = __esm({
|
|
23055
|
-
"node_modules/katex/dist/katex.min.css"() {
|
|
22991
|
+
"node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
|
|
23056
22992
|
}
|
|
23057
22993
|
});
|
|
23058
22994
|
var Tabs;
|
|
@@ -23366,7 +23302,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
23366
23302
|
}
|
|
23367
23303
|
return diff;
|
|
23368
23304
|
}
|
|
23369
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23305
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23370
23306
|
var init_CodeBlock = __esm({
|
|
23371
23307
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
23372
23308
|
init_cn();
|
|
@@ -23483,9 +23419,13 @@ var init_CodeBlock = __esm({
|
|
|
23483
23419
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
23484
23420
|
DIFF_STYLES = {
|
|
23485
23421
|
add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23422
|
+
added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23486
23423
|
remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23487
|
-
|
|
23424
|
+
removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23425
|
+
context: { bg: "", prefix: " ", text: "text-foreground" },
|
|
23426
|
+
unchanged: { bg: "", prefix: " ", text: "text-foreground" }
|
|
23488
23427
|
};
|
|
23428
|
+
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
23489
23429
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
23490
23430
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
23491
23431
|
CodeBlock = React107__default.memo(
|
|
@@ -23850,7 +23790,7 @@ var init_CodeBlock = __esm({
|
|
|
23850
23790
|
}
|
|
23851
23791
|
),
|
|
23852
23792
|
/* @__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) => {
|
|
23853
|
-
const style = DIFF_STYLES[line.type];
|
|
23793
|
+
const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
|
|
23854
23794
|
return /* @__PURE__ */ jsxs(HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
|
|
23855
23795
|
showLineNumbers && /* @__PURE__ */ jsx(
|
|
23856
23796
|
Typography,
|
|
@@ -26517,7 +26457,7 @@ var init_BookTableOfContents = __esm({
|
|
|
26517
26457
|
style: { direction },
|
|
26518
26458
|
children: [
|
|
26519
26459
|
/* @__PURE__ */ jsx(Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
|
|
26520
|
-
parts.map((part, partIdx) => {
|
|
26460
|
+
(Array.isArray(parts) ? parts : []).map((part, partIdx) => {
|
|
26521
26461
|
const chapters = Array.isArray(part.chapters) ? part.chapters : [];
|
|
26522
26462
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
26523
26463
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
|
|
@@ -40462,7 +40402,7 @@ var init_RichBlockEditor = __esm({
|
|
|
40462
40402
|
changeEvent,
|
|
40463
40403
|
readOnly = false,
|
|
40464
40404
|
placeholder,
|
|
40465
|
-
enableBlocks =
|
|
40405
|
+
enableBlocks = true,
|
|
40466
40406
|
showToolbar = true,
|
|
40467
40407
|
className
|
|
40468
40408
|
}) => {
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -5276,7 +5276,11 @@ var init_Switch = __esm({
|
|
|
5276
5276
|
disabled,
|
|
5277
5277
|
onClick: handleClick,
|
|
5278
5278
|
className: cn(
|
|
5279
|
-
|
|
5279
|
+
// Fixed rem sizes instead of spacing tokens: themes like atelier
|
|
5280
|
+
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
5281
|
+
// the thumb stuck near the left edge. The switch geometry must stay
|
|
5282
|
+
// proportional regardless of a theme's density scale.
|
|
5283
|
+
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
5280
5284
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5281
5285
|
isChecked ? "bg-primary" : "bg-muted",
|
|
5282
5286
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -5285,8 +5289,8 @@ var init_Switch = __esm({
|
|
|
5285
5289
|
"span",
|
|
5286
5290
|
{
|
|
5287
5291
|
className: cn(
|
|
5288
|
-
"pointer-events-none block h-
|
|
5289
|
-
isChecked ? "translate-x-
|
|
5292
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
5293
|
+
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
5290
5294
|
)
|
|
5291
5295
|
}
|
|
5292
5296
|
)
|
|
@@ -19246,8 +19250,6 @@ function SimulationCanvas({
|
|
|
19246
19250
|
preset: presetProp,
|
|
19247
19251
|
width = 600,
|
|
19248
19252
|
height = 400,
|
|
19249
|
-
running,
|
|
19250
|
-
speed = 1,
|
|
19251
19253
|
bodies: externalBodies,
|
|
19252
19254
|
className
|
|
19253
19255
|
}) {
|
|
@@ -19258,59 +19260,6 @@ function SimulationCanvas({
|
|
|
19258
19260
|
React105.useEffect(() => {
|
|
19259
19261
|
bodiesRef.current = structuredClone(preset.bodies);
|
|
19260
19262
|
}, [preset]);
|
|
19261
|
-
const step = React105.useCallback(() => {
|
|
19262
|
-
const dt = Math.min(1 / 60 * speed, 1 / 15);
|
|
19263
|
-
const gx = preset.gravity?.x ?? 0;
|
|
19264
|
-
const gy = preset.gravity?.y ?? 9.81;
|
|
19265
|
-
const bodies = bodiesRef.current;
|
|
19266
|
-
const maxVel = Math.max(width, height) * 5;
|
|
19267
|
-
for (const body of bodies) {
|
|
19268
|
-
if (body.fixed) continue;
|
|
19269
|
-
body.vx += gx * dt;
|
|
19270
|
-
body.vy += gy * dt;
|
|
19271
|
-
body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
|
|
19272
|
-
body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
|
|
19273
|
-
body.x += body.vx * dt;
|
|
19274
|
-
body.y += body.vy * dt;
|
|
19275
|
-
if (body.y + body.radius > height) {
|
|
19276
|
-
body.y = height - body.radius;
|
|
19277
|
-
body.vy = -body.vy * 0.8;
|
|
19278
|
-
}
|
|
19279
|
-
if (body.y - body.radius < 0) {
|
|
19280
|
-
body.y = body.radius;
|
|
19281
|
-
body.vy = -body.vy * 0.8;
|
|
19282
|
-
}
|
|
19283
|
-
if (body.x + body.radius > width) {
|
|
19284
|
-
body.x = width - body.radius;
|
|
19285
|
-
body.vx = -body.vx * 0.8;
|
|
19286
|
-
}
|
|
19287
|
-
if (body.x - body.radius < 0) {
|
|
19288
|
-
body.x = body.radius;
|
|
19289
|
-
body.vx = -body.vx * 0.8;
|
|
19290
|
-
}
|
|
19291
|
-
}
|
|
19292
|
-
if (preset.constraints) {
|
|
19293
|
-
for (const c of preset.constraints) {
|
|
19294
|
-
const a = bodies[c.bodyA];
|
|
19295
|
-
const b = bodies[c.bodyB];
|
|
19296
|
-
if (!a || !b) continue;
|
|
19297
|
-
const dx = b.x - a.x;
|
|
19298
|
-
const dy = b.y - a.y;
|
|
19299
|
-
const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
|
|
19300
|
-
const diff = (dist - c.length) / dist;
|
|
19301
|
-
const fx = dx * diff * c.stiffness;
|
|
19302
|
-
const fy = dy * diff * c.stiffness;
|
|
19303
|
-
if (!a.fixed) {
|
|
19304
|
-
a.vx += fx * dt;
|
|
19305
|
-
a.vy += fy * dt;
|
|
19306
|
-
}
|
|
19307
|
-
if (!b.fixed) {
|
|
19308
|
-
b.vx -= fx * dt;
|
|
19309
|
-
b.vy -= fy * dt;
|
|
19310
|
-
}
|
|
19311
|
-
}
|
|
19312
|
-
}
|
|
19313
|
-
}, [preset, width, height, speed]);
|
|
19314
19263
|
const draw = React105.useCallback(() => {
|
|
19315
19264
|
const canvas = canvasRef.current;
|
|
19316
19265
|
if (!canvas) return;
|
|
@@ -19412,21 +19361,8 @@ function SimulationCanvas({
|
|
|
19412
19361
|
return interp.startLoop(drawInterpolated);
|
|
19413
19362
|
}, [externalBodies !== void 0, interp.startLoop]);
|
|
19414
19363
|
React105.useEffect(() => {
|
|
19415
|
-
if (externalBodies !== void 0) return;
|
|
19416
|
-
if (!running) return;
|
|
19417
|
-
let raf;
|
|
19418
|
-
const loop = () => {
|
|
19419
|
-
step();
|
|
19420
|
-
draw();
|
|
19421
|
-
raf = requestAnimationFrame(loop);
|
|
19422
|
-
};
|
|
19423
|
-
raf = requestAnimationFrame(loop);
|
|
19424
|
-
return () => cancelAnimationFrame(raf);
|
|
19425
|
-
}, [running, step, draw, externalBodies]);
|
|
19426
|
-
React105.useEffect(() => {
|
|
19427
|
-
if (externalBodies !== void 0) return;
|
|
19428
19364
|
draw();
|
|
19429
|
-
}, [draw
|
|
19365
|
+
}, [draw]);
|
|
19430
19366
|
React105.useEffect(() => {
|
|
19431
19367
|
if (typeof window === "undefined") return;
|
|
19432
19368
|
const canvas = canvasRef.current;
|
|
@@ -23059,9 +22995,9 @@ var init_BehaviorView = __esm({
|
|
|
23059
22995
|
}
|
|
23060
22996
|
});
|
|
23061
22997
|
|
|
23062
|
-
// node_modules/katex/dist/katex.min.css
|
|
22998
|
+
// node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
|
|
23063
22999
|
var init_katex_min = __esm({
|
|
23064
|
-
"node_modules/katex/dist/katex.min.css"() {
|
|
23000
|
+
"node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
|
|
23065
23001
|
}
|
|
23066
23002
|
});
|
|
23067
23003
|
var Tabs;
|
|
@@ -23375,7 +23311,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
23375
23311
|
}
|
|
23376
23312
|
return diff;
|
|
23377
23313
|
}
|
|
23378
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23314
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23379
23315
|
var init_CodeBlock = __esm({
|
|
23380
23316
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
23381
23317
|
init_cn();
|
|
@@ -23492,9 +23428,13 @@ var init_CodeBlock = __esm({
|
|
|
23492
23428
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
23493
23429
|
DIFF_STYLES = {
|
|
23494
23430
|
add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23431
|
+
added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23495
23432
|
remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23496
|
-
|
|
23433
|
+
removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23434
|
+
context: { bg: "", prefix: " ", text: "text-foreground" },
|
|
23435
|
+
unchanged: { bg: "", prefix: " ", text: "text-foreground" }
|
|
23497
23436
|
};
|
|
23437
|
+
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
23498
23438
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
23499
23439
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
23500
23440
|
CodeBlock = React105__namespace.default.memo(
|
|
@@ -23859,7 +23799,7 @@ var init_CodeBlock = __esm({
|
|
|
23859
23799
|
}
|
|
23860
23800
|
),
|
|
23861
23801
|
/* @__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) => {
|
|
23862
|
-
const style = DIFF_STYLES[line.type];
|
|
23802
|
+
const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
|
|
23863
23803
|
return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
|
|
23864
23804
|
showLineNumbers && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23865
23805
|
Typography,
|
|
@@ -26476,7 +26416,7 @@ var init_BookTableOfContents = __esm({
|
|
|
26476
26416
|
style: { direction },
|
|
26477
26417
|
children: [
|
|
26478
26418
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
|
|
26479
|
-
parts.map((part, partIdx) => {
|
|
26419
|
+
(Array.isArray(parts) ? parts : []).map((part, partIdx) => {
|
|
26480
26420
|
const chapters = Array.isArray(part.chapters) ? part.chapters : [];
|
|
26481
26421
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
|
|
26482
26422
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", children: [
|
|
@@ -40138,7 +40078,7 @@ var init_RichBlockEditor = __esm({
|
|
|
40138
40078
|
changeEvent,
|
|
40139
40079
|
readOnly = false,
|
|
40140
40080
|
placeholder,
|
|
40141
|
-
enableBlocks =
|
|
40081
|
+
enableBlocks = true,
|
|
40142
40082
|
showToolbar = true,
|
|
40143
40083
|
className
|
|
40144
40084
|
}) => {
|
package/dist/runtime/index.css
CHANGED
|
@@ -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.
|
|
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;
|
package/dist/runtime/index.js
CHANGED
|
@@ -5231,7 +5231,11 @@ var init_Switch = __esm({
|
|
|
5231
5231
|
disabled,
|
|
5232
5232
|
onClick: handleClick,
|
|
5233
5233
|
className: cn(
|
|
5234
|
-
|
|
5234
|
+
// Fixed rem sizes instead of spacing tokens: themes like atelier
|
|
5235
|
+
// redefine --space-11 to 68px, which makes w-11 enormous and leaves
|
|
5236
|
+
// the thumb stuck near the left edge. The switch geometry must stay
|
|
5237
|
+
// proportional regardless of a theme's density scale.
|
|
5238
|
+
"relative inline-flex h-[1.5rem] w-[2.75rem] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
5235
5239
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5236
5240
|
isChecked ? "bg-primary" : "bg-muted",
|
|
5237
5241
|
disabled && "cursor-not-allowed opacity-50"
|
|
@@ -5240,8 +5244,8 @@ var init_Switch = __esm({
|
|
|
5240
5244
|
"span",
|
|
5241
5245
|
{
|
|
5242
5246
|
className: cn(
|
|
5243
|
-
"pointer-events-none block h-
|
|
5244
|
-
isChecked ? "translate-x-
|
|
5247
|
+
"pointer-events-none block h-[1.25rem] w-[1.25rem] rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
5248
|
+
isChecked ? "translate-x-[1.25rem]" : "translate-x-0"
|
|
5245
5249
|
)
|
|
5246
5250
|
}
|
|
5247
5251
|
)
|
|
@@ -19201,8 +19205,6 @@ function SimulationCanvas({
|
|
|
19201
19205
|
preset: presetProp,
|
|
19202
19206
|
width = 600,
|
|
19203
19207
|
height = 400,
|
|
19204
|
-
running,
|
|
19205
|
-
speed = 1,
|
|
19206
19208
|
bodies: externalBodies,
|
|
19207
19209
|
className
|
|
19208
19210
|
}) {
|
|
@@ -19213,59 +19215,6 @@ function SimulationCanvas({
|
|
|
19213
19215
|
useEffect(() => {
|
|
19214
19216
|
bodiesRef.current = structuredClone(preset.bodies);
|
|
19215
19217
|
}, [preset]);
|
|
19216
|
-
const step = useCallback(() => {
|
|
19217
|
-
const dt = Math.min(1 / 60 * speed, 1 / 15);
|
|
19218
|
-
const gx = preset.gravity?.x ?? 0;
|
|
19219
|
-
const gy = preset.gravity?.y ?? 9.81;
|
|
19220
|
-
const bodies = bodiesRef.current;
|
|
19221
|
-
const maxVel = Math.max(width, height) * 5;
|
|
19222
|
-
for (const body of bodies) {
|
|
19223
|
-
if (body.fixed) continue;
|
|
19224
|
-
body.vx += gx * dt;
|
|
19225
|
-
body.vy += gy * dt;
|
|
19226
|
-
body.vx = Math.max(-maxVel, Math.min(maxVel, body.vx));
|
|
19227
|
-
body.vy = Math.max(-maxVel, Math.min(maxVel, body.vy));
|
|
19228
|
-
body.x += body.vx * dt;
|
|
19229
|
-
body.y += body.vy * dt;
|
|
19230
|
-
if (body.y + body.radius > height) {
|
|
19231
|
-
body.y = height - body.radius;
|
|
19232
|
-
body.vy = -body.vy * 0.8;
|
|
19233
|
-
}
|
|
19234
|
-
if (body.y - body.radius < 0) {
|
|
19235
|
-
body.y = body.radius;
|
|
19236
|
-
body.vy = -body.vy * 0.8;
|
|
19237
|
-
}
|
|
19238
|
-
if (body.x + body.radius > width) {
|
|
19239
|
-
body.x = width - body.radius;
|
|
19240
|
-
body.vx = -body.vx * 0.8;
|
|
19241
|
-
}
|
|
19242
|
-
if (body.x - body.radius < 0) {
|
|
19243
|
-
body.x = body.radius;
|
|
19244
|
-
body.vx = -body.vx * 0.8;
|
|
19245
|
-
}
|
|
19246
|
-
}
|
|
19247
|
-
if (preset.constraints) {
|
|
19248
|
-
for (const c of preset.constraints) {
|
|
19249
|
-
const a = bodies[c.bodyA];
|
|
19250
|
-
const b = bodies[c.bodyB];
|
|
19251
|
-
if (!a || !b) continue;
|
|
19252
|
-
const dx = b.x - a.x;
|
|
19253
|
-
const dy = b.y - a.y;
|
|
19254
|
-
const dist = Math.sqrt(dx * dx + dy * dy) || 1e-3;
|
|
19255
|
-
const diff = (dist - c.length) / dist;
|
|
19256
|
-
const fx = dx * diff * c.stiffness;
|
|
19257
|
-
const fy = dy * diff * c.stiffness;
|
|
19258
|
-
if (!a.fixed) {
|
|
19259
|
-
a.vx += fx * dt;
|
|
19260
|
-
a.vy += fy * dt;
|
|
19261
|
-
}
|
|
19262
|
-
if (!b.fixed) {
|
|
19263
|
-
b.vx -= fx * dt;
|
|
19264
|
-
b.vy -= fy * dt;
|
|
19265
|
-
}
|
|
19266
|
-
}
|
|
19267
|
-
}
|
|
19268
|
-
}, [preset, width, height, speed]);
|
|
19269
19218
|
const draw = useCallback(() => {
|
|
19270
19219
|
const canvas = canvasRef.current;
|
|
19271
19220
|
if (!canvas) return;
|
|
@@ -19367,21 +19316,8 @@ function SimulationCanvas({
|
|
|
19367
19316
|
return interp.startLoop(drawInterpolated);
|
|
19368
19317
|
}, [externalBodies !== void 0, interp.startLoop]);
|
|
19369
19318
|
useEffect(() => {
|
|
19370
|
-
if (externalBodies !== void 0) return;
|
|
19371
|
-
if (!running) return;
|
|
19372
|
-
let raf;
|
|
19373
|
-
const loop = () => {
|
|
19374
|
-
step();
|
|
19375
|
-
draw();
|
|
19376
|
-
raf = requestAnimationFrame(loop);
|
|
19377
|
-
};
|
|
19378
|
-
raf = requestAnimationFrame(loop);
|
|
19379
|
-
return () => cancelAnimationFrame(raf);
|
|
19380
|
-
}, [running, step, draw, externalBodies]);
|
|
19381
|
-
useEffect(() => {
|
|
19382
|
-
if (externalBodies !== void 0) return;
|
|
19383
19319
|
draw();
|
|
19384
|
-
}, [draw
|
|
19320
|
+
}, [draw]);
|
|
19385
19321
|
useEffect(() => {
|
|
19386
19322
|
if (typeof window === "undefined") return;
|
|
19387
19323
|
const canvas = canvasRef.current;
|
|
@@ -23014,9 +22950,9 @@ var init_BehaviorView = __esm({
|
|
|
23014
22950
|
}
|
|
23015
22951
|
});
|
|
23016
22952
|
|
|
23017
|
-
// node_modules/katex/dist/katex.min.css
|
|
22953
|
+
// node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css
|
|
23018
22954
|
var init_katex_min = __esm({
|
|
23019
|
-
"node_modules/katex/dist/katex.min.css"() {
|
|
22955
|
+
"node_modules/.pnpm/katex@0.16.47/node_modules/katex/dist/katex.min.css"() {
|
|
23020
22956
|
}
|
|
23021
22957
|
});
|
|
23022
22958
|
var Tabs;
|
|
@@ -23330,7 +23266,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
23330
23266
|
}
|
|
23331
23267
|
return diff;
|
|
23332
23268
|
}
|
|
23333
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23269
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
23334
23270
|
var init_CodeBlock = __esm({
|
|
23335
23271
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
23336
23272
|
init_cn();
|
|
@@ -23447,9 +23383,13 @@ var init_CodeBlock = __esm({
|
|
|
23447
23383
|
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
23448
23384
|
DIFF_STYLES = {
|
|
23449
23385
|
add: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23386
|
+
added: { bg: "bg-success/10", prefix: "+", text: "text-success" },
|
|
23450
23387
|
remove: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23451
|
-
|
|
23388
|
+
removed: { bg: "bg-error/10", prefix: "-", text: "text-error" },
|
|
23389
|
+
context: { bg: "", prefix: " ", text: "text-foreground" },
|
|
23390
|
+
unchanged: { bg: "", prefix: " ", text: "text-foreground" }
|
|
23452
23391
|
};
|
|
23392
|
+
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
23453
23393
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
23454
23394
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
23455
23395
|
CodeBlock = React105__default.memo(
|
|
@@ -23814,7 +23754,7 @@ var init_CodeBlock = __esm({
|
|
|
23814
23754
|
}
|
|
23815
23755
|
),
|
|
23816
23756
|
/* @__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) => {
|
|
23817
|
-
const style = DIFF_STYLES[line.type];
|
|
23757
|
+
const style = DIFF_STYLES[line.type] ?? DIFF_STYLE_FALLBACK;
|
|
23818
23758
|
return /* @__PURE__ */ jsxs(HStack, { gap: "none", align: "start", className: cn(style.bg, "px-4 py-0.5"), children: [
|
|
23819
23759
|
showLineNumbers && /* @__PURE__ */ jsx(
|
|
23820
23760
|
Typography,
|
|
@@ -26431,7 +26371,7 @@ var init_BookTableOfContents = __esm({
|
|
|
26431
26371
|
style: { direction },
|
|
26432
26372
|
children: [
|
|
26433
26373
|
/* @__PURE__ */ jsx(Typography, { variant: "h1", className: "text-3xl font-bold text-center mb-4", children: t("book.tableOfContents") }),
|
|
26434
|
-
parts.map((part, partIdx) => {
|
|
26374
|
+
(Array.isArray(parts) ? parts : []).map((part, partIdx) => {
|
|
26435
26375
|
const chapters = Array.isArray(part.chapters) ? part.chapters : [];
|
|
26436
26376
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
26437
26377
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", children: [
|
|
@@ -40093,7 +40033,7 @@ var init_RichBlockEditor = __esm({
|
|
|
40093
40033
|
changeEvent,
|
|
40094
40034
|
readOnly = false,
|
|
40095
40035
|
placeholder,
|
|
40096
|
-
enableBlocks =
|
|
40036
|
+
enableBlocks = true,
|
|
40097
40037
|
showToolbar = true,
|
|
40098
40038
|
className
|
|
40099
40039
|
}) => {
|