@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.
Files changed (88) hide show
  1. package/dist/WorkflowWidgetLit.d.ts +123 -0
  2. package/dist/WorkflowWidgetLit.d.ts.map +1 -0
  3. package/dist/WorkflowWidgetLit.js +617 -0
  4. package/dist/runtime-lit.d.ts +94 -0
  5. package/dist/runtime-lit.d.ts.map +1 -0
  6. package/dist/runtime-lit.js +402 -0
  7. package/dist/runtime.d.ts.map +1 -1
  8. package/dist/runtime.js +10 -0
  9. package/dist/schema.d.ts +4 -4
  10. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +2 -0
  11. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +1 -1
  12. package/node_modules/@syntro/design-system/dist/tokens/index.js +2 -0
  13. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts +93 -0
  14. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts.map +1 -0
  15. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.js +72 -0
  16. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts +84 -0
  17. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts.map +1 -0
  18. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.js +323 -0
  19. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts +25 -0
  20. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts.map +1 -0
  21. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.js +55 -0
  22. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts +33 -0
  23. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts.map +1 -0
  24. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.js +118 -0
  25. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts +32 -0
  26. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts.map +1 -0
  27. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.js +68 -0
  28. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts +34 -0
  29. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts.map +1 -0
  30. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.js +57 -0
  31. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts +13 -0
  32. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts.map +1 -0
  33. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.js +31 -0
  34. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts +7 -0
  35. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts.map +1 -0
  36. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.js +15 -0
  37. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts +36 -0
  38. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts.map +1 -0
  39. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.js +102 -0
  40. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts +20 -0
  41. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts.map +1 -0
  42. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.js +48 -0
  43. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts +16 -0
  44. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts.map +1 -0
  45. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.js +25 -0
  46. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts +66 -0
  47. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts.map +1 -0
  48. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.js +87 -0
  49. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts +7 -0
  50. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts.map +1 -0
  51. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.js +15 -0
  52. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +1 -1
  53. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +28 -17
  54. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts +66 -0
  55. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts.map +1 -0
  56. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.js +528 -0
  57. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts +41 -0
  58. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts.map +1 -0
  59. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.js +63 -0
  60. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts +55 -0
  61. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts.map +1 -0
  62. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.js +92 -0
  63. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts +90 -0
  64. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts.map +1 -0
  65. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.js +242 -0
  66. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts +12 -0
  67. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts.map +1 -0
  68. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.js +21 -0
  69. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts +21 -0
  70. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts.map +1 -0
  71. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.js +33 -0
  72. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts +28 -0
  73. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts.map +1 -0
  74. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.js +121 -0
  75. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts +110 -0
  76. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts.map +1 -0
  77. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.js +476 -0
  78. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +2 -0
  79. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +1 -1
  80. package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +1 -0
  81. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts +15 -0
  82. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts.map +1 -0
  83. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.js +14 -0
  84. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -4
  85. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +1 -1
  86. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +17 -1
  87. package/node_modules/@syntrologie/shared-editor-ui/package.json +9 -1
  88. 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;AAED,UAAU,eAAe;IACvB,MAAM,EAAE;QACN,SAAS,EAAE,CACT,MAAM,EAAE;YAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,EACjD,QAAQ,EAAE,CAAC,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI,KACrF,MAAM,IAAI,CAAC;QAChB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;KAClE,CAAC;IACF,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,YAAY,EAAE,CAAC;KACjC,CAAC;IACF,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE;YACL,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK;gBAC1B,GAAG,EAAE,CAA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