@almadar/ui 4.50.9 → 4.50.11
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 +145 -35
- package/dist/avl/index.d.cts +16 -1
- package/dist/avl/index.js +145 -35
- package/dist/components/index.cjs +34 -9
- package/dist/components/index.js +34 -9
- package/dist/components/organisms/avl/FlowCanvas.d.ts +7 -0
- package/dist/components/organisms/avl/OrbInspector.d.ts +9 -1
- package/dist/providers/index.cjs +34 -9
- package/dist/providers/index.js +34 -9
- package/dist/runtime/index.cjs +34 -9
- package/dist/runtime/index.js +34 -9
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -24947,6 +24947,7 @@ function useDataDnd(args) {
|
|
|
24947
24947
|
const unregisterZone = React93__namespace.default.useCallback((zoneId2) => {
|
|
24948
24948
|
zonesRef.current.delete(zoneId2);
|
|
24949
24949
|
}, []);
|
|
24950
|
+
const [activeDrag, setActiveDrag] = React93__namespace.default.useState(null);
|
|
24950
24951
|
const zoneId = React93__namespace.default.useId();
|
|
24951
24952
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
24952
24953
|
const meta = React93__namespace.default.useMemo(
|
|
@@ -25127,30 +25128,49 @@ function useDataDnd(args) {
|
|
|
25127
25128
|
id: droppableId,
|
|
25128
25129
|
data: sortableData
|
|
25129
25130
|
});
|
|
25131
|
+
const ctx = React93__namespace.default.useContext(RootCtx);
|
|
25132
|
+
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25133
|
+
const showForeignPlaceholder = isOver && activeDrag2 != null && activeDrag2.sourceGroup !== ownGroup;
|
|
25130
25134
|
React93__namespace.default.useEffect(() => {
|
|
25131
|
-
dndLog.debug("dropzone:isOver:change", { droppableId, group: ownGroup, isOver });
|
|
25132
|
-
}, [droppableId, isOver]);
|
|
25133
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
25135
|
+
dndLog.debug("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, showForeignPlaceholder });
|
|
25136
|
+
}, [droppableId, isOver, showForeignPlaceholder]);
|
|
25137
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25134
25138
|
Box,
|
|
25135
25139
|
{
|
|
25136
25140
|
ref: setNodeRef,
|
|
25137
25141
|
"data-dnd-zone": ownGroup,
|
|
25138
25142
|
"data-dnd-is-over": isOver ? "true" : "false",
|
|
25139
25143
|
className: isOver ? "ring-2 ring-primary ring-offset-2 rounded-lg transition-all min-h-[3rem]" : "min-h-[3rem] rounded-lg transition-all",
|
|
25140
|
-
children
|
|
25144
|
+
children: [
|
|
25145
|
+
children,
|
|
25146
|
+
showForeignPlaceholder ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
25147
|
+
Box,
|
|
25148
|
+
{
|
|
25149
|
+
"data-dnd-placeholder": true,
|
|
25150
|
+
style: { height: activeDrag2.height },
|
|
25151
|
+
className: "border-2 border-dashed border-primary/60 bg-primary/5 rounded-md my-1 transition-all"
|
|
25152
|
+
}
|
|
25153
|
+
) : null
|
|
25154
|
+
]
|
|
25141
25155
|
}
|
|
25142
25156
|
);
|
|
25143
25157
|
};
|
|
25144
25158
|
const rootContextValue = React93__namespace.default.useMemo(
|
|
25145
|
-
() => ({ registerZone, unregisterZone }),
|
|
25146
|
-
[registerZone, unregisterZone]
|
|
25159
|
+
() => ({ registerZone, unregisterZone, activeDrag }),
|
|
25160
|
+
[registerZone, unregisterZone, activeDrag]
|
|
25147
25161
|
);
|
|
25148
25162
|
const handleDragStart = React93__namespace.default.useCallback((event) => {
|
|
25149
25163
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25164
|
+
const rect = event.active.rect.current.initial;
|
|
25165
|
+
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
25166
|
+
if (sourceZone) {
|
|
25167
|
+
setActiveDrag({ sourceGroup: sourceZone.group, height });
|
|
25168
|
+
}
|
|
25150
25169
|
dndLog.info("dragStart", {
|
|
25151
25170
|
activeId: event.active.id,
|
|
25152
25171
|
activeData: event.active.data?.current,
|
|
25153
25172
|
sourceGroup: sourceZone?.group,
|
|
25173
|
+
height,
|
|
25154
25174
|
zoneCount: zonesRef.current.size
|
|
25155
25175
|
});
|
|
25156
25176
|
}, [findZoneByItem]);
|
|
@@ -25162,11 +25182,16 @@ function useDataDnd(args) {
|
|
|
25162
25182
|
});
|
|
25163
25183
|
}, []);
|
|
25164
25184
|
const handleDragCancel = React93__namespace.default.useCallback((event) => {
|
|
25185
|
+
setActiveDrag(null);
|
|
25165
25186
|
dndLog.warn("dragCancel", {
|
|
25166
25187
|
activeId: event.active.id,
|
|
25167
25188
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25168
25189
|
});
|
|
25169
25190
|
}, []);
|
|
25191
|
+
const handleDragEndWithCleanup = React93__namespace.default.useCallback((event) => {
|
|
25192
|
+
handleDragEnd(event);
|
|
25193
|
+
setActiveDrag(null);
|
|
25194
|
+
}, [handleDragEnd]);
|
|
25170
25195
|
const wrapContainer = React93__namespace.default.useCallback(
|
|
25171
25196
|
(children) => {
|
|
25172
25197
|
if (!enabled) return children;
|
|
@@ -25180,7 +25205,7 @@ function useDataDnd(args) {
|
|
|
25180
25205
|
collisionDetection,
|
|
25181
25206
|
onDragStart: handleDragStart,
|
|
25182
25207
|
onDragOver: handleDragOver,
|
|
25183
|
-
onDragEnd:
|
|
25208
|
+
onDragEnd: handleDragEndWithCleanup,
|
|
25184
25209
|
onDragCancel: handleDragCancel,
|
|
25185
25210
|
children
|
|
25186
25211
|
}
|
|
@@ -25195,7 +25220,7 @@ function useDataDnd(args) {
|
|
|
25195
25220
|
collisionDetection,
|
|
25196
25221
|
onDragStart: handleDragStart,
|
|
25197
25222
|
onDragOver: handleDragOver,
|
|
25198
|
-
onDragEnd:
|
|
25223
|
+
onDragEnd: handleDragEndWithCleanup,
|
|
25199
25224
|
onDragCancel: handleDragCancel,
|
|
25200
25225
|
children: inner
|
|
25201
25226
|
}
|
|
@@ -25203,7 +25228,7 @@ function useDataDnd(args) {
|
|
|
25203
25228
|
}
|
|
25204
25229
|
return inner;
|
|
25205
25230
|
},
|
|
25206
|
-
[enabled, isZone, layout, sensors, collisionDetection, handleDragStart, handleDragOver,
|
|
25231
|
+
[enabled, isZone, layout, sensors, collisionDetection, handleDragStart, handleDragOver, handleDragEndWithCleanup, handleDragCancel, itemIds, isRoot, rootContextValue]
|
|
25207
25232
|
);
|
|
25208
25233
|
return {
|
|
25209
25234
|
enabled,
|
|
@@ -59826,7 +59851,7 @@ function findPatternInTree(root, path) {
|
|
|
59826
59851
|
}
|
|
59827
59852
|
var FIELD_TYPE_OPTIONS = core.FieldTypeSchema.options.map((v) => ({ value: v, label: v }));
|
|
59828
59853
|
var EFFECT_TYPE_OPTIONS = Object.keys(exports.EFFECT_TYPE_TO_CATEGORY).map((v) => ({ value: v, label: v }));
|
|
59829
|
-
function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose }) {
|
|
59854
|
+
function OrbInspector({ node, schema, editable = false, userType = "builder", onSchemaChange, onClose }) {
|
|
59830
59855
|
const { selected: selectedPattern } = React93.useContext(PatternSelectionContext);
|
|
59831
59856
|
const [activeTab, setActiveTab] = React93.useState("inspector");
|
|
59832
59857
|
const eventBus = useEventBus();
|
|
@@ -59932,27 +59957,18 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
59932
59957
|
}
|
|
59933
59958
|
)
|
|
59934
59959
|
] }),
|
|
59935
|
-
/* @__PURE__ */ jsxRuntime.
|
|
59936
|
-
|
|
59937
|
-
|
|
59938
|
-
|
|
59939
|
-
|
|
59940
|
-
|
|
59941
|
-
|
|
59942
|
-
|
|
59943
|
-
|
|
59944
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
59945
|
-
"button",
|
|
59946
|
-
{
|
|
59947
|
-
onClick: () => setActiveTab("code"),
|
|
59948
|
-
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"}`,
|
|
59949
|
-
children: "Code"
|
|
59950
|
-
}
|
|
59951
|
-
)
|
|
59952
|
-
] })
|
|
59960
|
+
/* @__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(
|
|
59961
|
+
"button",
|
|
59962
|
+
{
|
|
59963
|
+
onClick: () => setActiveTab(tab),
|
|
59964
|
+
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"}`,
|
|
59965
|
+
children: tab
|
|
59966
|
+
},
|
|
59967
|
+
tab
|
|
59968
|
+
)) })
|
|
59953
59969
|
] }),
|
|
59954
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" ? (
|
|
59955
|
-
/* ── Code Tab ── */
|
|
59970
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1 overflow-y-auto", children: activeTab === "code" && userType === "architect" ? (
|
|
59971
|
+
/* ── Code Tab (architect only) ── */
|
|
59956
59972
|
/* GAP-51: when editable, the CodeBlock molecule renders the existing
|
|
59957
59973
|
Textarea atom internally and forwards keystrokes via UI:CODE_CHANGE
|
|
59958
59974
|
on the EventBus. The consumer (builder workspace) listens, debounces,
|
|
@@ -59970,6 +59986,21 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
59970
59986
|
onChange: editable ? (code) => eventBus.emit("UI:CODE_CHANGE", { code }) : void 0
|
|
59971
59987
|
}
|
|
59972
59988
|
) })
|
|
59989
|
+
) : activeTab === "styles" ? (
|
|
59990
|
+
/* ── Styles Tab (read-only in Phase 2) ──
|
|
59991
|
+
Phase 2 ships a token-only viewer with no editing. The proper
|
|
59992
|
+
tokenContract on PatternDefinition lands in Phase 6; until then
|
|
59993
|
+
we fall back to a static map of well-known atoms keyed by
|
|
59994
|
+
pattern type. Patterns missing from the map render a placeholder
|
|
59995
|
+
so the gap is visible rather than silently empty. */
|
|
59996
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
59997
|
+
StylesTabReadOnly,
|
|
59998
|
+
{
|
|
59999
|
+
patternType,
|
|
60000
|
+
patternDef,
|
|
60001
|
+
patternConfig
|
|
60002
|
+
}
|
|
60003
|
+
)
|
|
59973
60004
|
) : (
|
|
59974
60005
|
/* ── Inspector Tab ── */
|
|
59975
60006
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -59996,7 +60027,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
59996
60027
|
] }, propName);
|
|
59997
60028
|
}) })
|
|
59998
60029
|
] }),
|
|
59999
|
-
(selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
60030
|
+
userType === "architect" && (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
60000
60031
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Entity") }),
|
|
60001
60032
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-2 mb-2", children: [
|
|
60002
60033
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: 7, cy: 7, r: 5, fill: "var(--color-primary)" }) }),
|
|
@@ -60120,7 +60151,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
60120
60151
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsxRuntime.jsx(AvlEvent, { x: 8, y: 8, size: 12 }) }),
|
|
60121
60152
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: transitionEvent })
|
|
60122
60153
|
] }) }),
|
|
60123
|
-
(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: [
|
|
60154
|
+
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: [
|
|
60124
60155
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, children: /* @__PURE__ */ jsxRuntime.jsx(AvlGuard, { x: 8, y: 8, size: 12 }) }),
|
|
60125
60156
|
editable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
60126
60157
|
Input,
|
|
@@ -60132,7 +60163,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
60132
60163
|
}
|
|
60133
60164
|
) : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-mono text-[11px] text-muted-foreground", children: formatExpression(transition?.guard ?? guard) })
|
|
60134
60165
|
] }) }),
|
|
60135
|
-
(effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
60166
|
+
userType === "architect" && (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
60136
60167
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: [
|
|
60137
60168
|
t("Effects"),
|
|
60138
60169
|
" (",
|
|
@@ -60164,7 +60195,7 @@ function OrbInspector({ node, schema, editable = false, onSchemaChange, onClose
|
|
|
60164
60195
|
}) }),
|
|
60165
60196
|
editable && /* @__PURE__ */ jsxRuntime.jsx(AddEffectButton, { onAdd: handleAddEffect })
|
|
60166
60197
|
] }),
|
|
60167
|
-
patterns$1.length > 0 && !selectedPattern && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3", children: [
|
|
60198
|
+
userType === "architect" && patterns$1.length > 0 && !selectedPattern && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3", children: [
|
|
60168
60199
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: "render-ui" }),
|
|
60169
60200
|
/* @__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: [
|
|
60170
60201
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "text-muted-foreground text-[10px]", children: [
|
|
@@ -60237,6 +60268,83 @@ function OrbPatternTree({ config, depth }) {
|
|
|
60237
60268
|
] });
|
|
60238
60269
|
}
|
|
60239
60270
|
OrbInspector.displayName = "OrbInspector";
|
|
60271
|
+
var PHASE_2_TOKEN_FALLBACK = {
|
|
60272
|
+
button: ["--color-primary", "--color-primary-foreground", "--radius-md", "--shadow-sm"],
|
|
60273
|
+
badge: ["--color-primary", "--radius-full"],
|
|
60274
|
+
card: ["--color-card", "--color-border", "--radius-lg", "--shadow-main"],
|
|
60275
|
+
input: ["--color-input", "--color-border", "--radius-md"],
|
|
60276
|
+
typography: ["--color-foreground", "--color-muted-foreground"],
|
|
60277
|
+
divider: ["--color-border"],
|
|
60278
|
+
avatar: ["--radius-full", "--color-muted"],
|
|
60279
|
+
alert: ["--color-warning", "--color-success", "--color-danger", "--radius-md"],
|
|
60280
|
+
modal: ["--color-card", "--shadow-lg", "--radius-lg"],
|
|
60281
|
+
toast: ["--color-card", "--shadow-lg", "--radius-md"]
|
|
60282
|
+
};
|
|
60283
|
+
function StylesTabReadOnly({ patternType, patternDef, patternConfig }) {
|
|
60284
|
+
const { t } = useTranslate();
|
|
60285
|
+
if (!patternType) {
|
|
60286
|
+
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.") }) });
|
|
60287
|
+
}
|
|
60288
|
+
const tier = patternDef?.category ?? "Pattern";
|
|
60289
|
+
const tokens = PHASE_2_TOKEN_FALLBACK[patternType] ?? [];
|
|
60290
|
+
const variantEnum = patternDef?.propsSchema?.variant?.enumValues;
|
|
60291
|
+
const sizeEnum = patternDef?.propsSchema?.size?.enumValues;
|
|
60292
|
+
const currentVariant = patternConfig && typeof patternConfig.variant === "string" ? patternConfig.variant : void 0;
|
|
60293
|
+
const currentSize = patternConfig && typeof patternConfig.size === "string" ? patternConfig.size : void 0;
|
|
60294
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-3 flex flex-col gap-4", children: [
|
|
60295
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
60296
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "font-semibold text-[12px]", children: patternType }),
|
|
60297
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60298
|
+
Box,
|
|
60299
|
+
{
|
|
60300
|
+
className: "rounded px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider",
|
|
60301
|
+
style: { backgroundColor: "var(--color-muted)", color: "var(--color-muted-foreground)" },
|
|
60302
|
+
children: tier
|
|
60303
|
+
}
|
|
60304
|
+
)
|
|
60305
|
+
] }),
|
|
60306
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
60307
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Tokens") }),
|
|
60308
|
+
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)) })
|
|
60309
|
+
] }),
|
|
60310
|
+
variantEnum && variantEnum.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
60311
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Variant") }),
|
|
60312
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-wrap gap-1", children: variantEnum.map((variant) => {
|
|
60313
|
+
const isActive = variant === currentVariant || !currentVariant && variant === "default";
|
|
60314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60315
|
+
Box,
|
|
60316
|
+
{
|
|
60317
|
+
className: "rounded px-2 py-0.5 text-[11px] font-mono",
|
|
60318
|
+
style: {
|
|
60319
|
+
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
|
|
60320
|
+
color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
|
|
60321
|
+
},
|
|
60322
|
+
children: variant
|
|
60323
|
+
},
|
|
60324
|
+
variant
|
|
60325
|
+
);
|
|
60326
|
+
}) })
|
|
60327
|
+
] }),
|
|
60328
|
+
sizeEnum && sizeEnum.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
60329
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "text-muted-foreground text-[10px] uppercase tracking-wider mb-2", children: t("Size") }),
|
|
60330
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex flex-wrap gap-1", children: sizeEnum.map((size) => {
|
|
60331
|
+
const isActive = size === currentSize || !currentSize && size === "md";
|
|
60332
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60333
|
+
Box,
|
|
60334
|
+
{
|
|
60335
|
+
className: "rounded px-2 py-0.5 text-[11px] font-mono",
|
|
60336
|
+
style: {
|
|
60337
|
+
backgroundColor: isActive ? "var(--color-primary)" : "var(--color-muted)",
|
|
60338
|
+
color: isActive ? "var(--color-primary-foreground)" : "var(--color-muted-foreground)"
|
|
60339
|
+
},
|
|
60340
|
+
children: size
|
|
60341
|
+
},
|
|
60342
|
+
size
|
|
60343
|
+
);
|
|
60344
|
+
}) })
|
|
60345
|
+
] })
|
|
60346
|
+
] });
|
|
60347
|
+
}
|
|
60240
60348
|
|
|
60241
60349
|
// components/organisms/avl/FlowCanvas.tsx
|
|
60242
60350
|
init_Box();
|
|
@@ -60280,7 +60388,8 @@ function FlowCanvasInner({
|
|
|
60280
60388
|
onNodeSelect,
|
|
60281
60389
|
composeLevel,
|
|
60282
60390
|
behaviorEntries,
|
|
60283
|
-
behaviorWires
|
|
60391
|
+
behaviorWires,
|
|
60392
|
+
userType = "builder"
|
|
60284
60393
|
}) {
|
|
60285
60394
|
const NODE_TYPES2 = React93.useMemo(() => ({
|
|
60286
60395
|
preview: OrbPreviewNode,
|
|
@@ -60575,6 +60684,7 @@ function FlowCanvasInner({
|
|
|
60575
60684
|
node: selectedNode,
|
|
60576
60685
|
schema: parsedSchema,
|
|
60577
60686
|
editable,
|
|
60687
|
+
userType,
|
|
60578
60688
|
onSchemaChange,
|
|
60579
60689
|
onClose: handleClosePanel
|
|
60580
60690
|
}
|
package/dist/avl/index.d.cts
CHANGED
|
@@ -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
|
|