@almadar/ui 5.14.0 → 5.15.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.
- package/dist/avl/index.cjs +50 -10
- package/dist/avl/index.js +50 -10
- package/dist/components/index.cjs +48 -9
- package/dist/components/index.js +48 -9
- package/dist/components/molecules/Coachmark.d.ts +7 -0
- package/dist/context/index.cjs +5 -1
- package/dist/context/index.js +5 -1
- package/dist/hooks/index.cjs +5 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/useUISlots.d.ts +14 -0
- package/dist/providers/index.cjs +26 -4
- package/dist/providers/index.js +26 -4
- package/dist/runtime/index.cjs +45 -9
- package/dist/runtime/index.js +45 -9
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -5485,7 +5485,11 @@ function useUISlotManager() {
|
|
|
5485
5485
|
priority: config.priority ?? 0,
|
|
5486
5486
|
animation: config.animation ?? "fade",
|
|
5487
5487
|
onDismiss: config.onDismiss,
|
|
5488
|
-
sourceTrait: config.sourceTrait
|
|
5488
|
+
sourceTrait: config.sourceTrait,
|
|
5489
|
+
slot: config.target,
|
|
5490
|
+
transitionEvent: config.transitionEvent,
|
|
5491
|
+
fromState: config.fromState,
|
|
5492
|
+
entity: config.entity
|
|
5489
5493
|
};
|
|
5490
5494
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
5491
5495
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
@@ -56359,7 +56363,7 @@ function getToastPosition(position) {
|
|
|
56359
56363
|
return "top-4 right-4";
|
|
56360
56364
|
}
|
|
56361
56365
|
}
|
|
56362
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
56366
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
56363
56367
|
if (children === void 0 || children === null) return null;
|
|
56364
56368
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
56365
56369
|
if (childrenArray.length === 0) return null;
|
|
@@ -56390,8 +56394,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
56390
56394
|
nodeId: child._id,
|
|
56391
56395
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
56392
56396
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
56393
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
56394
|
-
|
|
56397
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
56398
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
56399
|
+
// nested node carries a complete contextual-edit address.
|
|
56400
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
56401
|
+
...orbCtx ?? {}
|
|
56395
56402
|
};
|
|
56396
56403
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
56397
56404
|
SlotContentRenderer,
|
|
@@ -56507,7 +56514,12 @@ function SlotContentRenderer({
|
|
|
56507
56514
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
56508
56515
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
56509
56516
|
const myPath = patternPath ?? "root";
|
|
56510
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
56517
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
56518
|
+
slot: content.slot,
|
|
56519
|
+
transitionEvent: content.transitionEvent,
|
|
56520
|
+
fromState: content.fromState,
|
|
56521
|
+
entity: content.entity
|
|
56522
|
+
}) : void 0;
|
|
56511
56523
|
const incomingChildren = content.props.children;
|
|
56512
56524
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
56513
56525
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -56554,6 +56566,13 @@ function SlotContentRenderer({
|
|
|
56554
56566
|
"data-pattern-path": myPath,
|
|
56555
56567
|
"data-pattern-type": content.pattern,
|
|
56556
56568
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
56569
|
+
"data-orb-trait": content.sourceTrait,
|
|
56570
|
+
"data-orb-slot": content.slot,
|
|
56571
|
+
"data-orb-transition": content.transitionEvent,
|
|
56572
|
+
"data-orb-state": content.fromState,
|
|
56573
|
+
"data-orb-entity": content.entity,
|
|
56574
|
+
"data-orb-path": myPath,
|
|
56575
|
+
"data-orb-pattern": content.pattern,
|
|
56557
56576
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps })
|
|
56558
56577
|
}
|
|
56559
56578
|
);
|
|
@@ -56566,6 +56585,13 @@ function SlotContentRenderer({
|
|
|
56566
56585
|
"data-id": content.id,
|
|
56567
56586
|
"data-node-id": content.nodeId,
|
|
56568
56587
|
"data-source-trait": content.sourceTrait,
|
|
56588
|
+
"data-orb-trait": content.sourceTrait,
|
|
56589
|
+
"data-orb-slot": content.slot,
|
|
56590
|
+
"data-orb-transition": content.transitionEvent,
|
|
56591
|
+
"data-orb-state": content.fromState,
|
|
56592
|
+
"data-orb-entity": content.entity,
|
|
56593
|
+
"data-orb-path": patternPath ?? "root",
|
|
56594
|
+
"data-orb-pattern": content.pattern,
|
|
56569
56595
|
children: content.props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
56570
56596
|
"Unknown pattern: ",
|
|
56571
56597
|
content.pattern,
|
|
@@ -60417,7 +60443,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60417
60443
|
embeddedTraitsRef.current = options?.embeddedTraits;
|
|
60418
60444
|
}, [options?.embeddedTraits]);
|
|
60419
60445
|
const flushSlot = React98.useCallback(
|
|
60420
|
-
(traitName, slot, patterns) => {
|
|
60446
|
+
(traitName, slot, patterns, source) => {
|
|
60421
60447
|
const slots = uiSlotsRef.current;
|
|
60422
60448
|
const embedded = embeddedTraitsRef.current;
|
|
60423
60449
|
if (patterns.length === 0) {
|
|
@@ -60446,7 +60472,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60446
60472
|
pattern: patternType,
|
|
60447
60473
|
props,
|
|
60448
60474
|
priority: 0,
|
|
60449
|
-
animation: "fade"
|
|
60475
|
+
animation: "fade",
|
|
60476
|
+
transitionEvent: source?.event,
|
|
60477
|
+
fromState: source?.state,
|
|
60478
|
+
entity: source?.entity
|
|
60450
60479
|
});
|
|
60451
60480
|
return;
|
|
60452
60481
|
}
|
|
@@ -60460,7 +60489,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60460
60489
|
target: slot,
|
|
60461
60490
|
pattern: patternType,
|
|
60462
60491
|
props,
|
|
60463
|
-
sourceTrait: traitName
|
|
60492
|
+
sourceTrait: traitName,
|
|
60493
|
+
transitionEvent: source?.event,
|
|
60494
|
+
fromState: source?.state,
|
|
60495
|
+
entity: source?.entity
|
|
60464
60496
|
});
|
|
60465
60497
|
},
|
|
60466
60498
|
[]
|
|
@@ -60593,7 +60625,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60593
60625
|
}
|
|
60594
60626
|
}
|
|
60595
60627
|
for (const [slot, patterns] of pendingSlots) {
|
|
60596
|
-
flushSlot(binding.trait.name, slot, patterns
|
|
60628
|
+
flushSlot(binding.trait.name, slot, patterns, {
|
|
60629
|
+
event: `tick:${tick.name}`,
|
|
60630
|
+
state: currentState,
|
|
60631
|
+
entity: binding.linkedEntity
|
|
60632
|
+
});
|
|
60597
60633
|
}
|
|
60598
60634
|
}, [flushSlot]);
|
|
60599
60635
|
React98.useEffect(() => {
|
|
@@ -60845,7 +60881,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60845
60881
|
transition: `${result.previousState}->${result.newState}`,
|
|
60846
60882
|
cleared: patterns.length === 0
|
|
60847
60883
|
});
|
|
60848
|
-
flushSlot(traitName, slot, patterns
|
|
60884
|
+
flushSlot(traitName, slot, patterns, {
|
|
60885
|
+
event: eventKey,
|
|
60886
|
+
state: result.previousState,
|
|
60887
|
+
entity: binding.linkedEntity
|
|
60888
|
+
});
|
|
60849
60889
|
}
|
|
60850
60890
|
} catch (error) {
|
|
60851
60891
|
stateLog.error("transition:effect-error", {
|
package/dist/avl/index.js
CHANGED
|
@@ -5436,7 +5436,11 @@ function useUISlotManager() {
|
|
|
5436
5436
|
priority: config.priority ?? 0,
|
|
5437
5437
|
animation: config.animation ?? "fade",
|
|
5438
5438
|
onDismiss: config.onDismiss,
|
|
5439
|
-
sourceTrait: config.sourceTrait
|
|
5439
|
+
sourceTrait: config.sourceTrait,
|
|
5440
|
+
slot: config.target,
|
|
5441
|
+
transitionEvent: config.transitionEvent,
|
|
5442
|
+
fromState: config.fromState,
|
|
5443
|
+
entity: config.entity
|
|
5440
5444
|
};
|
|
5441
5445
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
5442
5446
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
@@ -56310,7 +56314,7 @@ function getToastPosition(position) {
|
|
|
56310
56314
|
return "top-4 right-4";
|
|
56311
56315
|
}
|
|
56312
56316
|
}
|
|
56313
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
56317
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
56314
56318
|
if (children === void 0 || children === null) return null;
|
|
56315
56319
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
56316
56320
|
if (childrenArray.length === 0) return null;
|
|
@@ -56341,8 +56345,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
56341
56345
|
nodeId: child._id,
|
|
56342
56346
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
56343
56347
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
56344
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
56345
|
-
|
|
56348
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
56349
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
56350
|
+
// nested node carries a complete contextual-edit address.
|
|
56351
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
56352
|
+
...orbCtx ?? {}
|
|
56346
56353
|
};
|
|
56347
56354
|
return /* @__PURE__ */ jsx(
|
|
56348
56355
|
SlotContentRenderer,
|
|
@@ -56458,7 +56465,12 @@ function SlotContentRenderer({
|
|
|
56458
56465
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
56459
56466
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
56460
56467
|
const myPath = patternPath ?? "root";
|
|
56461
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
56468
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
56469
|
+
slot: content.slot,
|
|
56470
|
+
transitionEvent: content.transitionEvent,
|
|
56471
|
+
fromState: content.fromState,
|
|
56472
|
+
entity: content.entity
|
|
56473
|
+
}) : void 0;
|
|
56462
56474
|
const incomingChildren = content.props.children;
|
|
56463
56475
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
56464
56476
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -56505,6 +56517,13 @@ function SlotContentRenderer({
|
|
|
56505
56517
|
"data-pattern-path": myPath,
|
|
56506
56518
|
"data-pattern-type": content.pattern,
|
|
56507
56519
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
56520
|
+
"data-orb-trait": content.sourceTrait,
|
|
56521
|
+
"data-orb-slot": content.slot,
|
|
56522
|
+
"data-orb-transition": content.transitionEvent,
|
|
56523
|
+
"data-orb-state": content.fromState,
|
|
56524
|
+
"data-orb-entity": content.entity,
|
|
56525
|
+
"data-orb-path": myPath,
|
|
56526
|
+
"data-orb-pattern": content.pattern,
|
|
56508
56527
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
56509
56528
|
}
|
|
56510
56529
|
);
|
|
@@ -56517,6 +56536,13 @@ function SlotContentRenderer({
|
|
|
56517
56536
|
"data-id": content.id,
|
|
56518
56537
|
"data-node-id": content.nodeId,
|
|
56519
56538
|
"data-source-trait": content.sourceTrait,
|
|
56539
|
+
"data-orb-trait": content.sourceTrait,
|
|
56540
|
+
"data-orb-slot": content.slot,
|
|
56541
|
+
"data-orb-transition": content.transitionEvent,
|
|
56542
|
+
"data-orb-state": content.fromState,
|
|
56543
|
+
"data-orb-entity": content.entity,
|
|
56544
|
+
"data-orb-path": patternPath ?? "root",
|
|
56545
|
+
"data-orb-pattern": content.pattern,
|
|
56520
56546
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
56521
56547
|
"Unknown pattern: ",
|
|
56522
56548
|
content.pattern,
|
|
@@ -60368,7 +60394,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60368
60394
|
embeddedTraitsRef.current = options?.embeddedTraits;
|
|
60369
60395
|
}, [options?.embeddedTraits]);
|
|
60370
60396
|
const flushSlot = useCallback(
|
|
60371
|
-
(traitName, slot, patterns) => {
|
|
60397
|
+
(traitName, slot, patterns, source) => {
|
|
60372
60398
|
const slots = uiSlotsRef.current;
|
|
60373
60399
|
const embedded = embeddedTraitsRef.current;
|
|
60374
60400
|
if (patterns.length === 0) {
|
|
@@ -60397,7 +60423,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60397
60423
|
pattern: patternType,
|
|
60398
60424
|
props,
|
|
60399
60425
|
priority: 0,
|
|
60400
|
-
animation: "fade"
|
|
60426
|
+
animation: "fade",
|
|
60427
|
+
transitionEvent: source?.event,
|
|
60428
|
+
fromState: source?.state,
|
|
60429
|
+
entity: source?.entity
|
|
60401
60430
|
});
|
|
60402
60431
|
return;
|
|
60403
60432
|
}
|
|
@@ -60411,7 +60440,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60411
60440
|
target: slot,
|
|
60412
60441
|
pattern: patternType,
|
|
60413
60442
|
props,
|
|
60414
|
-
sourceTrait: traitName
|
|
60443
|
+
sourceTrait: traitName,
|
|
60444
|
+
transitionEvent: source?.event,
|
|
60445
|
+
fromState: source?.state,
|
|
60446
|
+
entity: source?.entity
|
|
60415
60447
|
});
|
|
60416
60448
|
},
|
|
60417
60449
|
[]
|
|
@@ -60544,7 +60576,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60544
60576
|
}
|
|
60545
60577
|
}
|
|
60546
60578
|
for (const [slot, patterns] of pendingSlots) {
|
|
60547
|
-
flushSlot(binding.trait.name, slot, patterns
|
|
60579
|
+
flushSlot(binding.trait.name, slot, patterns, {
|
|
60580
|
+
event: `tick:${tick.name}`,
|
|
60581
|
+
state: currentState,
|
|
60582
|
+
entity: binding.linkedEntity
|
|
60583
|
+
});
|
|
60548
60584
|
}
|
|
60549
60585
|
}, [flushSlot]);
|
|
60550
60586
|
useEffect(() => {
|
|
@@ -60796,7 +60832,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
60796
60832
|
transition: `${result.previousState}->${result.newState}`,
|
|
60797
60833
|
cleared: patterns.length === 0
|
|
60798
60834
|
});
|
|
60799
|
-
flushSlot(traitName, slot, patterns
|
|
60835
|
+
flushSlot(traitName, slot, patterns, {
|
|
60836
|
+
event: eventKey,
|
|
60837
|
+
state: result.previousState,
|
|
60838
|
+
entity: binding.linkedEntity
|
|
60839
|
+
});
|
|
60800
60840
|
}
|
|
60801
60841
|
} catch (error) {
|
|
60802
60842
|
stateLog.error("transition:effect-error", {
|
|
@@ -23981,11 +23981,13 @@ var init_Coachmark = __esm({
|
|
|
23981
23981
|
onSecondary,
|
|
23982
23982
|
secondaryLabel,
|
|
23983
23983
|
showBeacon = false,
|
|
23984
|
+
fallbackCentered = false,
|
|
23984
23985
|
className
|
|
23985
23986
|
}) => {
|
|
23986
23987
|
const cardRef = React80.useRef(null);
|
|
23987
23988
|
const rect = useAnchorRect(anchor, open);
|
|
23988
23989
|
const [pos, setPos] = React80.useState(null);
|
|
23990
|
+
const centered = open && !rect && fallbackCentered;
|
|
23989
23991
|
React80.useLayoutEffect(() => {
|
|
23990
23992
|
if (!open || !rect || !cardRef.current) {
|
|
23991
23993
|
setPos(null);
|
|
@@ -23997,8 +23999,18 @@ var init_Coachmark = __esm({
|
|
|
23997
23999
|
};
|
|
23998
24000
|
setPos(placeCard(placement, rect, size));
|
|
23999
24001
|
}, [open, rect, placement, children, title]);
|
|
24000
|
-
|
|
24002
|
+
React80.useEffect(() => {
|
|
24003
|
+
if (!open) return;
|
|
24004
|
+
const onKey = (e) => {
|
|
24005
|
+
if (e.key === "Escape") onDismiss();
|
|
24006
|
+
};
|
|
24007
|
+
window.addEventListener("keydown", onKey);
|
|
24008
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
24009
|
+
}, [open, onDismiss]);
|
|
24010
|
+
if (!open || typeof document === "undefined") return null;
|
|
24011
|
+
if (!rect && !centered) return null;
|
|
24001
24012
|
const hasFooter = Boolean(onPrimary || onSecondary);
|
|
24013
|
+
const cardStyle = centered ? { top: "50%", left: "50%", transform: "translate(-50%, -50%)" } : pos ? { top: pos.top, left: pos.left } : { top: -9999, left: -9999 };
|
|
24002
24014
|
const card = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24003
24015
|
exports.Box,
|
|
24004
24016
|
{
|
|
@@ -24012,10 +24024,10 @@ var init_Coachmark = __esm({
|
|
|
24012
24024
|
"aria-label": title,
|
|
24013
24025
|
className: cn(
|
|
24014
24026
|
"fixed z-50 max-w-xs w-72 transition-opacity duration-150",
|
|
24015
|
-
pos ? "opacity-100" : "opacity-0",
|
|
24027
|
+
centered || pos ? "opacity-100" : "opacity-0",
|
|
24016
24028
|
className
|
|
24017
24029
|
),
|
|
24018
|
-
style:
|
|
24030
|
+
style: cardStyle,
|
|
24019
24031
|
children: [
|
|
24020
24032
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24021
24033
|
"button",
|
|
@@ -24036,7 +24048,7 @@ var init_Coachmark = __esm({
|
|
|
24036
24048
|
]
|
|
24037
24049
|
}
|
|
24038
24050
|
);
|
|
24039
|
-
const beacon = showBeacon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
24051
|
+
const beacon = showBeacon && rect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
24040
24052
|
"div",
|
|
24041
24053
|
{
|
|
24042
24054
|
className: "fixed z-50 pointer-events-none",
|
|
@@ -24102,6 +24114,7 @@ var init_OnboardingSpotlight = __esm({
|
|
|
24102
24114
|
open: true,
|
|
24103
24115
|
anchor: step.anchor,
|
|
24104
24116
|
placement: step.placement ?? "bottom",
|
|
24117
|
+
fallbackCentered: true,
|
|
24105
24118
|
title: step.title,
|
|
24106
24119
|
onDismiss: onSkip,
|
|
24107
24120
|
onSecondary: onSkip,
|
|
@@ -47586,7 +47599,7 @@ function getToastPosition(position) {
|
|
|
47586
47599
|
return "top-4 right-4";
|
|
47587
47600
|
}
|
|
47588
47601
|
}
|
|
47589
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47602
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47590
47603
|
if (children === void 0 || children === null) return null;
|
|
47591
47604
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47592
47605
|
if (childrenArray.length === 0) return null;
|
|
@@ -47617,8 +47630,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47617
47630
|
nodeId: child._id,
|
|
47618
47631
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47619
47632
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47620
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47621
|
-
|
|
47633
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47634
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47635
|
+
// nested node carries a complete contextual-edit address.
|
|
47636
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47637
|
+
...orbCtx ?? {}
|
|
47622
47638
|
};
|
|
47623
47639
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47624
47640
|
SlotContentRenderer,
|
|
@@ -47734,7 +47750,12 @@ function SlotContentRenderer({
|
|
|
47734
47750
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47735
47751
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47736
47752
|
const myPath = patternPath ?? "root";
|
|
47737
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47753
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47754
|
+
slot: content.slot,
|
|
47755
|
+
transitionEvent: content.transitionEvent,
|
|
47756
|
+
fromState: content.fromState,
|
|
47757
|
+
entity: content.entity
|
|
47758
|
+
}) : void 0;
|
|
47738
47759
|
const incomingChildren = content.props.children;
|
|
47739
47760
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47740
47761
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47781,6 +47802,13 @@ function SlotContentRenderer({
|
|
|
47781
47802
|
"data-pattern-path": myPath,
|
|
47782
47803
|
"data-pattern-type": content.pattern,
|
|
47783
47804
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47805
|
+
"data-orb-trait": content.sourceTrait,
|
|
47806
|
+
"data-orb-slot": content.slot,
|
|
47807
|
+
"data-orb-transition": content.transitionEvent,
|
|
47808
|
+
"data-orb-state": content.fromState,
|
|
47809
|
+
"data-orb-entity": content.entity,
|
|
47810
|
+
"data-orb-path": myPath,
|
|
47811
|
+
"data-orb-pattern": content.pattern,
|
|
47784
47812
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps })
|
|
47785
47813
|
}
|
|
47786
47814
|
);
|
|
@@ -47793,6 +47821,13 @@ function SlotContentRenderer({
|
|
|
47793
47821
|
"data-id": content.id,
|
|
47794
47822
|
"data-node-id": content.nodeId,
|
|
47795
47823
|
"data-source-trait": content.sourceTrait,
|
|
47824
|
+
"data-orb-trait": content.sourceTrait,
|
|
47825
|
+
"data-orb-slot": content.slot,
|
|
47826
|
+
"data-orb-transition": content.transitionEvent,
|
|
47827
|
+
"data-orb-state": content.fromState,
|
|
47828
|
+
"data-orb-entity": content.entity,
|
|
47829
|
+
"data-orb-path": patternPath ?? "root",
|
|
47830
|
+
"data-orb-pattern": content.pattern,
|
|
47796
47831
|
children: content.props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47797
47832
|
"Unknown pattern: ",
|
|
47798
47833
|
content.pattern,
|
|
@@ -50347,7 +50382,11 @@ function useUISlotManager() {
|
|
|
50347
50382
|
priority: config.priority ?? 0,
|
|
50348
50383
|
animation: config.animation ?? "fade",
|
|
50349
50384
|
onDismiss: config.onDismiss,
|
|
50350
|
-
sourceTrait: config.sourceTrait
|
|
50385
|
+
sourceTrait: config.sourceTrait,
|
|
50386
|
+
slot: config.target,
|
|
50387
|
+
transitionEvent: config.transitionEvent,
|
|
50388
|
+
fromState: config.fromState,
|
|
50389
|
+
entity: config.entity
|
|
50351
50390
|
};
|
|
50352
50391
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
50353
50392
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
package/dist/components/index.js
CHANGED
|
@@ -23932,11 +23932,13 @@ var init_Coachmark = __esm({
|
|
|
23932
23932
|
onSecondary,
|
|
23933
23933
|
secondaryLabel,
|
|
23934
23934
|
showBeacon = false,
|
|
23935
|
+
fallbackCentered = false,
|
|
23935
23936
|
className
|
|
23936
23937
|
}) => {
|
|
23937
23938
|
const cardRef = useRef(null);
|
|
23938
23939
|
const rect = useAnchorRect(anchor, open);
|
|
23939
23940
|
const [pos, setPos] = useState(null);
|
|
23941
|
+
const centered = open && !rect && fallbackCentered;
|
|
23940
23942
|
useLayoutEffect(() => {
|
|
23941
23943
|
if (!open || !rect || !cardRef.current) {
|
|
23942
23944
|
setPos(null);
|
|
@@ -23948,8 +23950,18 @@ var init_Coachmark = __esm({
|
|
|
23948
23950
|
};
|
|
23949
23951
|
setPos(placeCard(placement, rect, size));
|
|
23950
23952
|
}, [open, rect, placement, children, title]);
|
|
23951
|
-
|
|
23953
|
+
useEffect(() => {
|
|
23954
|
+
if (!open) return;
|
|
23955
|
+
const onKey = (e) => {
|
|
23956
|
+
if (e.key === "Escape") onDismiss();
|
|
23957
|
+
};
|
|
23958
|
+
window.addEventListener("keydown", onKey);
|
|
23959
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
23960
|
+
}, [open, onDismiss]);
|
|
23961
|
+
if (!open || typeof document === "undefined") return null;
|
|
23962
|
+
if (!rect && !centered) return null;
|
|
23952
23963
|
const hasFooter = Boolean(onPrimary || onSecondary);
|
|
23964
|
+
const cardStyle = centered ? { top: "50%", left: "50%", transform: "translate(-50%, -50%)" } : pos ? { top: pos.top, left: pos.left } : { top: -9999, left: -9999 };
|
|
23953
23965
|
const card = /* @__PURE__ */ jsxs(
|
|
23954
23966
|
Box,
|
|
23955
23967
|
{
|
|
@@ -23963,10 +23975,10 @@ var init_Coachmark = __esm({
|
|
|
23963
23975
|
"aria-label": title,
|
|
23964
23976
|
className: cn(
|
|
23965
23977
|
"fixed z-50 max-w-xs w-72 transition-opacity duration-150",
|
|
23966
|
-
pos ? "opacity-100" : "opacity-0",
|
|
23978
|
+
centered || pos ? "opacity-100" : "opacity-0",
|
|
23967
23979
|
className
|
|
23968
23980
|
),
|
|
23969
|
-
style:
|
|
23981
|
+
style: cardStyle,
|
|
23970
23982
|
children: [
|
|
23971
23983
|
/* @__PURE__ */ jsx(
|
|
23972
23984
|
"button",
|
|
@@ -23987,7 +23999,7 @@ var init_Coachmark = __esm({
|
|
|
23987
23999
|
]
|
|
23988
24000
|
}
|
|
23989
24001
|
);
|
|
23990
|
-
const beacon = showBeacon ? /* @__PURE__ */ jsx(
|
|
24002
|
+
const beacon = showBeacon && rect ? /* @__PURE__ */ jsx(
|
|
23991
24003
|
"div",
|
|
23992
24004
|
{
|
|
23993
24005
|
className: "fixed z-50 pointer-events-none",
|
|
@@ -24053,6 +24065,7 @@ var init_OnboardingSpotlight = __esm({
|
|
|
24053
24065
|
open: true,
|
|
24054
24066
|
anchor: step.anchor,
|
|
24055
24067
|
placement: step.placement ?? "bottom",
|
|
24068
|
+
fallbackCentered: true,
|
|
24056
24069
|
title: step.title,
|
|
24057
24070
|
onDismiss: onSkip,
|
|
24058
24071
|
onSecondary: onSkip,
|
|
@@ -47537,7 +47550,7 @@ function getToastPosition(position) {
|
|
|
47537
47550
|
return "top-4 right-4";
|
|
47538
47551
|
}
|
|
47539
47552
|
}
|
|
47540
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47553
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47541
47554
|
if (children === void 0 || children === null) return null;
|
|
47542
47555
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47543
47556
|
if (childrenArray.length === 0) return null;
|
|
@@ -47568,8 +47581,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47568
47581
|
nodeId: child._id,
|
|
47569
47582
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47570
47583
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47571
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47572
|
-
|
|
47584
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47585
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47586
|
+
// nested node carries a complete contextual-edit address.
|
|
47587
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47588
|
+
...orbCtx ?? {}
|
|
47573
47589
|
};
|
|
47574
47590
|
return /* @__PURE__ */ jsx(
|
|
47575
47591
|
SlotContentRenderer,
|
|
@@ -47685,7 +47701,12 @@ function SlotContentRenderer({
|
|
|
47685
47701
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47686
47702
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47687
47703
|
const myPath = patternPath ?? "root";
|
|
47688
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47704
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47705
|
+
slot: content.slot,
|
|
47706
|
+
transitionEvent: content.transitionEvent,
|
|
47707
|
+
fromState: content.fromState,
|
|
47708
|
+
entity: content.entity
|
|
47709
|
+
}) : void 0;
|
|
47689
47710
|
const incomingChildren = content.props.children;
|
|
47690
47711
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47691
47712
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47732,6 +47753,13 @@ function SlotContentRenderer({
|
|
|
47732
47753
|
"data-pattern-path": myPath,
|
|
47733
47754
|
"data-pattern-type": content.pattern,
|
|
47734
47755
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47756
|
+
"data-orb-trait": content.sourceTrait,
|
|
47757
|
+
"data-orb-slot": content.slot,
|
|
47758
|
+
"data-orb-transition": content.transitionEvent,
|
|
47759
|
+
"data-orb-state": content.fromState,
|
|
47760
|
+
"data-orb-entity": content.entity,
|
|
47761
|
+
"data-orb-path": myPath,
|
|
47762
|
+
"data-orb-pattern": content.pattern,
|
|
47735
47763
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
47736
47764
|
}
|
|
47737
47765
|
);
|
|
@@ -47744,6 +47772,13 @@ function SlotContentRenderer({
|
|
|
47744
47772
|
"data-id": content.id,
|
|
47745
47773
|
"data-node-id": content.nodeId,
|
|
47746
47774
|
"data-source-trait": content.sourceTrait,
|
|
47775
|
+
"data-orb-trait": content.sourceTrait,
|
|
47776
|
+
"data-orb-slot": content.slot,
|
|
47777
|
+
"data-orb-transition": content.transitionEvent,
|
|
47778
|
+
"data-orb-state": content.fromState,
|
|
47779
|
+
"data-orb-entity": content.entity,
|
|
47780
|
+
"data-orb-path": patternPath ?? "root",
|
|
47781
|
+
"data-orb-pattern": content.pattern,
|
|
47747
47782
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47748
47783
|
"Unknown pattern: ",
|
|
47749
47784
|
content.pattern,
|
|
@@ -50298,7 +50333,11 @@ function useUISlotManager() {
|
|
|
50298
50333
|
priority: config.priority ?? 0,
|
|
50299
50334
|
animation: config.animation ?? "fade",
|
|
50300
50335
|
onDismiss: config.onDismiss,
|
|
50301
|
-
sourceTrait: config.sourceTrait
|
|
50336
|
+
sourceTrait: config.sourceTrait,
|
|
50337
|
+
slot: config.target,
|
|
50338
|
+
transitionEvent: config.transitionEvent,
|
|
50339
|
+
fromState: config.fromState,
|
|
50340
|
+
entity: config.entity
|
|
50302
50341
|
};
|
|
50303
50342
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
50304
50343
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
@@ -29,6 +29,13 @@ export interface CoachmarkProps {
|
|
|
29
29
|
secondaryLabel?: string;
|
|
30
30
|
/** Render a pulsing beacon dot over the anchor (keystone hints). */
|
|
31
31
|
showBeacon?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If the anchor can't be resolved, render the card centered in the viewport
|
|
34
|
+
* instead of hiding it. Guarantees the card (and its dismiss/skip) is always
|
|
35
|
+
* reachable — used by OnboardingSpotlight so a missing anchor never traps the
|
|
36
|
+
* user behind a dimmed backdrop. Default false: a missing anchor hides the card.
|
|
37
|
+
*/
|
|
38
|
+
fallbackCentered?: boolean;
|
|
32
39
|
className?: string;
|
|
33
40
|
}
|
|
34
41
|
/**
|
package/dist/context/index.cjs
CHANGED
|
@@ -124,7 +124,11 @@ function useUISlotManager() {
|
|
|
124
124
|
priority: config.priority ?? 0,
|
|
125
125
|
animation: config.animation ?? "fade",
|
|
126
126
|
onDismiss: config.onDismiss,
|
|
127
|
-
sourceTrait: config.sourceTrait
|
|
127
|
+
sourceTrait: config.sourceTrait,
|
|
128
|
+
slot: config.target,
|
|
129
|
+
transitionEvent: config.transitionEvent,
|
|
130
|
+
fromState: config.fromState,
|
|
131
|
+
entity: config.entity
|
|
128
132
|
};
|
|
129
133
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
130
134
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
package/dist/context/index.js
CHANGED
|
@@ -122,7 +122,11 @@ function useUISlotManager() {
|
|
|
122
122
|
priority: config.priority ?? 0,
|
|
123
123
|
animation: config.animation ?? "fade",
|
|
124
124
|
onDismiss: config.onDismiss,
|
|
125
|
-
sourceTrait: config.sourceTrait
|
|
125
|
+
sourceTrait: config.sourceTrait,
|
|
126
|
+
slot: config.target,
|
|
127
|
+
transitionEvent: config.transitionEvent,
|
|
128
|
+
fromState: config.fromState,
|
|
129
|
+
entity: config.entity
|
|
126
130
|
};
|
|
127
131
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
128
132
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -1131,7 +1131,11 @@ function useUISlotManager() {
|
|
|
1131
1131
|
priority: config.priority ?? 0,
|
|
1132
1132
|
animation: config.animation ?? "fade",
|
|
1133
1133
|
onDismiss: config.onDismiss,
|
|
1134
|
-
sourceTrait: config.sourceTrait
|
|
1134
|
+
sourceTrait: config.sourceTrait,
|
|
1135
|
+
slot: config.target,
|
|
1136
|
+
transitionEvent: config.transitionEvent,
|
|
1137
|
+
fromState: config.fromState,
|
|
1138
|
+
entity: config.entity
|
|
1135
1139
|
};
|
|
1136
1140
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
1137
1141
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
package/dist/hooks/index.js
CHANGED
|
@@ -1129,7 +1129,11 @@ function useUISlotManager() {
|
|
|
1129
1129
|
priority: config.priority ?? 0,
|
|
1130
1130
|
animation: config.animation ?? "fade",
|
|
1131
1131
|
onDismiss: config.onDismiss,
|
|
1132
|
-
sourceTrait: config.sourceTrait
|
|
1132
|
+
sourceTrait: config.sourceTrait,
|
|
1133
|
+
slot: config.target,
|
|
1134
|
+
transitionEvent: config.transitionEvent,
|
|
1135
|
+
fromState: config.fromState,
|
|
1136
|
+
entity: config.entity
|
|
1133
1137
|
};
|
|
1134
1138
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
1135
1139
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
@@ -95,6 +95,14 @@ export interface SlotContent {
|
|
|
95
95
|
sourceTrait?: string;
|
|
96
96
|
/** Stable node ID from the schema pattern tree (for edit mode overlay targeting) */
|
|
97
97
|
nodeId?: string;
|
|
98
|
+
/** Slot this content was rendered into (= RenderUIConfig.target) — contextual-edit address. */
|
|
99
|
+
slot?: string;
|
|
100
|
+
/** Transition event key that produced this render (raw, as fired). */
|
|
101
|
+
transitionEvent?: string;
|
|
102
|
+
/** State the trait was in when this render fired (the from-state). */
|
|
103
|
+
fromState?: string;
|
|
104
|
+
/** linkedEntity of the source trait — contextual-edit address. */
|
|
105
|
+
entity?: string;
|
|
98
106
|
}
|
|
99
107
|
/**
|
|
100
108
|
* Configuration for render_ui effect
|
|
@@ -116,6 +124,12 @@ export interface RenderUIConfig {
|
|
|
116
124
|
onDismiss?: () => void;
|
|
117
125
|
/** Source trait name */
|
|
118
126
|
sourceTrait?: string;
|
|
127
|
+
/** Transition event key that produced this render (raw, as fired). */
|
|
128
|
+
transitionEvent?: string;
|
|
129
|
+
/** State the trait was in when this render fired (the from-state). */
|
|
130
|
+
fromState?: string;
|
|
131
|
+
/** linkedEntity of the source trait. */
|
|
132
|
+
entity?: string;
|
|
119
133
|
}
|
|
120
134
|
/**
|
|
121
135
|
* Callback for slot changes
|
package/dist/providers/index.cjs
CHANGED
|
@@ -47666,7 +47666,7 @@ function getToastPosition(position) {
|
|
|
47666
47666
|
return "top-4 right-4";
|
|
47667
47667
|
}
|
|
47668
47668
|
}
|
|
47669
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47669
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47670
47670
|
if (children === void 0 || children === null) return null;
|
|
47671
47671
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47672
47672
|
if (childrenArray.length === 0) return null;
|
|
@@ -47697,8 +47697,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47697
47697
|
nodeId: child._id,
|
|
47698
47698
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47699
47699
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47700
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47701
|
-
|
|
47700
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47701
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47702
|
+
// nested node carries a complete contextual-edit address.
|
|
47703
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47704
|
+
...orbCtx ?? {}
|
|
47702
47705
|
};
|
|
47703
47706
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47704
47707
|
SlotContentRenderer,
|
|
@@ -47814,7 +47817,12 @@ function SlotContentRenderer({
|
|
|
47814
47817
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47815
47818
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47816
47819
|
const myPath = patternPath ?? "root";
|
|
47817
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47820
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47821
|
+
slot: content.slot,
|
|
47822
|
+
transitionEvent: content.transitionEvent,
|
|
47823
|
+
fromState: content.fromState,
|
|
47824
|
+
entity: content.entity
|
|
47825
|
+
}) : void 0;
|
|
47818
47826
|
const incomingChildren = content.props.children;
|
|
47819
47827
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47820
47828
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47861,6 +47869,13 @@ function SlotContentRenderer({
|
|
|
47861
47869
|
"data-pattern-path": myPath,
|
|
47862
47870
|
"data-pattern-type": content.pattern,
|
|
47863
47871
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47872
|
+
"data-orb-trait": content.sourceTrait,
|
|
47873
|
+
"data-orb-slot": content.slot,
|
|
47874
|
+
"data-orb-transition": content.transitionEvent,
|
|
47875
|
+
"data-orb-state": content.fromState,
|
|
47876
|
+
"data-orb-entity": content.entity,
|
|
47877
|
+
"data-orb-path": myPath,
|
|
47878
|
+
"data-orb-pattern": content.pattern,
|
|
47864
47879
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps })
|
|
47865
47880
|
}
|
|
47866
47881
|
);
|
|
@@ -47873,6 +47888,13 @@ function SlotContentRenderer({
|
|
|
47873
47888
|
"data-id": content.id,
|
|
47874
47889
|
"data-node-id": content.nodeId,
|
|
47875
47890
|
"data-source-trait": content.sourceTrait,
|
|
47891
|
+
"data-orb-trait": content.sourceTrait,
|
|
47892
|
+
"data-orb-slot": content.slot,
|
|
47893
|
+
"data-orb-transition": content.transitionEvent,
|
|
47894
|
+
"data-orb-state": content.fromState,
|
|
47895
|
+
"data-orb-entity": content.entity,
|
|
47896
|
+
"data-orb-path": patternPath ?? "root",
|
|
47897
|
+
"data-orb-pattern": content.pattern,
|
|
47876
47898
|
children: content.props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47877
47899
|
"Unknown pattern: ",
|
|
47878
47900
|
content.pattern,
|
package/dist/providers/index.js
CHANGED
|
@@ -47617,7 +47617,7 @@ function getToastPosition(position) {
|
|
|
47617
47617
|
return "top-4 right-4";
|
|
47618
47618
|
}
|
|
47619
47619
|
}
|
|
47620
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47620
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47621
47621
|
if (children === void 0 || children === null) return null;
|
|
47622
47622
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47623
47623
|
if (childrenArray.length === 0) return null;
|
|
@@ -47648,8 +47648,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47648
47648
|
nodeId: child._id,
|
|
47649
47649
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47650
47650
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47651
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47652
|
-
|
|
47651
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47652
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47653
|
+
// nested node carries a complete contextual-edit address.
|
|
47654
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47655
|
+
...orbCtx ?? {}
|
|
47653
47656
|
};
|
|
47654
47657
|
return /* @__PURE__ */ jsx(
|
|
47655
47658
|
SlotContentRenderer,
|
|
@@ -47765,7 +47768,12 @@ function SlotContentRenderer({
|
|
|
47765
47768
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47766
47769
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47767
47770
|
const myPath = patternPath ?? "root";
|
|
47768
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47771
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47772
|
+
slot: content.slot,
|
|
47773
|
+
transitionEvent: content.transitionEvent,
|
|
47774
|
+
fromState: content.fromState,
|
|
47775
|
+
entity: content.entity
|
|
47776
|
+
}) : void 0;
|
|
47769
47777
|
const incomingChildren = content.props.children;
|
|
47770
47778
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47771
47779
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47812,6 +47820,13 @@ function SlotContentRenderer({
|
|
|
47812
47820
|
"data-pattern-path": myPath,
|
|
47813
47821
|
"data-pattern-type": content.pattern,
|
|
47814
47822
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47823
|
+
"data-orb-trait": content.sourceTrait,
|
|
47824
|
+
"data-orb-slot": content.slot,
|
|
47825
|
+
"data-orb-transition": content.transitionEvent,
|
|
47826
|
+
"data-orb-state": content.fromState,
|
|
47827
|
+
"data-orb-entity": content.entity,
|
|
47828
|
+
"data-orb-path": myPath,
|
|
47829
|
+
"data-orb-pattern": content.pattern,
|
|
47815
47830
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
47816
47831
|
}
|
|
47817
47832
|
);
|
|
@@ -47824,6 +47839,13 @@ function SlotContentRenderer({
|
|
|
47824
47839
|
"data-id": content.id,
|
|
47825
47840
|
"data-node-id": content.nodeId,
|
|
47826
47841
|
"data-source-trait": content.sourceTrait,
|
|
47842
|
+
"data-orb-trait": content.sourceTrait,
|
|
47843
|
+
"data-orb-slot": content.slot,
|
|
47844
|
+
"data-orb-transition": content.transitionEvent,
|
|
47845
|
+
"data-orb-state": content.fromState,
|
|
47846
|
+
"data-orb-entity": content.entity,
|
|
47847
|
+
"data-orb-path": patternPath ?? "root",
|
|
47848
|
+
"data-orb-pattern": content.pattern,
|
|
47827
47849
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47828
47850
|
"Unknown pattern: ",
|
|
47829
47851
|
content.pattern,
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -47252,7 +47252,7 @@ function getToastPosition(position) {
|
|
|
47252
47252
|
return "top-4 right-4";
|
|
47253
47253
|
}
|
|
47254
47254
|
}
|
|
47255
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47255
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47256
47256
|
if (children === void 0 || children === null) return null;
|
|
47257
47257
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47258
47258
|
if (childrenArray.length === 0) return null;
|
|
@@ -47283,8 +47283,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47283
47283
|
nodeId: child._id,
|
|
47284
47284
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47285
47285
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47286
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47287
|
-
|
|
47286
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47287
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47288
|
+
// nested node carries a complete contextual-edit address.
|
|
47289
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47290
|
+
...orbCtx ?? {}
|
|
47288
47291
|
};
|
|
47289
47292
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47290
47293
|
SlotContentRenderer,
|
|
@@ -47400,7 +47403,12 @@ function SlotContentRenderer({
|
|
|
47400
47403
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47401
47404
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47402
47405
|
const myPath = patternPath ?? "root";
|
|
47403
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47406
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47407
|
+
slot: content.slot,
|
|
47408
|
+
transitionEvent: content.transitionEvent,
|
|
47409
|
+
fromState: content.fromState,
|
|
47410
|
+
entity: content.entity
|
|
47411
|
+
}) : void 0;
|
|
47404
47412
|
const incomingChildren = content.props.children;
|
|
47405
47413
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47406
47414
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47447,6 +47455,13 @@ function SlotContentRenderer({
|
|
|
47447
47455
|
"data-pattern-path": myPath,
|
|
47448
47456
|
"data-pattern-type": content.pattern,
|
|
47449
47457
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47458
|
+
"data-orb-trait": content.sourceTrait,
|
|
47459
|
+
"data-orb-slot": content.slot,
|
|
47460
|
+
"data-orb-transition": content.transitionEvent,
|
|
47461
|
+
"data-orb-state": content.fromState,
|
|
47462
|
+
"data-orb-entity": content.entity,
|
|
47463
|
+
"data-orb-path": myPath,
|
|
47464
|
+
"data-orb-pattern": content.pattern,
|
|
47450
47465
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsxRuntime.jsx(PatternComponent, { ...finalProps })
|
|
47451
47466
|
}
|
|
47452
47467
|
);
|
|
@@ -47459,6 +47474,13 @@ function SlotContentRenderer({
|
|
|
47459
47474
|
"data-id": content.id,
|
|
47460
47475
|
"data-node-id": content.nodeId,
|
|
47461
47476
|
"data-source-trait": content.sourceTrait,
|
|
47477
|
+
"data-orb-trait": content.sourceTrait,
|
|
47478
|
+
"data-orb-slot": content.slot,
|
|
47479
|
+
"data-orb-transition": content.transitionEvent,
|
|
47480
|
+
"data-orb-state": content.fromState,
|
|
47481
|
+
"data-orb-entity": content.entity,
|
|
47482
|
+
"data-orb-path": patternPath ?? "root",
|
|
47483
|
+
"data-orb-pattern": content.pattern,
|
|
47462
47484
|
children: content.props.children ?? /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47463
47485
|
"Unknown pattern: ",
|
|
47464
47486
|
content.pattern,
|
|
@@ -47812,7 +47834,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47812
47834
|
embeddedTraitsRef.current = options?.embeddedTraits;
|
|
47813
47835
|
}, [options?.embeddedTraits]);
|
|
47814
47836
|
const flushSlot = React85.useCallback(
|
|
47815
|
-
(traitName, slot, patterns) => {
|
|
47837
|
+
(traitName, slot, patterns, source) => {
|
|
47816
47838
|
const slots = uiSlotsRef.current;
|
|
47817
47839
|
const embedded = embeddedTraitsRef.current;
|
|
47818
47840
|
if (patterns.length === 0) {
|
|
@@ -47841,7 +47863,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47841
47863
|
pattern: patternType,
|
|
47842
47864
|
props,
|
|
47843
47865
|
priority: 0,
|
|
47844
|
-
animation: "fade"
|
|
47866
|
+
animation: "fade",
|
|
47867
|
+
transitionEvent: source?.event,
|
|
47868
|
+
fromState: source?.state,
|
|
47869
|
+
entity: source?.entity
|
|
47845
47870
|
});
|
|
47846
47871
|
return;
|
|
47847
47872
|
}
|
|
@@ -47855,7 +47880,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47855
47880
|
target: slot,
|
|
47856
47881
|
pattern: patternType,
|
|
47857
47882
|
props,
|
|
47858
|
-
sourceTrait: traitName
|
|
47883
|
+
sourceTrait: traitName,
|
|
47884
|
+
transitionEvent: source?.event,
|
|
47885
|
+
fromState: source?.state,
|
|
47886
|
+
entity: source?.entity
|
|
47859
47887
|
});
|
|
47860
47888
|
},
|
|
47861
47889
|
[]
|
|
@@ -47988,7 +48016,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47988
48016
|
}
|
|
47989
48017
|
}
|
|
47990
48018
|
for (const [slot, patterns] of pendingSlots) {
|
|
47991
|
-
flushSlot(binding.trait.name, slot, patterns
|
|
48019
|
+
flushSlot(binding.trait.name, slot, patterns, {
|
|
48020
|
+
event: `tick:${tick.name}`,
|
|
48021
|
+
state: currentState,
|
|
48022
|
+
entity: binding.linkedEntity
|
|
48023
|
+
});
|
|
47992
48024
|
}
|
|
47993
48025
|
}, [flushSlot]);
|
|
47994
48026
|
React85.useEffect(() => {
|
|
@@ -48240,7 +48272,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
48240
48272
|
transition: `${result.previousState}->${result.newState}`,
|
|
48241
48273
|
cleared: patterns.length === 0
|
|
48242
48274
|
});
|
|
48243
|
-
flushSlot(traitName, slot, patterns
|
|
48275
|
+
flushSlot(traitName, slot, patterns, {
|
|
48276
|
+
event: eventKey,
|
|
48277
|
+
state: result.previousState,
|
|
48278
|
+
entity: binding.linkedEntity
|
|
48279
|
+
});
|
|
48244
48280
|
}
|
|
48245
48281
|
} catch (error) {
|
|
48246
48282
|
stateLog.error("transition:effect-error", {
|
package/dist/runtime/index.js
CHANGED
|
@@ -47203,7 +47203,7 @@ function getToastPosition(position) {
|
|
|
47203
47203
|
return "top-4 right-4";
|
|
47204
47204
|
}
|
|
47205
47205
|
}
|
|
47206
|
-
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
|
|
47206
|
+
function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait, orbCtx) {
|
|
47207
47207
|
if (children === void 0 || children === null) return null;
|
|
47208
47208
|
const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
|
|
47209
47209
|
if (childrenArray.length === 0) return null;
|
|
@@ -47234,8 +47234,11 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47234
47234
|
nodeId: child._id,
|
|
47235
47235
|
// Inherit sourceTrait from the parent slot so nested patterns
|
|
47236
47236
|
// (e.g. form-section inside a stack) can resolve entityDef via
|
|
47237
|
-
// the trait's linkedEntity for form-field enrichment.
|
|
47238
|
-
|
|
47237
|
+
// the trait's linkedEntity for form-field enrichment. The orbCtx
|
|
47238
|
+
// (slot/transition/state/entity) propagates the same way so every
|
|
47239
|
+
// nested node carries a complete contextual-edit address.
|
|
47240
|
+
...sourceTrait !== void 0 && { sourceTrait },
|
|
47241
|
+
...orbCtx ?? {}
|
|
47239
47242
|
};
|
|
47240
47243
|
return /* @__PURE__ */ jsx(
|
|
47241
47244
|
SlotContentRenderer,
|
|
@@ -47351,7 +47354,12 @@ function SlotContentRenderer({
|
|
|
47351
47354
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
47352
47355
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
47353
47356
|
const myPath = patternPath ?? "root";
|
|
47354
|
-
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait
|
|
47357
|
+
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait, {
|
|
47358
|
+
slot: content.slot,
|
|
47359
|
+
transitionEvent: content.transitionEvent,
|
|
47360
|
+
fromState: content.fromState,
|
|
47361
|
+
entity: content.entity
|
|
47362
|
+
}) : void 0;
|
|
47355
47363
|
const incomingChildren = content.props.children;
|
|
47356
47364
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
47357
47365
|
const { children: _childrenConfig, ...restPropsNoChildren } = content.props;
|
|
@@ -47398,6 +47406,13 @@ function SlotContentRenderer({
|
|
|
47398
47406
|
"data-pattern-path": myPath,
|
|
47399
47407
|
"data-pattern-type": content.pattern,
|
|
47400
47408
|
"data-accepts-children": acceptsChildren ? "true" : void 0,
|
|
47409
|
+
"data-orb-trait": content.sourceTrait,
|
|
47410
|
+
"data-orb-slot": content.slot,
|
|
47411
|
+
"data-orb-transition": content.transitionEvent,
|
|
47412
|
+
"data-orb-state": content.fromState,
|
|
47413
|
+
"data-orb-entity": content.entity,
|
|
47414
|
+
"data-orb-path": myPath,
|
|
47415
|
+
"data-orb-pattern": content.pattern,
|
|
47401
47416
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
47402
47417
|
}
|
|
47403
47418
|
);
|
|
@@ -47410,6 +47425,13 @@ function SlotContentRenderer({
|
|
|
47410
47425
|
"data-id": content.id,
|
|
47411
47426
|
"data-node-id": content.nodeId,
|
|
47412
47427
|
"data-source-trait": content.sourceTrait,
|
|
47428
|
+
"data-orb-trait": content.sourceTrait,
|
|
47429
|
+
"data-orb-slot": content.slot,
|
|
47430
|
+
"data-orb-transition": content.transitionEvent,
|
|
47431
|
+
"data-orb-state": content.fromState,
|
|
47432
|
+
"data-orb-entity": content.entity,
|
|
47433
|
+
"data-orb-path": patternPath ?? "root",
|
|
47434
|
+
"data-orb-pattern": content.pattern,
|
|
47413
47435
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
47414
47436
|
"Unknown pattern: ",
|
|
47415
47437
|
content.pattern,
|
|
@@ -47763,7 +47785,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47763
47785
|
embeddedTraitsRef.current = options?.embeddedTraits;
|
|
47764
47786
|
}, [options?.embeddedTraits]);
|
|
47765
47787
|
const flushSlot = useCallback(
|
|
47766
|
-
(traitName, slot, patterns) => {
|
|
47788
|
+
(traitName, slot, patterns, source) => {
|
|
47767
47789
|
const slots = uiSlotsRef.current;
|
|
47768
47790
|
const embedded = embeddedTraitsRef.current;
|
|
47769
47791
|
if (patterns.length === 0) {
|
|
@@ -47792,7 +47814,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47792
47814
|
pattern: patternType,
|
|
47793
47815
|
props,
|
|
47794
47816
|
priority: 0,
|
|
47795
|
-
animation: "fade"
|
|
47817
|
+
animation: "fade",
|
|
47818
|
+
transitionEvent: source?.event,
|
|
47819
|
+
fromState: source?.state,
|
|
47820
|
+
entity: source?.entity
|
|
47796
47821
|
});
|
|
47797
47822
|
return;
|
|
47798
47823
|
}
|
|
@@ -47806,7 +47831,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47806
47831
|
target: slot,
|
|
47807
47832
|
pattern: patternType,
|
|
47808
47833
|
props,
|
|
47809
|
-
sourceTrait: traitName
|
|
47834
|
+
sourceTrait: traitName,
|
|
47835
|
+
transitionEvent: source?.event,
|
|
47836
|
+
fromState: source?.state,
|
|
47837
|
+
entity: source?.entity
|
|
47810
47838
|
});
|
|
47811
47839
|
},
|
|
47812
47840
|
[]
|
|
@@ -47939,7 +47967,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
47939
47967
|
}
|
|
47940
47968
|
}
|
|
47941
47969
|
for (const [slot, patterns] of pendingSlots) {
|
|
47942
|
-
flushSlot(binding.trait.name, slot, patterns
|
|
47970
|
+
flushSlot(binding.trait.name, slot, patterns, {
|
|
47971
|
+
event: `tick:${tick.name}`,
|
|
47972
|
+
state: currentState,
|
|
47973
|
+
entity: binding.linkedEntity
|
|
47974
|
+
});
|
|
47943
47975
|
}
|
|
47944
47976
|
}, [flushSlot]);
|
|
47945
47977
|
useEffect(() => {
|
|
@@ -48191,7 +48223,11 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
48191
48223
|
transition: `${result.previousState}->${result.newState}`,
|
|
48192
48224
|
cleared: patterns.length === 0
|
|
48193
48225
|
});
|
|
48194
|
-
flushSlot(traitName, slot, patterns
|
|
48226
|
+
flushSlot(traitName, slot, patterns, {
|
|
48227
|
+
event: eventKey,
|
|
48228
|
+
state: result.previousState,
|
|
48229
|
+
entity: binding.linkedEntity
|
|
48230
|
+
});
|
|
48195
48231
|
}
|
|
48196
48232
|
} catch (error) {
|
|
48197
48233
|
stateLog.error("transition:effect-error", {
|