@syntrologie/adapt-overlays 2.14.0 → 2.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/WorkflowWidgetLit.d.ts +123 -0
- package/dist/WorkflowWidgetLit.d.ts.map +1 -0
- package/dist/WorkflowWidgetLit.js +617 -0
- package/dist/runtime-lit.d.ts +94 -0
- package/dist/runtime-lit.d.ts.map +1 -0
- package/dist/runtime-lit.js +402 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +10 -0
- package/dist/schema.d.ts +4 -4
- package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +2 -0
- package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +1 -1
- package/node_modules/@syntro/design-system/dist/tokens/index.js +2 -0
- package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts +93 -0
- package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts.map +1 -0
- package/node_modules/@syntro/design-system/dist/tokens/panel-shell.js +72 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts +84 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.js +323 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts +25 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.js +55 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts +33 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.js +118 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts +32 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.js +68 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts +34 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.js +57 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts +13 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.js +31 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts +7 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.js +15 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts +36 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.js +102 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts +20 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.js +48 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts +16 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.js +25 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts +66 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.js +87 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts +7 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.js +15 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +28 -17
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts +66 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.js +528 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts +41 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.js +63 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts +55 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.js +92 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts +90 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.js +242 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts +12 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.js +21 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts +21 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.js +33 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts +28 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.js +121 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts +110 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.js +476 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +2 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts +15 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.js +14 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +17 -1
- package/node_modules/@syntrologie/shared-editor-ui/package.json +9 -1
- package/package.json +9 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowWidgetLit — Lit web component for the WorkflowTracker.
|
|
3
|
+
*
|
|
4
|
+
* Lit equivalent of WorkflowWidget.tsx / WorkflowWidgetInner.
|
|
5
|
+
* Tag name: <syntro-workflow-tracker>
|
|
6
|
+
*
|
|
7
|
+
* Responsibilities (mirrors the React version):
|
|
8
|
+
* 1. Scan runtime.actions.getActive() for tours with `workflow` field
|
|
9
|
+
* 2. Re-scan on tour.started / tour.resumed events
|
|
10
|
+
* 3. Load persisted state from runtime.state.user namespace
|
|
11
|
+
* 4. Subscribe to tour.* events and update workflow entries
|
|
12
|
+
* 5. Render workflow cards with progress indicators and step lists
|
|
13
|
+
* 6. Handle step clicks (publish workflow:jump_to_step)
|
|
14
|
+
* 7. Handle dismiss (persist and re-render)
|
|
15
|
+
* 8. Show toast notifications for newly discovered workflows
|
|
16
|
+
*
|
|
17
|
+
* Decorator-free: uses `static override properties` (tsconfig has no
|
|
18
|
+
* experimentalDecorators).
|
|
19
|
+
*
|
|
20
|
+
* Uses createRenderRoot() { return this; } for light DOM so host-page CSS
|
|
21
|
+
* variables (--se-color-*, --se-font-family, etc.) flow through without a
|
|
22
|
+
* nested shadow boundary.
|
|
23
|
+
*/
|
|
24
|
+
import { LitElement } from 'lit';
|
|
25
|
+
import type { WorkflowEntry } from './workflow-types';
|
|
26
|
+
interface ActiveAction {
|
|
27
|
+
id: string;
|
|
28
|
+
action: Record<string, unknown>;
|
|
29
|
+
adaptiveId?: string;
|
|
30
|
+
appliedTs: number;
|
|
31
|
+
state: string;
|
|
32
|
+
}
|
|
33
|
+
interface WorkflowRuntime {
|
|
34
|
+
events: {
|
|
35
|
+
subscribe: (filter: {
|
|
36
|
+
patterns?: string[];
|
|
37
|
+
names?: string[];
|
|
38
|
+
}, callback: (event: {
|
|
39
|
+
name: string;
|
|
40
|
+
props?: Record<string, unknown>;
|
|
41
|
+
ts: number;
|
|
42
|
+
}) => void) => () => void;
|
|
43
|
+
publish: (name: string, props?: Record<string, unknown>) => void;
|
|
44
|
+
};
|
|
45
|
+
actions: {
|
|
46
|
+
getActive: () => ActiveAction[];
|
|
47
|
+
};
|
|
48
|
+
state?: {
|
|
49
|
+
user?: {
|
|
50
|
+
ns?: (namespace: string) => {
|
|
51
|
+
get: (key: string) => unknown;
|
|
52
|
+
set: (key: string, value: unknown) => void;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* MountableWidget contract — matches the interface from @syntrologie/runtime-sdk
|
|
59
|
+
* Defined locally to avoid adding runtime-sdk as a dependency.
|
|
60
|
+
*/
|
|
61
|
+
export interface MountableWidget {
|
|
62
|
+
mount(container: HTMLElement, config?: Record<string, unknown>): (() => void) | void;
|
|
63
|
+
update?(container: HTMLElement, config?: Record<string, unknown>): void;
|
|
64
|
+
}
|
|
65
|
+
export declare class WorkflowTrackerLit extends LitElement {
|
|
66
|
+
#private;
|
|
67
|
+
static properties: {
|
|
68
|
+
runtimeRef: {
|
|
69
|
+
attribute: boolean;
|
|
70
|
+
};
|
|
71
|
+
_workflowEntries: {
|
|
72
|
+
state: boolean;
|
|
73
|
+
};
|
|
74
|
+
_actionVersion: {
|
|
75
|
+
state: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
runtimeRef: WorkflowRuntime | null;
|
|
79
|
+
/** @internal */ _workflowEntries: WorkflowEntry[];
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* Bumped on tour.started / tour.resumed to trigger re-scan of active actions.
|
|
83
|
+
*/
|
|
84
|
+
/** @internal */ _actionVersion: number;
|
|
85
|
+
/**
|
|
86
|
+
* Render into the element itself (light DOM) so host-page CSS variables
|
|
87
|
+
* flow through without a nested shadow boundary.
|
|
88
|
+
*/
|
|
89
|
+
createRenderRoot(): this;
|
|
90
|
+
private get _stateNs();
|
|
91
|
+
/**
|
|
92
|
+
* Re-scan active actions and update _tourWorkflows + entries.
|
|
93
|
+
* Called initially and whenever _actionVersion bumps.
|
|
94
|
+
*/
|
|
95
|
+
private _rescanWorkflows;
|
|
96
|
+
connectedCallback(): void;
|
|
97
|
+
disconnectedCallback(): void;
|
|
98
|
+
updated(changed: Map<string, unknown>): void;
|
|
99
|
+
private _initSubscriptions;
|
|
100
|
+
private _teardownSubscriptions;
|
|
101
|
+
private _handleTourEvent;
|
|
102
|
+
private _handleStepClick;
|
|
103
|
+
private _handleDismiss;
|
|
104
|
+
private _renderProgressBar;
|
|
105
|
+
private _renderStepItem;
|
|
106
|
+
private _renderWorkflowCard;
|
|
107
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
108
|
+
}
|
|
109
|
+
declare global {
|
|
110
|
+
interface HTMLElementTagNameMap {
|
|
111
|
+
'syntro-workflow-tracker': WorkflowTrackerLit;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* MountableWidget that instantiates a <syntro-workflow-tracker> Lit element
|
|
116
|
+
* and injects the runtime ref.
|
|
117
|
+
*
|
|
118
|
+
* Follows the same MountableWidget contract as WorkflowMountableWidget.
|
|
119
|
+
* Config is enriched with `runtime` by WidgetRegistry.bindRuntime().
|
|
120
|
+
*/
|
|
121
|
+
export declare const WorkflowWidgetLitMountable: MountableWidget;
|
|
122
|
+
export {};
|
|
123
|
+
//# sourceMappingURL=WorkflowWidgetLit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkflowWidgetLit.d.ts","sourceRoot":"","sources":["../src/WorkflowWidgetLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAqBpE,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AA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