@almadar/ui 5.43.0 → 5.45.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.
@@ -46217,133 +46217,6 @@ var init_SimulationCanvas = __esm({
46217
46217
  SimulationCanvas.displayName = "SimulationCanvas";
46218
46218
  }
46219
46219
  });
46220
- function SimulationControls({
46221
- running,
46222
- speed,
46223
- parameters,
46224
- onPlay,
46225
- onPause,
46226
- onStep,
46227
- onReset,
46228
- onSpeedChange,
46229
- onParameterChange,
46230
- className
46231
- }) {
46232
- return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "md", className, children: [
46233
- /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", children: [
46234
- running ? /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "secondary", onClick: onPause, icon: LucideIcons2.Pause, children: "Pause" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "primary", onClick: onPlay, icon: LucideIcons2.Play, children: "Play" }),
46235
- /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "ghost", onClick: onStep, icon: LucideIcons2.SkipForward, disabled: running, children: "Step" }),
46236
- /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "ghost", onClick: onReset, icon: LucideIcons2.RotateCcw, children: "Reset" })
46237
- ] }),
46238
- /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
46239
- /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "muted", children: [
46240
- "Speed: ",
46241
- speed.toFixed(1),
46242
- "x"
46243
- ] }),
46244
- /* @__PURE__ */ jsxRuntime.jsx(
46245
- "input",
46246
- {
46247
- type: "range",
46248
- min: 0.1,
46249
- max: 5,
46250
- step: 0.1,
46251
- value: speed,
46252
- onChange: (e) => onSpeedChange(parseFloat(e.target.value)),
46253
- className: "w-full"
46254
- }
46255
- )
46256
- ] }),
46257
- Object.entries(parameters).map(([name, param]) => /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
46258
- /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "muted", children: [
46259
- param.label,
46260
- ": ",
46261
- param.value.toFixed(2)
46262
- ] }),
46263
- /* @__PURE__ */ jsxRuntime.jsx(
46264
- "input",
46265
- {
46266
- type: "range",
46267
- min: param.min,
46268
- max: param.max,
46269
- step: param.step,
46270
- value: param.value,
46271
- onChange: (e) => onParameterChange(name, parseFloat(e.target.value)),
46272
- className: "w-full"
46273
- }
46274
- )
46275
- ] }, name))
46276
- ] });
46277
- }
46278
- var init_SimulationControls = __esm({
46279
- "components/game/organisms/physics-sim/SimulationControls.tsx"() {
46280
- init_atoms2();
46281
- SimulationControls.displayName = "SimulationControls";
46282
- }
46283
- });
46284
- function SimulationGraph({
46285
- label,
46286
- unit,
46287
- data,
46288
- maxPoints = 200,
46289
- width = 300,
46290
- height = 120,
46291
- color = "#e94560",
46292
- className
46293
- }) {
46294
- const canvasRef = React77.useRef(null);
46295
- const visibleData = data.slice(-maxPoints);
46296
- React77.useEffect(() => {
46297
- const canvas = canvasRef.current;
46298
- if (!canvas || visibleData.length < 2) return;
46299
- const ctx = canvas.getContext("2d");
46300
- if (!ctx) return;
46301
- ctx.clearRect(0, 0, width, height);
46302
- ctx.fillStyle = "#0f0f23";
46303
- ctx.fillRect(0, 0, width, height);
46304
- ctx.strokeStyle = "#1a1a3e";
46305
- ctx.lineWidth = 0.5;
46306
- for (let i = 0; i < 5; i++) {
46307
- const y = height / 5 * i;
46308
- ctx.beginPath();
46309
- ctx.moveTo(0, y);
46310
- ctx.lineTo(width, y);
46311
- ctx.stroke();
46312
- }
46313
- let minVal = Infinity;
46314
- let maxVal = -Infinity;
46315
- for (const pt of visibleData) {
46316
- if (pt.value < minVal) minVal = pt.value;
46317
- if (pt.value > maxVal) maxVal = pt.value;
46318
- }
46319
- const range = maxVal - minVal || 1;
46320
- const pad = height * 0.1;
46321
- ctx.beginPath();
46322
- ctx.strokeStyle = color;
46323
- ctx.lineWidth = 2;
46324
- for (let i = 0; i < visibleData.length; i++) {
46325
- const x = i / (maxPoints - 1) * width;
46326
- const y = pad + (maxVal - visibleData[i].value) / range * (height - 2 * pad);
46327
- if (i === 0) ctx.moveTo(x, y);
46328
- else ctx.lineTo(x, y);
46329
- }
46330
- ctx.stroke();
46331
- const last = visibleData[visibleData.length - 1];
46332
- ctx.fillStyle = color;
46333
- ctx.font = "12px monospace";
46334
- ctx.fillText(`${last.value.toFixed(2)} ${unit}`, width - 80, 16);
46335
- }, [visibleData, width, height, color, unit, maxPoints]);
46336
- return /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { padding: "sm", className, children: /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
46337
- /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", weight: "bold", children: label }),
46338
- /* @__PURE__ */ jsxRuntime.jsx("canvas", { ref: canvasRef, width, height, className: "rounded" })
46339
- ] }) });
46340
- }
46341
- var init_SimulationGraph = __esm({
46342
- "components/game/organisms/physics-sim/SimulationGraph.tsx"() {
46343
- init_atoms2();
46344
- SimulationGraph.displayName = "SimulationGraph";
46345
- }
46346
- });
46347
46220
  function SimulatorBoard({
46348
46221
  entity,
46349
46222
  completeEvent = "PUZZLE_COMPLETE",
@@ -48877,7 +48750,6 @@ var init_component_registry_generated = __esm({
48877
48750
  init_Navigation();
48878
48751
  init_NegotiatorBoard();
48879
48752
  init_NumberStepper();
48880
- init_ObjectRulePanel();
48881
48753
  init_OptionConstraintGroup();
48882
48754
  init_OrbitalVisualization();
48883
48755
  init_Overlay();
@@ -48908,7 +48780,6 @@ var init_component_registry_generated = __esm({
48908
48780
  init_ResourceBar();
48909
48781
  init_ResourceCounter();
48910
48782
  init_RichBlockEditor();
48911
- init_RuleEditor();
48912
48783
  init_RuntimeDebugger2();
48913
48784
  init_ScaledDiagram();
48914
48785
  init_ScoreBoard();
@@ -48928,8 +48799,6 @@ var init_component_registry_generated = __esm({
48928
48799
  init_SignaturePad();
48929
48800
  init_SimpleGrid();
48930
48801
  init_SimulationCanvas();
48931
- init_SimulationControls();
48932
- init_SimulationGraph();
48933
48802
  init_SimulatorBoard();
48934
48803
  init_Skeleton();
48935
48804
  init_SocialProof();
@@ -48947,7 +48816,6 @@ var init_component_registry_generated = __esm({
48947
48816
  init_StateArchitectBoard();
48948
48817
  init_StateIndicator();
48949
48818
  init_StateMachineView();
48950
- init_StateNode();
48951
48819
  init_StatsGrid();
48952
48820
  init_StatsOrganism();
48953
48821
  init_StatusDot();
@@ -48986,8 +48854,6 @@ var init_component_registry_generated = __esm({
48986
48854
  init_Tooltip();
48987
48855
  init_TraitFrame();
48988
48856
  init_TraitSlot();
48989
- init_TraitStateViewer();
48990
- init_TransitionArrow();
48991
48857
  init_TrendIndicator();
48992
48858
  init_TurnIndicator();
48993
48859
  init_TurnPanel();
@@ -48997,7 +48863,6 @@ var init_component_registry_generated = __esm({
48997
48863
  init_UncontrolledBattleBoard();
48998
48864
  init_UnitCommandBar();
48999
48865
  init_UploadDropZone();
49000
- init_VariablePanel();
49001
48866
  init_VersionDiff();
49002
48867
  init_ViolationAlert();
49003
48868
  init_VoteStack();
@@ -49207,7 +49072,6 @@ var init_component_registry_generated = __esm({
49207
49072
  "Navigation": exports.Navigation,
49208
49073
  "NegotiatorBoard": NegotiatorBoard,
49209
49074
  "NumberStepper": exports.NumberStepper,
49210
- "ObjectRulePanel": ObjectRulePanel,
49211
49075
  "OptionConstraintGroup": exports.OptionConstraintGroup,
49212
49076
  "OrbitalVisualization": exports.OrbitalVisualization,
49213
49077
  "Overlay": exports.Overlay,
@@ -49238,7 +49102,6 @@ var init_component_registry_generated = __esm({
49238
49102
  "ResourceBar": ResourceBar,
49239
49103
  "ResourceCounter": ResourceCounter,
49240
49104
  "RichBlockEditor": exports.RichBlockEditor,
49241
- "RuleEditor": RuleEditor,
49242
49105
  "RuntimeDebugger": RuntimeDebugger,
49243
49106
  "ScaledDiagram": exports.ScaledDiagram,
49244
49107
  "ScoreBoard": ScoreBoard,
@@ -49258,8 +49121,6 @@ var init_component_registry_generated = __esm({
49258
49121
  "SignaturePad": exports.SignaturePad,
49259
49122
  "SimpleGrid": exports.SimpleGrid,
49260
49123
  "SimulationCanvas": SimulationCanvas,
49261
- "SimulationControls": SimulationControls,
49262
- "SimulationGraph": SimulationGraph,
49263
49124
  "SimulatorBoard": SimulatorBoard,
49264
49125
  "Skeleton": Skeleton,
49265
49126
  "SocialProof": exports.SocialProof,
@@ -49280,7 +49141,6 @@ var init_component_registry_generated = __esm({
49280
49141
  "StateArchitectBoard": StateArchitectBoard,
49281
49142
  "StateIndicator": StateIndicator,
49282
49143
  "StateMachineView": exports.StateMachineView,
49283
- "StateNode": StateNode2,
49284
49144
  "StatsGrid": exports.StatsGrid,
49285
49145
  "StatsOrganism": exports.StatsOrganism,
49286
49146
  "StatusDot": exports.StatusDot,
@@ -49319,8 +49179,6 @@ var init_component_registry_generated = __esm({
49319
49179
  "Tooltip": exports.Tooltip,
49320
49180
  "TraitFrame": TraitFrame,
49321
49181
  "TraitSlot": TraitSlot,
49322
- "TraitStateViewer": TraitStateViewer,
49323
- "TransitionArrow": TransitionArrow,
49324
49182
  "TrendIndicator": exports.TrendIndicator,
49325
49183
  "TurnIndicator": TurnIndicator,
49326
49184
  "TurnPanel": TurnPanel,
@@ -49331,7 +49189,6 @@ var init_component_registry_generated = __esm({
49331
49189
  "UnitCommandBar": UnitCommandBar,
49332
49190
  "UploadDropZone": exports.UploadDropZone,
49333
49191
  "VStack": exports.VStack,
49334
- "VariablePanel": VariablePanel,
49335
49192
  "VersionDiff": exports.VersionDiff,
49336
49193
  "ViolationAlert": exports.ViolationAlert,
49337
49194
  "VoteStack": exports.VoteStack,
@@ -51095,8 +50952,131 @@ init_NegotiatorBoard();
51095
50952
 
51096
50953
  // components/game/organisms/physics-sim/index.ts
51097
50954
  init_SimulationCanvas();
51098
- init_SimulationControls();
51099
- init_SimulationGraph();
50955
+
50956
+ // components/game/organisms/physics-sim/SimulationControls.tsx
50957
+ init_atoms2();
50958
+ function SimulationControls({
50959
+ running,
50960
+ speed,
50961
+ parameters,
50962
+ onPlay,
50963
+ onPause,
50964
+ onStep,
50965
+ onReset,
50966
+ onSpeedChange,
50967
+ onParameterChange,
50968
+ className
50969
+ }) {
50970
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "md", className, children: [
50971
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "center", children: [
50972
+ running ? /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "secondary", onClick: onPause, icon: LucideIcons2.Pause, children: "Pause" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "primary", onClick: onPlay, icon: LucideIcons2.Play, children: "Play" }),
50973
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "ghost", onClick: onStep, icon: LucideIcons2.SkipForward, disabled: running, children: "Step" }),
50974
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Button, { size: "sm", variant: "ghost", onClick: onReset, icon: LucideIcons2.RotateCcw, children: "Reset" })
50975
+ ] }),
50976
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
50977
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "muted", children: [
50978
+ "Speed: ",
50979
+ speed.toFixed(1),
50980
+ "x"
50981
+ ] }),
50982
+ /* @__PURE__ */ jsxRuntime.jsx(
50983
+ "input",
50984
+ {
50985
+ type: "range",
50986
+ min: 0.1,
50987
+ max: 5,
50988
+ step: 0.1,
50989
+ value: speed,
50990
+ onChange: (e) => onSpeedChange(parseFloat(e.target.value)),
50991
+ className: "w-full"
50992
+ }
50993
+ )
50994
+ ] }),
50995
+ Object.entries(parameters).map(([name, param]) => /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
50996
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "caption", color: "muted", children: [
50997
+ param.label,
50998
+ ": ",
50999
+ param.value.toFixed(2)
51000
+ ] }),
51001
+ /* @__PURE__ */ jsxRuntime.jsx(
51002
+ "input",
51003
+ {
51004
+ type: "range",
51005
+ min: param.min,
51006
+ max: param.max,
51007
+ step: param.step,
51008
+ value: param.value,
51009
+ onChange: (e) => onParameterChange(name, parseFloat(e.target.value)),
51010
+ className: "w-full"
51011
+ }
51012
+ )
51013
+ ] }, name))
51014
+ ] });
51015
+ }
51016
+ SimulationControls.displayName = "SimulationControls";
51017
+
51018
+ // components/game/organisms/physics-sim/SimulationGraph.tsx
51019
+ init_atoms2();
51020
+ function SimulationGraph({
51021
+ label,
51022
+ unit,
51023
+ data,
51024
+ maxPoints = 200,
51025
+ width = 300,
51026
+ height = 120,
51027
+ color = "#e94560",
51028
+ className
51029
+ }) {
51030
+ const canvasRef = React77.useRef(null);
51031
+ const visibleData = data.slice(-maxPoints);
51032
+ React77.useEffect(() => {
51033
+ const canvas = canvasRef.current;
51034
+ if (!canvas || visibleData.length < 2) return;
51035
+ const ctx = canvas.getContext("2d");
51036
+ if (!ctx) return;
51037
+ ctx.clearRect(0, 0, width, height);
51038
+ ctx.fillStyle = "#0f0f23";
51039
+ ctx.fillRect(0, 0, width, height);
51040
+ ctx.strokeStyle = "#1a1a3e";
51041
+ ctx.lineWidth = 0.5;
51042
+ for (let i = 0; i < 5; i++) {
51043
+ const y = height / 5 * i;
51044
+ ctx.beginPath();
51045
+ ctx.moveTo(0, y);
51046
+ ctx.lineTo(width, y);
51047
+ ctx.stroke();
51048
+ }
51049
+ let minVal = Infinity;
51050
+ let maxVal = -Infinity;
51051
+ for (const pt of visibleData) {
51052
+ if (pt.value < minVal) minVal = pt.value;
51053
+ if (pt.value > maxVal) maxVal = pt.value;
51054
+ }
51055
+ const range = maxVal - minVal || 1;
51056
+ const pad = height * 0.1;
51057
+ ctx.beginPath();
51058
+ ctx.strokeStyle = color;
51059
+ ctx.lineWidth = 2;
51060
+ for (let i = 0; i < visibleData.length; i++) {
51061
+ const x = i / (maxPoints - 1) * width;
51062
+ const y = pad + (maxVal - visibleData[i].value) / range * (height - 2 * pad);
51063
+ if (i === 0) ctx.moveTo(x, y);
51064
+ else ctx.lineTo(x, y);
51065
+ }
51066
+ ctx.stroke();
51067
+ const last = visibleData[visibleData.length - 1];
51068
+ ctx.fillStyle = color;
51069
+ ctx.font = "12px monospace";
51070
+ ctx.fillText(`${last.value.toFixed(2)} ${unit}`, width - 80, 16);
51071
+ }, [visibleData, width, height, color, unit, maxPoints]);
51072
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.Card, { padding: "sm", className, children: /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "xs", children: [
51073
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", weight: "bold", children: label }),
51074
+ /* @__PURE__ */ jsxRuntime.jsx("canvas", { ref: canvasRef, width, height, className: "rounded" })
51075
+ ] }) });
51076
+ }
51077
+ SimulationGraph.displayName = "SimulationGraph";
51078
+
51079
+ // components/game/organisms/physics-sim/index.ts
51100
51080
  init_presets();
51101
51081
 
51102
51082
  // components/game/organisms/types/game.ts