@almadar/ui 4.50.8 → 4.50.10

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.
@@ -25379,7 +25379,8 @@ function DataGrid({
25379
25379
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
25380
25380
  }
25381
25381
  if (data.length === 0) {
25382
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25382
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25383
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
25383
25384
  }
25384
25385
  const allIds = data.map((item, i) => item.id || String(i));
25385
25386
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -25764,7 +25765,8 @@ function DataList({
25764
25765
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
25765
25766
  }
25766
25767
  if (data.length === 0) {
25767
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25768
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25769
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
25768
25770
  }
25769
25771
  const gapClass = {
25770
25772
  none: "",
@@ -59824,7 +59826,7 @@ function findPatternInTree(root, path) {
59824
59826
  }
59825
59827
  var FIELD_TYPE_OPTIONS = core.FieldTypeSchema.options.map((v) => ({ value: v, label: v }));
59826
59828
  var EFFECT_TYPE_OPTIONS = Object.keys(exports.EFFECT_TYPE_TO_CATEGORY).map((v) => ({ value: v, label: v }));
59827
- function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose }) {
59829
+ function OrbInspector({ node, schema, editable = false, userType = "builder", onSchemaChange, onClose }) {
59828
59830
  const { selected: selectedPattern } = React93.useContext(PatternSelectionContext);
59829
59831
  const [activeTab, setActiveTab] = React93.useState("inspector");
59830
59832
  const eventBus = useEventBus();
@@ -59930,27 +59932,18 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59930
59932
  }
59931
59933
  )
59932
59934
  ] }),
59933
- /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex px-4 gap-4", children: [
59934
- /* @__PURE__ */ jsxRuntime.jsx(
59935
- "button",
59936
- {
59937
- onClick: () => setActiveTab("inspector"),
59938
- className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 ${activeTab === "inspector" ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59939
- children: "Inspector"
59940
- }
59941
- ),
59942
- /* @__PURE__ */ jsxRuntime.jsx(
59943
- "button",
59944
- {
59945
- onClick: () => setActiveTab("code"),
59946
- className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 ${activeTab === "code" ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59947
- children: "Code"
59948
- }
59949
- )
59950
- ] })
59935
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex px-4 gap-4", children: ["inspector", "styles", "code"].filter((tab) => tab !== "code" || userType === "architect").map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
59936
+ "button",
59937
+ {
59938
+ onClick: () => setActiveTab(tab),
59939
+ className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 capitalize ${activeTab === tab ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59940
+ children: tab
59941
+ },
59942
+ tab
59943
+ )) })
59951
59944
  ] }),
59952
- /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" ? (
59953
- /* ── Code Tab ── */
59945
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" && userType === "architect" ? (
59946
+ /* ── Code Tab (architect only) ── */
59954
59947
  /* GAP-51: when editable, the CodeBlock molecule renders the existing
59955
59948
  Textarea atom internally and forwards keystrokes via UI:CODE_CHANGE
59956
59949
  on the EventBus. The consumer (builder workspace) listens, debounces,
@@ -59968,6 +59961,21 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59968
59961
  onChange: editable ? (code) => eventBus.emit("UI:CODE_CHANGE", { code }) : void 0
59969
59962
  }
59970
59963
  ) })
59964
+ ) : activeTab === "styles" ? (
59965
+ /* ── Styles Tab (read-only in Phase 2) ──
59966
+ Phase 2 ships a token-only viewer with no editing. The proper
59967
+ tokenContract on PatternDefinition lands in Phase 6; until then
59968
+ we fall back to a static map of well-known atoms keyed by
59969
+ pattern type. Patterns missing from the map render a placeholder
59970
+ so the gap is visible rather than silently empty. */
59971
+ /* @__PURE__ */ jsxRuntime.jsx(
59972
+ StylesTabReadOnly,
59973
+ {
59974
+ patternType,
59975
+ patternDef,
59976
+ patternConfig
59977
+ }
59978
+ )
59971
59979
  ) : (
59972
59980
  /* ── Inspector Tab ── */
59973
59981
  /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -59994,7 +60002,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59994
60002
  ] }, propName);
59995
60003
  }) })
59996
60004
  ] }),
59997
- (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
60005
+ userType === "architect" && (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
59998
60006
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Entity") }),
59999
60007
  /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-2 mb-2", children: [
60000
60008
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: 7, cy: 7, r: 5, fill: "var(--color-primary)" }) }),
@@ -60118,7 +60126,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60118
60126
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsxRuntime.jsx(AvlEvent, { x: 8, y: 8, size: 12 }) }),
60119
60127
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: transitionEvent })
60120
60128
  ] }) }),
60121
- (transition?.guard ?? guard ?? editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-2 border-b border-border/40", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", className: "items-center", children: [
60129
+ userType === "architect" && (transition?.guard ?? guard ?? editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "px-4 py-2 border-b border-border/40", children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", className: "items-center", children: [
60122
60130
  /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsxRuntime.jsx(AvlGuard, { x: 8, y: 8, size: 12 }) }),
60123
60131
  editable ? /* @__PURE__ */ jsxRuntime.jsx(
60124
60132
  Input,
@@ -60130,7 +60138,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60130
60138
  }
60131
60139
  ) : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-mono text-[11px] text-muted-foreground", children: formatExpression(transition?.guard ?? guard) })
60132
60140
  ] }) }),
60133
- (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
60141
+ userType === "architect" && (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
60134
60142
  /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: [
60135
60143
  t("Effects"),
60136
60144
  " (",
@@ -60162,7 +60170,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60162
60170
  }) }),
60163
60171
  editable && /* @__PURE__ */ jsxRuntime.jsx(AddEffectButton, { onAdd: handleAddEffect })
60164
60172
  ] }),
60165
- patterns$1.length > 0 && !selectedPattern && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3", children: [
60173
+ userType === "architect" && patterns$1.length > 0 && !selectedPattern && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3", children: [
60166
60174
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: "render-ui" }),
60167
60175
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "bg-muted/20 rounded-md p-3 font-mono text-[11px] leading-relaxed overflow-x-auto", children: patterns$1.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
60168
60176
  /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px]", children: [
@@ -60235,6 +60243,83 @@ function OrbPatternTree({ config, depth }) {
60235
60243
  ] });
60236
60244
  }
60237
60245
  OrbInspector.displayName = "OrbInspector";
60246
+ var PHASE_2_TOKEN_FALLBACK = {
60247
+ button: ["--color-primary", "--color-primary-foreground", "--radius-md", "--shadow-sm"],
60248
+ badge: ["--color-primary", "--radius-full"],
60249
+ card: ["--color-card", "--color-border", "--radius-lg", "--shadow-main"],
60250
+ input: ["--color-input", "--color-border", "--radius-md"],
60251
+ typography: ["--color-foreground", "--color-muted-foreground"],
60252
+ divider: ["--color-border"],
60253
+ avatar: ["--radius-full", "--color-muted"],
60254
+ alert: ["--color-warning", "--color-success", "--color-danger", "--radius-md"],
60255
+ modal: ["--color-card", "--shadow-lg", "--radius-lg"],
60256
+ toast: ["--color-card", "--shadow-lg", "--radius-md"]
60257
+ };
60258
+ function StylesTabReadOnly({ patternType, patternDef, patternConfig }) {
60259
+ const { t } = useTranslate();
60260
+ if (!patternType) {
60261
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[11px]", children: t("Select a pattern to view its style tokens.") }) });
60262
+ }
60263
+ const tier = patternDef?.category ?? "Pattern";
60264
+ const tokens = PHASE_2_TOKEN_FALLBACK[patternType] ?? [];
60265
+ const variantEnum = patternDef?.propsSchema?.variant?.enumValues;
60266
+ const sizeEnum = patternDef?.propsSchema?.size?.enumValues;
60267
+ const currentVariant = patternConfig && typeof patternConfig.variant === "string" ? patternConfig.variant : void 0;
60268
+ const currentSize = patternConfig && typeof patternConfig.size === "string" ? patternConfig.size : void 0;
60269
+ return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 flex flex-col gap-4", children: [
60270
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-2", children: [
60271
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: patternType }),
60272
+ /* @__PURE__ */ jsxRuntime.jsx(
60273
+ Box,
60274
+ {
60275
+ className: "rounded px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider",
60276
+ style: { backgroundColor: "var(--color-muted)", color: "var(--color-muted-foreground)" },
60277
+ children: tier
60278
+ }
60279
+ )
60280
+ ] }),
60281
+ /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
60282
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Tokens") }),
60283
+ tokens.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[11px] italic", children: t("No token contract declared for this pattern.") }) : /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-col gap-1", children: tokens.map((token) => /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-mono text-[11px]", children: token }) }, token)) })
60284
+ ] }),
60285
+ variantEnum && variantEnum.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
60286
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Variant") }),
60287
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-wrap gap-1", children: variantEnum.map((variant) => {
60288
+ const isActive = variant === currentVariant || !currentVariant && variant === "default";
60289
+ return /* @__PURE__ */ jsxRuntime.jsx(
60290
+ Box,
60291
+ {
60292
+ className: "rounded px-2 py-0.5 text-[11px] font-mono",
60293
+ style: {
60294
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
60295
+ color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
60296
+ },
60297
+ children: variant
60298
+ },
60299
+ variant
60300
+ );
60301
+ }) })
60302
+ ] }),
60303
+ sizeEnum && sizeEnum.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
60304
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Size") }),
60305
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-wrap gap-1", children: sizeEnum.map((size) => {
60306
+ const isActive = size === currentSize || !currentSize && size === "md";
60307
+ return /* @__PURE__ */ jsxRuntime.jsx(
60308
+ Box,
60309
+ {
60310
+ className: "rounded px-2 py-0.5 text-[11px] font-mono",
60311
+ style: {
60312
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
60313
+ color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
60314
+ },
60315
+ children: size
60316
+ },
60317
+ size
60318
+ );
60319
+ }) })
60320
+ ] })
60321
+ ] });
60322
+ }
60238
60323
 
60239
60324
  // components/organisms/avl/FlowCanvas.tsx
60240
60325
  init_Box();
@@ -60278,7 +60363,8 @@ function FlowCanvasInner({
60278
60363
  onNodeSelect,
60279
60364
  composeLevel,
60280
60365
  behaviorEntries,
60281
- behaviorWires
60366
+ behaviorWires,
60367
+ userType = "builder"
60282
60368
  }) {
60283
60369
  const NODE_TYPES2 = React93.useMemo(() => ({
60284
60370
  preview: OrbPreviewNode,
@@ -60573,6 +60659,7 @@ function FlowCanvasInner({
60573
60659
  node: selectedNode,
60574
60660
  schema: parsedSchema,
60575
60661
  editable,
60662
+ userType,
60576
60663
  onSchemaChange,
60577
60664
  onClose: handleClosePanel
60578
60665
  }
@@ -1196,10 +1196,18 @@ interface OrbInspectorProps {
1196
1196
  node: PreviewNodeData;
1197
1197
  schema: OrbitalSchema;
1198
1198
  editable?: boolean;
1199
+ /**
1200
+ * Studio persona viewing the inspector. Controls tab visibility (Code is
1201
+ * architect-only, Styles is universal) and section visibility (Entity,
1202
+ * raw guard, raw effects are architect-only). Default `'builder'` matches
1203
+ * pre-Phase-2 behavior except for the new Styles tab, which every persona
1204
+ * gets.
1205
+ */
1206
+ userType?: 'builder' | 'designer' | 'architect';
1199
1207
  onSchemaChange?: (schema: OrbitalSchema) => void;
1200
1208
  onClose: () => void;
1201
1209
  }
1202
- declare function OrbInspector({ node, schema, editable, onSchemaChange, onClose }: OrbInspectorProps): React__default.ReactElement;
1210
+ declare function OrbInspector({ node, schema, editable, userType, onSchemaChange, onClose }: OrbInspectorProps): React__default.ReactElement;
1203
1211
  declare namespace OrbInspector {
1204
1212
  var displayName: string;
1205
1213
  }
@@ -1320,6 +1328,13 @@ interface FlowCanvasProps {
1320
1328
  initialTrait?: string;
1321
1329
  /** @deprecated Not used in V3. */
1322
1330
  stateCoverage?: Record<string, string>;
1331
+ /**
1332
+ * Studio persona viewing the canvas. Drives `OrbInspector` tab/section
1333
+ * visibility — designers and builders hide the raw `code` tab and the
1334
+ * architect-only Entity / raw-guard / raw-effects sections; architects see
1335
+ * everything. Default `'builder'` preserves pre-Phase-2 behavior.
1336
+ */
1337
+ userType?: 'builder' | 'designer' | 'architect';
1323
1338
  }
1324
1339
  declare const FlowCanvas: React__default.FC<FlowCanvasProps>;
1325
1340
 
package/dist/avl/index.js CHANGED
@@ -25333,7 +25333,8 @@ function DataGrid({
25333
25333
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
25334
25334
  }
25335
25335
  if (data.length === 0) {
25336
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25336
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25337
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
25337
25338
  }
25338
25339
  const allIds = data.map((item, i) => item.id || String(i));
25339
25340
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -25718,7 +25719,8 @@ function DataList({
25718
25719
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
25719
25720
  }
25720
25721
  if (data.length === 0) {
25721
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25722
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
25723
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
25722
25724
  }
25723
25725
  const gapClass = {
25724
25726
  none: "",
@@ -59778,7 +59780,7 @@ function findPatternInTree(root, path) {
59778
59780
  }
59779
59781
  var FIELD_TYPE_OPTIONS = FieldTypeSchema.options.map((v) => ({ value: v, label: v }));
59780
59782
  var EFFECT_TYPE_OPTIONS = Object.keys(EFFECT_TYPE_TO_CATEGORY).map((v) => ({ value: v, label: v }));
59781
- function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose }) {
59783
+ function OrbInspector({ node, schema, editable = false, userType = "builder", onSchemaChange, onClose }) {
59782
59784
  const { selected: selectedPattern } = useContext(PatternSelectionContext);
59783
59785
  const [activeTab, setActiveTab] = useState("inspector");
59784
59786
  const eventBus = useEventBus();
@@ -59884,27 +59886,18 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59884
59886
  }
59885
59887
  )
59886
59888
  ] }),
59887
- /* @__PURE__ */ jsxs(Box, { className: "flex px-4 gap-4", children: [
59888
- /* @__PURE__ */ jsx(
59889
- "button",
59890
- {
59891
- onClick: () => setActiveTab("inspector"),
59892
- className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 ${activeTab === "inspector" ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59893
- children: "Inspector"
59894
- }
59895
- ),
59896
- /* @__PURE__ */ jsx(
59897
- "button",
59898
- {
59899
- onClick: () => setActiveTab("code"),
59900
- className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 ${activeTab === "code" ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59901
- children: "Code"
59902
- }
59903
- )
59904
- ] })
59889
+ /* @__PURE__ */ jsx(Box, { className: "flex px-4 gap-4", children: ["inspector", "styles", "code"].filter((tab) => tab !== "code" || userType === "architect").map((tab) => /* @__PURE__ */ jsx(
59890
+ "button",
59891
+ {
59892
+ onClick: () => setActiveTab(tab),
59893
+ className: `pb-2 text-[12px] font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 capitalize ${activeTab === tab ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
59894
+ children: tab
59895
+ },
59896
+ tab
59897
+ )) })
59905
59898
  ] }),
59906
- /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" ? (
59907
- /* ── Code Tab ── */
59899
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" && userType === "architect" ? (
59900
+ /* ── Code Tab (architect only) ── */
59908
59901
  /* GAP-51: when editable, the CodeBlock molecule renders the existing
59909
59902
  Textarea atom internally and forwards keystrokes via UI:CODE_CHANGE
59910
59903
  on the EventBus. The consumer (builder workspace) listens, debounces,
@@ -59922,6 +59915,21 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59922
59915
  onChange: editable ? (code) => eventBus.emit("UI:CODE_CHANGE", { code }) : void 0
59923
59916
  }
59924
59917
  ) })
59918
+ ) : activeTab === "styles" ? (
59919
+ /* ── Styles Tab (read-only in Phase 2) ──
59920
+ Phase 2 ships a token-only viewer with no editing. The proper
59921
+ tokenContract on PatternDefinition lands in Phase 6; until then
59922
+ we fall back to a static map of well-known atoms keyed by
59923
+ pattern type. Patterns missing from the map render a placeholder
59924
+ so the gap is visible rather than silently empty. */
59925
+ /* @__PURE__ */ jsx(
59926
+ StylesTabReadOnly,
59927
+ {
59928
+ patternType,
59929
+ patternDef,
59930
+ patternConfig
59931
+ }
59932
+ )
59925
59933
  ) : (
59926
59934
  /* ── Inspector Tab ── */
59927
59935
  /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -59948,7 +59956,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
59948
59956
  ] }, propName);
59949
59957
  }) })
59950
59958
  ] }),
59951
- (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
59959
+ userType === "architect" && (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
59952
59960
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Entity") }),
59953
59961
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 mb-2", children: [
59954
59962
  /* @__PURE__ */ jsx("svg", { width: 14, height: 14, children: /* @__PURE__ */ jsx("circle", { cx: 7, cy: 7, r: 5, fill: "var(--color-primary)" }) }),
@@ -60072,7 +60080,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60072
60080
  /* @__PURE__ */ jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsx(AvlEvent, { x: 8, y: 8, size: 12 }) }),
60073
60081
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: transitionEvent })
60074
60082
  ] }) }),
60075
- (transition?.guard ?? guard ?? editable) && isExpanded && /* @__PURE__ */ jsx(Box, { className: "px-4 py-2 border-b border-border/40", children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
60083
+ userType === "architect" && (transition?.guard ?? guard ?? editable) && isExpanded && /* @__PURE__ */ jsx(Box, { className: "px-4 py-2 border-b border-border/40", children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
60076
60084
  /* @__PURE__ */ jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsx(AvlGuard, { x: 8, y: 8, size: 12 }) }),
60077
60085
  editable ? /* @__PURE__ */ jsx(
60078
60086
  Input,
@@ -60084,7 +60092,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60084
60092
  }
60085
60093
  ) : /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-mono text-[11px] text-muted-foreground", children: formatExpression(transition?.guard ?? guard) })
60086
60094
  ] }) }),
60087
- (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
60095
+ userType === "architect" && (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
60088
60096
  /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: [
60089
60097
  t("Effects"),
60090
60098
  " (",
@@ -60116,7 +60124,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
60116
60124
  }) }),
60117
60125
  editable && /* @__PURE__ */ jsx(AddEffectButton, { onAdd: handleAddEffect })
60118
60126
  ] }),
60119
- patterns.length > 0 && !selectedPattern && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3", children: [
60127
+ userType === "architect" && patterns.length > 0 && !selectedPattern && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3", children: [
60120
60128
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: "render-ui" }),
60121
60129
  /* @__PURE__ */ jsx(Box, { className: "bg-muted/20 rounded-md p-3 font-mono text-[11px] leading-relaxed overflow-x-auto", children: patterns.map((entry, i) => /* @__PURE__ */ jsxs(Box, { children: [
60122
60130
  /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px]", children: [
@@ -60189,6 +60197,83 @@ function OrbPatternTree({ config, depth }) {
60189
60197
  ] });
60190
60198
  }
60191
60199
  OrbInspector.displayName = "OrbInspector";
60200
+ var PHASE_2_TOKEN_FALLBACK = {
60201
+ button: ["--color-primary", "--color-primary-foreground", "--radius-md", "--shadow-sm"],
60202
+ badge: ["--color-primary", "--radius-full"],
60203
+ card: ["--color-card", "--color-border", "--radius-lg", "--shadow-main"],
60204
+ input: ["--color-input", "--color-border", "--radius-md"],
60205
+ typography: ["--color-foreground", "--color-muted-foreground"],
60206
+ divider: ["--color-border"],
60207
+ avatar: ["--radius-full", "--color-muted"],
60208
+ alert: ["--color-warning", "--color-success", "--color-danger", "--radius-md"],
60209
+ modal: ["--color-card", "--shadow-lg", "--radius-lg"],
60210
+ toast: ["--color-card", "--shadow-lg", "--radius-md"]
60211
+ };
60212
+ function StylesTabReadOnly({ patternType, patternDef, patternConfig }) {
60213
+ const { t } = useTranslate();
60214
+ if (!patternType) {
60215
+ return /* @__PURE__ */ jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[11px]", children: t("Select a pattern to view its style tokens.") }) });
60216
+ }
60217
+ const tier = patternDef?.category ?? "Pattern";
60218
+ const tokens = PHASE_2_TOKEN_FALLBACK[patternType] ?? [];
60219
+ const variantEnum = patternDef?.propsSchema?.variant?.enumValues;
60220
+ const sizeEnum = patternDef?.propsSchema?.size?.enumValues;
60221
+ const currentVariant = patternConfig && typeof patternConfig.variant === "string" ? patternConfig.variant : void 0;
60222
+ const currentSize = patternConfig && typeof patternConfig.size === "string" ? patternConfig.size : void 0;
60223
+ return /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 flex flex-col gap-4", children: [
60224
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
60225
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: patternType }),
60226
+ /* @__PURE__ */ jsx(
60227
+ Box,
60228
+ {
60229
+ className: "rounded px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider",
60230
+ style: { backgroundColor: "var(--color-muted)", color: "var(--color-muted-foreground)" },
60231
+ children: tier
60232
+ }
60233
+ )
60234
+ ] }),
60235
+ /* @__PURE__ */ jsxs(Box, { children: [
60236
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Tokens") }),
60237
+ tokens.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[11px] italic", children: t("No token contract declared for this pattern.") }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: tokens.map((token) => /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-mono text-[11px]", children: token }) }, token)) })
60238
+ ] }),
60239
+ variantEnum && variantEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
60240
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Variant") }),
60241
+ /* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: variantEnum.map((variant) => {
60242
+ const isActive = variant === currentVariant || !currentVariant && variant === "default";
60243
+ return /* @__PURE__ */ jsx(
60244
+ Box,
60245
+ {
60246
+ className: "rounded px-2 py-0.5 text-[11px] font-mono",
60247
+ style: {
60248
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
60249
+ color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
60250
+ },
60251
+ children: variant
60252
+ },
60253
+ variant
60254
+ );
60255
+ }) })
60256
+ ] }),
60257
+ sizeEnum && sizeEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
60258
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Size") }),
60259
+ /* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: sizeEnum.map((size) => {
60260
+ const isActive = size === currentSize || !currentSize && size === "md";
60261
+ return /* @__PURE__ */ jsx(
60262
+ Box,
60263
+ {
60264
+ className: "rounded px-2 py-0.5 text-[11px] font-mono",
60265
+ style: {
60266
+ backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
60267
+ color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
60268
+ },
60269
+ children: size
60270
+ },
60271
+ size
60272
+ );
60273
+ }) })
60274
+ ] })
60275
+ ] });
60276
+ }
60192
60277
 
60193
60278
  // components/organisms/avl/FlowCanvas.tsx
60194
60279
  init_Box();
@@ -60232,7 +60317,8 @@ function FlowCanvasInner({
60232
60317
  onNodeSelect,
60233
60318
  composeLevel,
60234
60319
  behaviorEntries,
60235
- behaviorWires
60320
+ behaviorWires,
60321
+ userType = "builder"
60236
60322
  }) {
60237
60323
  const NODE_TYPES2 = useMemo(() => ({
60238
60324
  preview: OrbPreviewNode,
@@ -60527,6 +60613,7 @@ function FlowCanvasInner({
60527
60613
  node: selectedNode,
60528
60614
  schema: parsedSchema,
60529
60615
  editable,
60616
+ userType,
60530
60617
  onSchemaChange,
60531
60618
  onClose: handleClosePanel
60532
60619
  }
@@ -20546,7 +20546,8 @@ function DataGrid({
20546
20546
  return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "error", children: error.message }) });
20547
20547
  }
20548
20548
  if (data.length === 0) {
20549
- return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20549
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20550
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
20550
20551
  }
20551
20552
  const allIds = data.map((item, i) => item.id || String(i));
20552
20553
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -20931,7 +20932,8 @@ function DataList({
20931
20932
  return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "error", children: error.message }) });
20932
20933
  }
20933
20934
  if (data.length === 0) {
20934
- return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20935
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20936
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
20935
20937
  }
20936
20938
  const gapClass = {
20937
20939
  none: "",
@@ -20500,7 +20500,8 @@ function DataGrid({
20500
20500
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
20501
20501
  }
20502
20502
  if (data.length === 0) {
20503
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20503
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20504
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
20504
20505
  }
20505
20506
  const allIds = data.map((item, i) => item.id || String(i));
20506
20507
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -20885,7 +20886,8 @@ function DataList({
20885
20886
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
20886
20887
  }
20887
20888
  if (data.length === 0) {
20888
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20889
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
20890
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
20889
20891
  }
20890
20892
  const gapClass = {
20891
20893
  none: "",
@@ -117,5 +117,12 @@ export interface FlowCanvasProps {
117
117
  initialTrait?: string;
118
118
  /** @deprecated Not used in V3. */
119
119
  stateCoverage?: Record<string, string>;
120
+ /**
121
+ * Studio persona viewing the canvas. Drives `OrbInspector` tab/section
122
+ * visibility — designers and builders hide the raw `code` tab and the
123
+ * architect-only Entity / raw-guard / raw-effects sections; architects see
124
+ * everything. Default `'builder'` preserves pre-Phase-2 behavior.
125
+ */
126
+ userType?: 'builder' | 'designer' | 'architect';
120
127
  }
121
128
  export declare const FlowCanvas: React.FC<FlowCanvasProps>;
@@ -20,10 +20,18 @@ export interface OrbInspectorProps {
20
20
  node: PreviewNodeData;
21
21
  schema: OrbitalSchema;
22
22
  editable?: boolean;
23
+ /**
24
+ * Studio persona viewing the inspector. Controls tab visibility (Code is
25
+ * architect-only, Styles is universal) and section visibility (Entity,
26
+ * raw guard, raw effects are architect-only). Default `'builder'` matches
27
+ * pre-Phase-2 behavior except for the new Styles tab, which every persona
28
+ * gets.
29
+ */
30
+ userType?: 'builder' | 'designer' | 'architect';
23
31
  onSchemaChange?: (schema: OrbitalSchema) => void;
24
32
  onClose: () => void;
25
33
  }
26
- export declare function OrbInspector({ node, schema, editable, onSchemaChange, onClose }: OrbInspectorProps): React.ReactElement;
34
+ export declare function OrbInspector({ node, schema, editable, userType, onSchemaChange, onClose }: OrbInspectorProps): React.ReactElement;
27
35
  export declare namespace OrbInspector {
28
36
  var displayName: string;
29
37
  }
@@ -21791,7 +21791,8 @@ function DataGrid({
21791
21791
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21792
21792
  }
21793
21793
  if (data.length === 0) {
21794
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21794
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21795
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21795
21796
  }
21796
21797
  const allIds = data.map((item, i) => item.id || String(i));
21797
21798
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -22176,7 +22177,8 @@ function DataList({
22176
22177
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
22177
22178
  }
22178
22179
  if (data.length === 0) {
22179
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22180
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22181
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
22180
22182
  }
22181
22183
  const gapClass = {
22182
22184
  none: "",
@@ -21745,7 +21745,8 @@ function DataGrid({
21745
21745
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21746
21746
  }
21747
21747
  if (data.length === 0) {
21748
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21748
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21749
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21749
21750
  }
21750
21751
  const allIds = data.map((item, i) => item.id || String(i));
21751
21752
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -22130,7 +22131,8 @@ function DataList({
22130
22131
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
22131
22132
  }
22132
22133
  if (data.length === 0) {
22133
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22134
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22135
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
22134
22136
  }
22135
22137
  const gapClass = {
22136
22138
  none: "",
@@ -21560,7 +21560,8 @@ function DataGrid({
21560
21560
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21561
21561
  }
21562
21562
  if (data.length === 0) {
21563
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21563
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21564
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21564
21565
  }
21565
21566
  const allIds = data.map((item, i) => item.id || String(i));
21566
21567
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -21945,7 +21946,8 @@ function DataList({
21945
21946
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21946
21947
  }
21947
21948
  if (data.length === 0) {
21948
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21949
+ const emptyNode = /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21950
+ return dnd.enabled ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21949
21951
  }
21950
21952
  const gapClass = {
21951
21953
  none: "",
@@ -21514,7 +21514,8 @@ function DataGrid({
21514
21514
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21515
21515
  }
21516
21516
  if (data.length === 0) {
21517
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21517
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21518
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21518
21519
  }
21519
21520
  const allIds = data.map((item, i) => item.id || String(i));
21520
21521
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
@@ -21899,7 +21900,8 @@ function DataList({
21899
21900
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-8", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: error.message }) });
21900
21901
  }
21901
21902
  if (data.length === 0) {
21902
- return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21903
+ const emptyNode = /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
21904
+ return dnd.enabled ? /* @__PURE__ */ jsx(Fragment, { children: dnd.wrapContainer(emptyNode) }) : emptyNode;
21903
21905
  }
21904
21906
  const gapClass = {
21905
21907
  none: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.50.8",
3
+ "version": "4.50.10",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [