@almadar/ui 5.164.0 → 5.166.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.
@@ -25657,6 +25657,8 @@ function FieldControl({
25657
25657
  control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
25658
25658
  } else if (core.isSecretConfigType(decl.type)) {
25659
25659
  control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: false, secret: true, value, onCommit: onChange });
25660
+ } else if (decl.type === "event") {
25661
+ control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
25660
25662
  } else if (decl.type === "string") {
25661
25663
  control = /* @__PURE__ */ jsxRuntime.jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
25662
25664
  } else if (decl.type === "node") {
@@ -25696,7 +25698,7 @@ var init_PropertyInspector = __esm({
25696
25698
  init_JsonTreeEditor();
25697
25699
  init_NodeSlotEditor();
25698
25700
  TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
25699
- SCALAR_TYPES = /* @__PURE__ */ new Set(["string", "number", "boolean", "icon", "asset", "Asset", "secret"]);
25701
+ SCALAR_TYPES = /* @__PURE__ */ new Set(["string", "number", "boolean", "icon", "asset", "Asset", "secret", "event"]);
25700
25702
  exports.PropertyInspector = ({
25701
25703
  config,
25702
25704
  values,
@@ -2377,7 +2377,7 @@ type MenuOption = EventPayload & {
2377
2377
  /** Display label */
2378
2378
  label: string;
2379
2379
  /** Event to emit on click */
2380
- event?: string;
2380
+ event?: EventKey;
2381
2381
  /** Page to navigate to */
2382
2382
  navigatesTo?: string;
2383
2383
  /** Button variant */
@@ -2386,8 +2386,6 @@ type MenuOption = EventPayload & {
2386
2386
  disabled?: boolean;
2387
2387
  /** Sub-label or description */
2388
2388
  subLabel?: string;
2389
- /** Action identifier (alternative to event) */
2390
- action?: EventKey;
2391
2389
  };
2392
2390
  interface GameMenuProps {
2393
2391
  /** Menu title */
@@ -4144,7 +4142,7 @@ interface ActionButton {
4144
4142
  label: string;
4145
4143
  /** Action type - 'submit' renders as submit button, others render as button */
4146
4144
  actionType?: string;
4147
- event?: string;
4145
+ event?: EventKey;
4148
4146
  navigatesTo?: string;
4149
4147
  /** Button variant - matches Button component variants. Accepts string for schema compatibility. */
4150
4148
  variant?: string;
@@ -4353,7 +4351,7 @@ interface FloatingAction {
4353
4351
  */
4354
4352
  onClick?: () => void;
4355
4353
  /** Event name to emit when clicked (for trait state machine integration) */
4356
- event?: string;
4354
+ event?: EventKey;
4357
4355
  /**
4358
4356
  * Action variant
4359
4357
  */
@@ -4503,7 +4501,7 @@ interface MenuItem {
4503
4501
  /** Item click handler */
4504
4502
  onClick?: () => void;
4505
4503
  /** Event name for pattern compatibility */
4506
- event?: string;
4504
+ event?: EventKey;
4507
4505
  /** File URL this item downloads on pick (gesture-driven, `DocumentViewer` precedent). The item's `event` still emits on the bus. */
4508
4506
  url?: string;
4509
4507
  /** Variant for styling (pattern compatibility) */
@@ -5039,7 +5037,7 @@ interface TabItem {
5039
5037
  /** Disable tab */
5040
5038
  disabled?: boolean;
5041
5039
  /** Event to emit when tab is clicked (for trait state machine integration) */
5042
- event?: string;
5040
+ event?: EventKey;
5043
5041
  /** Whether this tab is currently active (for controlled tabs) */
5044
5042
  active?: boolean;
5045
5043
  }
@@ -5330,6 +5328,7 @@ type CodeLanguageLoader = (lang: string) => Promise<PrismLanguageGrammar | null>
5330
5328
  /** Wire up a dynamic language-grammar loader. Must be called from app source
5331
5329
  * (not a pre-bundled dependency) so the bundler can split grammars into chunks. */
5332
5330
  declare function registerCodeLanguageLoader(loader: CodeLanguageLoader | null): void;
5331
+
5333
5332
  /**
5334
5333
  * The set of languages with a registered PrismLight grammar (above) plus the
5335
5334
  * `.orb`/`.lolo` grammars from `@almadar/syntax`. Authoritative: an unregistered
@@ -5352,7 +5351,7 @@ interface DiffLine$1 {
5352
5351
  }
5353
5352
  interface CodeViewerAction {
5354
5353
  label: string;
5355
- event?: string;
5354
+ event?: EventKey;
5356
5355
  navigatesTo?: string;
5357
5356
  variant?: 'primary' | 'secondary' | 'ghost';
5358
5357
  }
@@ -7949,7 +7948,7 @@ interface MeterThreshold {
7949
7948
  }
7950
7949
  interface MeterAction {
7951
7950
  label: string;
7952
- event?: string;
7951
+ event?: EventKey;
7953
7952
  navigatesTo?: string;
7954
7953
  variant?: "primary" | "secondary" | "ghost";
7955
7954
  }
@@ -9401,7 +9400,7 @@ interface SchemaAction {
9401
9400
  /** Custom click handler */
9402
9401
  onClick?: () => void;
9403
9402
  /** Event to dispatch via event bus (for trait state machine integration) */
9404
- event?: string;
9403
+ event?: EventKey;
9405
9404
  variant?: "primary" | "secondary" | "ghost" | "danger";
9406
9405
  icon?: IconInput;
9407
9406
  loading?: boolean;
@@ -10208,7 +10207,7 @@ interface ChartSeries {
10208
10207
  }
10209
10208
  interface ChartAction {
10210
10209
  label: string;
10211
- event?: string;
10210
+ event?: EventKey;
10212
10211
  navigatesTo?: string;
10213
10212
  variant?: "primary" | "secondary" | "ghost";
10214
10213
  }
@@ -10325,7 +10324,7 @@ declare const SignaturePad: React__default.FC<SignaturePadProps>;
10325
10324
  type DocumentType = "pdf" | "text" | "html" | "markdown";
10326
10325
  interface DocumentAction {
10327
10326
  label: string;
10328
- event?: string;
10327
+ event?: EventKey;
10329
10328
  navigatesTo?: string;
10330
10329
  variant?: "primary" | "secondary" | "ghost";
10331
10330
  }
@@ -10426,7 +10425,7 @@ interface GraphSimilarity {
10426
10425
  }
10427
10426
  interface GraphAction {
10428
10427
  label: string;
10429
- event?: string;
10428
+ event?: EventKey;
10430
10429
  navigatesTo?: string;
10431
10430
  variant?: "primary" | "secondary" | "ghost";
10432
10431
  }
@@ -10786,11 +10785,11 @@ interface RowAction<T> {
10786
10785
  onClick?: (row: T) => void;
10787
10786
  variant?: "default" | "danger";
10788
10787
  show?: (row: T) => boolean;
10789
- event?: string;
10788
+ event?: EventKey;
10790
10789
  }
10791
10790
  interface DataTableEmptyAction {
10792
10791
  label: string;
10793
- event?: string;
10792
+ event?: EventKey;
10794
10793
  }
10795
10794
  interface DataTableProps<T extends EntityRow & {
10796
10795
  id: string | number;
@@ -10804,9 +10803,8 @@ interface DataTableProps<T extends EntityRow & {
10804
10803
  /** Item actions from generated code - maps to rowActions */
10805
10804
  itemActions?: readonly {
10806
10805
  label: string;
10807
- event?: string;
10806
+ event?: EventKey;
10808
10807
  navigatesTo?: string;
10809
- action?: EventKey;
10810
10808
  placement?: "row" | "bulk" | string;
10811
10809
  icon?: IconInput;
10812
10810
  variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
@@ -10826,7 +10824,7 @@ interface DataTableProps<T extends EntityRow & {
10826
10824
  /** Optional when `event` is set — a bus-emitting onClick is synthesized. */
10827
10825
  onClick?: (selectedRows: T[]) => void;
10828
10826
  variant?: "default" | "danger";
10829
- event?: string;
10827
+ event?: EventKey;
10830
10828
  }>;
10831
10829
  headerActions?: React__default.ReactNode;
10832
10830
  /** Show total count in pagination */
@@ -10936,8 +10934,11 @@ interface DetailPanelAction {
10936
10934
  label: string;
10937
10935
  icon?: IconInput;
10938
10936
  onClick?: () => void;
10939
- /** Event to emit via event bus */
10940
- event?: string;
10937
+ /** Event to emit via event bus. `EventKey`, not `string`: the pattern
10938
+ * parser tags an array prop as `kind: "event-list"` only when its element
10939
+ * interface types the event field this way, and that tag is what makes an
10940
+ * authored `events { EDIT: X }` rename fold into these config literals. */
10941
+ event?: EventKey;
10941
10942
  /** Navigation URL */
10942
10943
  navigatesTo?: string;
10943
10944
  /** Button variant (primary for main action, others for secondary) */
@@ -11288,8 +11289,6 @@ interface SchemaItemAction {
11288
11289
  navigatesTo?: string;
11289
11290
  /** Action placement - accepts all common placement values */
11290
11291
  placement?: "row" | "bulk" | "card" | "footer" | string;
11291
- /** Alternate event-dispatch field (same semantics as `event`) — generated code emits `UI:{action}` on click */
11292
- action?: EventKey;
11293
11292
  variant?: "primary" | "secondary" | "ghost" | "danger" | "default";
11294
11293
  /** Click handler from generated code */
11295
11294
  onClick?: (row: EntityRow) => void;
@@ -11348,8 +11347,6 @@ interface CardItemAction {
11348
11347
  navigatesTo?: string;
11349
11348
  /** Callback on click */
11350
11349
  onClick?: (item: EventPayload) => void;
11351
- /** Action used by generated code - alternative to event */
11352
- action?: EventKey;
11353
11350
  /** Action placement - accepts string for compatibility with generated code */
11354
11351
  placement?: 'card' | 'footer' | 'row' | string;
11355
11352
  /** Button variant - accepts string for compatibility with generated code */
@@ -12145,7 +12142,7 @@ type MediaItem = EntityRow & {
12145
12142
  };
12146
12143
  interface MediaGalleryAction {
12147
12144
  label: string;
12148
- event?: string;
12145
+ event?: EventKey;
12149
12146
  navigatesTo?: string;
12150
12147
  variant?: "primary" | "secondary" | "ghost";
12151
12148
  }
@@ -2377,7 +2377,7 @@ type MenuOption = EventPayload & {
2377
2377
  /** Display label */
2378
2378
  label: string;
2379
2379
  /** Event to emit on click */
2380
- event?: string;
2380
+ event?: EventKey;
2381
2381
  /** Page to navigate to */
2382
2382
  navigatesTo?: string;
2383
2383
  /** Button variant */
@@ -2386,8 +2386,6 @@ type MenuOption = EventPayload & {
2386
2386
  disabled?: boolean;
2387
2387
  /** Sub-label or description */
2388
2388
  subLabel?: string;
2389
- /** Action identifier (alternative to event) */
2390
- action?: EventKey;
2391
2389
  };
2392
2390
  interface GameMenuProps {
2393
2391
  /** Menu title */
@@ -4144,7 +4142,7 @@ interface ActionButton {
4144
4142
  label: string;
4145
4143
  /** Action type - 'submit' renders as submit button, others render as button */
4146
4144
  actionType?: string;
4147
- event?: string;
4145
+ event?: EventKey;
4148
4146
  navigatesTo?: string;
4149
4147
  /** Button variant - matches Button component variants. Accepts string for schema compatibility. */
4150
4148
  variant?: string;
@@ -4353,7 +4351,7 @@ interface FloatingAction {
4353
4351
  */
4354
4352
  onClick?: () => void;
4355
4353
  /** Event name to emit when clicked (for trait state machine integration) */
4356
- event?: string;
4354
+ event?: EventKey;
4357
4355
  /**
4358
4356
  * Action variant
4359
4357
  */
@@ -4503,7 +4501,7 @@ interface MenuItem {
4503
4501
  /** Item click handler */
4504
4502
  onClick?: () => void;
4505
4503
  /** Event name for pattern compatibility */
4506
- event?: string;
4504
+ event?: EventKey;
4507
4505
  /** File URL this item downloads on pick (gesture-driven, `DocumentViewer` precedent). The item's `event` still emits on the bus. */
4508
4506
  url?: string;
4509
4507
  /** Variant for styling (pattern compatibility) */
@@ -5039,7 +5037,7 @@ interface TabItem {
5039
5037
  /** Disable tab */
5040
5038
  disabled?: boolean;
5041
5039
  /** Event to emit when tab is clicked (for trait state machine integration) */
5042
- event?: string;
5040
+ event?: EventKey;
5043
5041
  /** Whether this tab is currently active (for controlled tabs) */
5044
5042
  active?: boolean;
5045
5043
  }
@@ -5330,6 +5328,7 @@ type CodeLanguageLoader = (lang: string) => Promise<PrismLanguageGrammar | null>
5330
5328
  /** Wire up a dynamic language-grammar loader. Must be called from app source
5331
5329
  * (not a pre-bundled dependency) so the bundler can split grammars into chunks. */
5332
5330
  declare function registerCodeLanguageLoader(loader: CodeLanguageLoader | null): void;
5331
+
5333
5332
  /**
5334
5333
  * The set of languages with a registered PrismLight grammar (above) plus the
5335
5334
  * `.orb`/`.lolo` grammars from `@almadar/syntax`. Authoritative: an unregistered
@@ -5352,7 +5351,7 @@ interface DiffLine$1 {
5352
5351
  }
5353
5352
  interface CodeViewerAction {
5354
5353
  label: string;
5355
- event?: string;
5354
+ event?: EventKey;
5356
5355
  navigatesTo?: string;
5357
5356
  variant?: 'primary' | 'secondary' | 'ghost';
5358
5357
  }
@@ -7949,7 +7948,7 @@ interface MeterThreshold {
7949
7948
  }
7950
7949
  interface MeterAction {
7951
7950
  label: string;
7952
- event?: string;
7951
+ event?: EventKey;
7953
7952
  navigatesTo?: string;
7954
7953
  variant?: "primary" | "secondary" | "ghost";
7955
7954
  }
@@ -9401,7 +9400,7 @@ interface SchemaAction {
9401
9400
  /** Custom click handler */
9402
9401
  onClick?: () => void;
9403
9402
  /** Event to dispatch via event bus (for trait state machine integration) */
9404
- event?: string;
9403
+ event?: EventKey;
9405
9404
  variant?: "primary" | "secondary" | "ghost" | "danger";
9406
9405
  icon?: IconInput;
9407
9406
  loading?: boolean;
@@ -10208,7 +10207,7 @@ interface ChartSeries {
10208
10207
  }
10209
10208
  interface ChartAction {
10210
10209
  label: string;
10211
- event?: string;
10210
+ event?: EventKey;
10212
10211
  navigatesTo?: string;
10213
10212
  variant?: "primary" | "secondary" | "ghost";
10214
10213
  }
@@ -10325,7 +10324,7 @@ declare const SignaturePad: React__default.FC<SignaturePadProps>;
10325
10324
  type DocumentType = "pdf" | "text" | "html" | "markdown";
10326
10325
  interface DocumentAction {
10327
10326
  label: string;
10328
- event?: string;
10327
+ event?: EventKey;
10329
10328
  navigatesTo?: string;
10330
10329
  variant?: "primary" | "secondary" | "ghost";
10331
10330
  }
@@ -10426,7 +10425,7 @@ interface GraphSimilarity {
10426
10425
  }
10427
10426
  interface GraphAction {
10428
10427
  label: string;
10429
- event?: string;
10428
+ event?: EventKey;
10430
10429
  navigatesTo?: string;
10431
10430
  variant?: "primary" | "secondary" | "ghost";
10432
10431
  }
@@ -10786,11 +10785,11 @@ interface RowAction<T> {
10786
10785
  onClick?: (row: T) => void;
10787
10786
  variant?: "default" | "danger";
10788
10787
  show?: (row: T) => boolean;
10789
- event?: string;
10788
+ event?: EventKey;
10790
10789
  }
10791
10790
  interface DataTableEmptyAction {
10792
10791
  label: string;
10793
- event?: string;
10792
+ event?: EventKey;
10794
10793
  }
10795
10794
  interface DataTableProps<T extends EntityRow & {
10796
10795
  id: string | number;
@@ -10804,9 +10803,8 @@ interface DataTableProps<T extends EntityRow & {
10804
10803
  /** Item actions from generated code - maps to rowActions */
10805
10804
  itemActions?: readonly {
10806
10805
  label: string;
10807
- event?: string;
10806
+ event?: EventKey;
10808
10807
  navigatesTo?: string;
10809
- action?: EventKey;
10810
10808
  placement?: "row" | "bulk" | string;
10811
10809
  icon?: IconInput;
10812
10810
  variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
@@ -10826,7 +10824,7 @@ interface DataTableProps<T extends EntityRow & {
10826
10824
  /** Optional when `event` is set — a bus-emitting onClick is synthesized. */
10827
10825
  onClick?: (selectedRows: T[]) => void;
10828
10826
  variant?: "default" | "danger";
10829
- event?: string;
10827
+ event?: EventKey;
10830
10828
  }>;
10831
10829
  headerActions?: React__default.ReactNode;
10832
10830
  /** Show total count in pagination */
@@ -10936,8 +10934,11 @@ interface DetailPanelAction {
10936
10934
  label: string;
10937
10935
  icon?: IconInput;
10938
10936
  onClick?: () => void;
10939
- /** Event to emit via event bus */
10940
- event?: string;
10937
+ /** Event to emit via event bus. `EventKey`, not `string`: the pattern
10938
+ * parser tags an array prop as `kind: "event-list"` only when its element
10939
+ * interface types the event field this way, and that tag is what makes an
10940
+ * authored `events { EDIT: X }` rename fold into these config literals. */
10941
+ event?: EventKey;
10941
10942
  /** Navigation URL */
10942
10943
  navigatesTo?: string;
10943
10944
  /** Button variant (primary for main action, others for secondary) */
@@ -11288,8 +11289,6 @@ interface SchemaItemAction {
11288
11289
  navigatesTo?: string;
11289
11290
  /** Action placement - accepts all common placement values */
11290
11291
  placement?: "row" | "bulk" | "card" | "footer" | string;
11291
- /** Alternate event-dispatch field (same semantics as `event`) — generated code emits `UI:{action}` on click */
11292
- action?: EventKey;
11293
11292
  variant?: "primary" | "secondary" | "ghost" | "danger" | "default";
11294
11293
  /** Click handler from generated code */
11295
11294
  onClick?: (row: EntityRow) => void;
@@ -11348,8 +11347,6 @@ interface CardItemAction {
11348
11347
  navigatesTo?: string;
11349
11348
  /** Callback on click */
11350
11349
  onClick?: (item: EventPayload) => void;
11351
- /** Action used by generated code - alternative to event */
11352
- action?: EventKey;
11353
11350
  /** Action placement - accepts string for compatibility with generated code */
11354
11351
  placement?: 'card' | 'footer' | 'row' | string;
11355
11352
  /** Button variant - accepts string for compatibility with generated code */
@@ -12145,7 +12142,7 @@ type MediaItem = EntityRow & {
12145
12142
  };
12146
12143
  interface MediaGalleryAction {
12147
12144
  label: string;
12148
- event?: string;
12145
+ event?: EventKey;
12149
12146
  navigatesTo?: string;
12150
12147
  variant?: "primary" | "secondary" | "ghost";
12151
12148
  }
@@ -25582,6 +25582,8 @@ function FieldControl({
25582
25582
  control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: true, value, onCommit: onChange });
25583
25583
  } else if (isSecretConfigType(decl.type)) {
25584
25584
  control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, secret: true, value, onCommit: onChange });
25585
+ } else if (decl.type === "event") {
25586
+ control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
25585
25587
  } else if (decl.type === "string") {
25586
25588
  control = /* @__PURE__ */ jsx(TextLikeControl, { field: name, numeric: false, value, onCommit: onChange });
25587
25589
  } else if (decl.type === "node") {
@@ -25621,7 +25623,7 @@ var init_PropertyInspector = __esm({
25621
25623
  init_JsonTreeEditor();
25622
25624
  init_NodeSlotEditor();
25623
25625
  TIER_ORDER = ["presentation", "domain", "policy", "infra", "internal"];
25624
- SCALAR_TYPES = /* @__PURE__ */ new Set(["string", "number", "boolean", "icon", "asset", "Asset", "secret"]);
25626
+ SCALAR_TYPES = /* @__PURE__ */ new Set(["string", "number", "boolean", "icon", "asset", "Asset", "secret", "event"]);
25625
25627
  PropertyInspector = ({
25626
25628
  config,
25627
25629
  values,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.164.0",
3
+ "version": "5.166.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -118,12 +118,12 @@
118
118
  "access": "public"
119
119
  },
120
120
  "dependencies": {
121
- "@almadar/core": "^10.74.0",
122
- "@almadar/evaluator": "^2.42.0",
123
- "@almadar/logger": "^1.11.0",
124
- "@almadar/runtime": "^6.63.0",
125
- "@almadar/std": "^16.193.0",
126
- "@almadar/syntax": "^1.15.0",
121
+ "@almadar/core": "^10.76.0",
122
+ "@almadar/evaluator": "^2.43.0",
123
+ "@almadar/logger": "^1.12.0",
124
+ "@almadar/runtime": "^6.66.0",
125
+ "@almadar/std": "^16.196.0",
126
+ "@almadar/syntax": "^1.16.0",
127
127
  "@dnd-kit/core": "^6.3.1",
128
128
  "@dnd-kit/sortable": "^10.0.0",
129
129
  "@dnd-kit/utilities": "^3.2.2",
@@ -173,7 +173,7 @@
173
173
  }
174
174
  },
175
175
  "devDependencies": {
176
- "@almadar/eslint-plugin": "^2.16.0",
176
+ "@almadar/eslint-plugin": "^2.17.0",
177
177
  "@react-three/drei": "^10.7.7",
178
178
  "@react-three/fiber": "^9.6.0",
179
179
  "@react-three/postprocessing": "3.0.4",