@syntrologie/adapt-nav 2.8.0-canary.31 → 2.8.0-canary.310
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/NavWidgetLit.d.ts +56 -0
- package/dist/NavWidgetLit.d.ts.map +1 -0
- package/dist/NavWidgetLit.editable.d.ts +151 -0
- package/dist/NavWidgetLit.editable.d.ts.map +1 -0
- package/dist/NavWidgetLit.test.d.ts +8 -0
- package/dist/NavWidgetLit.test.d.ts.map +1 -0
- package/dist/chunk-SX36IHRC.js +640 -0
- package/dist/chunk-SX36IHRC.js.map +7 -0
- package/dist/editor.d.ts +66 -21
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +5627 -307
- package/dist/editor.js.map +7 -0
- package/dist/nav-item-editor.d.ts +43 -0
- package/dist/nav-item-editor.d.ts.map +1 -0
- package/dist/resolveNavTarget.d.ts +61 -0
- package/dist/resolveNavTarget.d.ts.map +1 -0
- package/dist/resolveNavTarget.test.d.ts +2 -0
- package/dist/resolveNavTarget.test.d.ts.map +1 -0
- package/dist/runtime.d.ts +22 -6
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +643 -142
- package/dist/runtime.js.map +7 -0
- package/dist/schema.d.ts +316 -174
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +155 -125
- package/dist/schema.js.map +7 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -16
- package/dist/NavWidget.d.ts +0 -31
- package/dist/NavWidget.d.ts.map +0 -1
- package/dist/NavWidget.js +0 -491
- package/dist/cdn.d.ts +0 -62
- package/dist/cdn.d.ts.map +0 -1
- package/dist/cdn.js +0 -48
- package/dist/summarize.js +0 -51
- package/dist/types.js +0 -18
- package/node_modules/@syntro/design-system/README.md +0 -335
- package/node_modules/@syntro/design-system/dist/assets/syntrologie-logo.svg +0 -21
- package/node_modules/@syntro/design-system/dist/assets/syntrologie-logomark.svg +0 -10
- package/node_modules/@syntro/design-system/dist/index.d.ts +0 -8
- package/node_modules/@syntro/design-system/dist/index.d.ts.map +0 -1
- package/node_modules/@syntro/design-system/dist/index.js +0 -7
- package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts +0 -19
- package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts.map +0 -1
- package/node_modules/@syntro/design-system/dist/tailwind-preset.js +0 -453
- package/node_modules/@syntro/design-system/dist/tokens/colors.css +0 -464
- package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts +0 -874
- package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts.map +0 -1
- package/node_modules/@syntro/design-system/dist/tokens/colors.js +0 -564
- package/node_modules/@syntro/design-system/dist/tokens/effects.css +0 -43
- package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts +0 -85
- package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts.map +0 -1
- package/node_modules/@syntro/design-system/dist/tokens/effects.js +0 -77
- package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +0 -10
- package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +0 -1
- package/node_modules/@syntro/design-system/dist/tokens/index.js +0 -9
- package/node_modules/@syntro/design-system/package.json +0 -55
- package/node_modules/@syntro/design-system/src/assets/syntrologie-logo.svg +0 -21
- package/node_modules/@syntro/design-system/src/assets/syntrologie-logomark.svg +0 -10
- package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +0 -129
- package/node_modules/@syntrologie/sdk-contracts/dist/index.js +0 -15
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +0 -2225
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +0 -162
- package/node_modules/@syntrologie/sdk-contracts/package.json +0 -33
- package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts +0 -2
- package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/cn.js +0 -3
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts +0 -34
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +0 -158
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.js +0 -9
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +0 -23
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +0 -40
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +0 -22
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.js +0 -9
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts +0 -13
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.js +0 -15
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts +0 -9
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.js +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts +0 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +0 -25
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +0 -379
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.js +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.js +0 -17
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts +0 -32
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +0 -85
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts +0 -6
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.js +0 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.js +0 -5
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +0 -12
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +0 -40
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +0 -26
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +0 -202
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts +0 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.js +0 -46
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +0 -24
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.js +0 -86
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +0 -34
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +0 -25
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -37
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +0 -52
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts +0 -22
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts.map +0 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.js +0 -143
- package/node_modules/@syntrologie/shared-editor-ui/package.json +0 -45
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Zod schemas for decision strategies, conditions, and event scoping.
|
|
3
|
-
*
|
|
4
|
-
* These are the canonical definitions — runtime-sdk and all adaptive packages
|
|
5
|
-
* should import from here instead of duplicating.
|
|
6
|
-
*/
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
// =============================================================================
|
|
9
|
-
// ANCHOR ID SCHEMA
|
|
10
|
-
// =============================================================================
|
|
11
|
-
export const AnchorIdZ = z
|
|
12
|
-
.object({
|
|
13
|
-
selector: z.string(),
|
|
14
|
-
route: z.union([z.string(), z.array(z.string())]),
|
|
15
|
-
})
|
|
16
|
-
.strict();
|
|
17
|
-
// =============================================================================
|
|
18
|
-
// CONDITION SCHEMAS
|
|
19
|
-
// =============================================================================
|
|
20
|
-
export const PageUrlConditionZ = z.object({
|
|
21
|
-
type: z.literal('page_url'),
|
|
22
|
-
url: z.string(),
|
|
23
|
-
});
|
|
24
|
-
export const RouteConditionZ = z.object({
|
|
25
|
-
type: z.literal('route'),
|
|
26
|
-
routeId: z.string(),
|
|
27
|
-
});
|
|
28
|
-
export const AnchorVisibleConditionZ = z.object({
|
|
29
|
-
type: z.literal('anchor_visible'),
|
|
30
|
-
anchorId: z.string(),
|
|
31
|
-
state: z.enum(['visible', 'present', 'absent']),
|
|
32
|
-
});
|
|
33
|
-
export const EventOccurredConditionZ = z.object({
|
|
34
|
-
type: z.literal('event_occurred'),
|
|
35
|
-
eventName: z.string(),
|
|
36
|
-
withinMs: z.number().optional(),
|
|
37
|
-
});
|
|
38
|
-
export const StateEqualsConditionZ = z.object({
|
|
39
|
-
type: z.literal('state_equals'),
|
|
40
|
-
key: z.string(),
|
|
41
|
-
value: z.unknown(),
|
|
42
|
-
});
|
|
43
|
-
export const ViewportConditionZ = z.object({
|
|
44
|
-
type: z.literal('viewport'),
|
|
45
|
-
minWidth: z.number().optional(),
|
|
46
|
-
maxWidth: z.number().optional(),
|
|
47
|
-
minHeight: z.number().optional(),
|
|
48
|
-
maxHeight: z.number().optional(),
|
|
49
|
-
});
|
|
50
|
-
export const SessionMetricConditionZ = z.object({
|
|
51
|
-
type: z.literal('session_metric'),
|
|
52
|
-
key: z.string(),
|
|
53
|
-
operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),
|
|
54
|
-
threshold: z.number(),
|
|
55
|
-
});
|
|
56
|
-
export const DismissedConditionZ = z.object({
|
|
57
|
-
type: z.literal('dismissed'),
|
|
58
|
-
key: z.string(),
|
|
59
|
-
inverted: z.boolean().optional(),
|
|
60
|
-
});
|
|
61
|
-
export const CooldownActiveConditionZ = z.object({
|
|
62
|
-
type: z.literal('cooldown_active'),
|
|
63
|
-
key: z.string(),
|
|
64
|
-
inverted: z.boolean().optional(),
|
|
65
|
-
});
|
|
66
|
-
export const FrequencyLimitConditionZ = z.object({
|
|
67
|
-
type: z.literal('frequency_limit'),
|
|
68
|
-
key: z.string(),
|
|
69
|
-
limit: z.number(),
|
|
70
|
-
inverted: z.boolean().optional(),
|
|
71
|
-
});
|
|
72
|
-
export const MatchOpZ = z.object({
|
|
73
|
-
equals: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
74
|
-
contains: z.string().optional(),
|
|
75
|
-
});
|
|
76
|
-
export const CounterDefZ = z.object({
|
|
77
|
-
events: z.array(z.string()).min(1),
|
|
78
|
-
match: z.record(z.string(), MatchOpZ).optional(),
|
|
79
|
-
});
|
|
80
|
-
export const EventCountConditionZ = z.object({
|
|
81
|
-
type: z.literal('event_count'),
|
|
82
|
-
key: z.string(),
|
|
83
|
-
operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),
|
|
84
|
-
count: z.number().int().min(0),
|
|
85
|
-
withinMs: z.number().positive().optional(),
|
|
86
|
-
counter: CounterDefZ.optional(),
|
|
87
|
-
});
|
|
88
|
-
export const ConditionZ = z.discriminatedUnion('type', [
|
|
89
|
-
PageUrlConditionZ,
|
|
90
|
-
RouteConditionZ,
|
|
91
|
-
AnchorVisibleConditionZ,
|
|
92
|
-
EventOccurredConditionZ,
|
|
93
|
-
StateEqualsConditionZ,
|
|
94
|
-
ViewportConditionZ,
|
|
95
|
-
SessionMetricConditionZ,
|
|
96
|
-
DismissedConditionZ,
|
|
97
|
-
CooldownActiveConditionZ,
|
|
98
|
-
FrequencyLimitConditionZ,
|
|
99
|
-
EventCountConditionZ,
|
|
100
|
-
]);
|
|
101
|
-
// =============================================================================
|
|
102
|
-
// STRATEGY SCHEMAS
|
|
103
|
-
// =============================================================================
|
|
104
|
-
export const RuleZ = z.object({
|
|
105
|
-
conditions: z.array(ConditionZ),
|
|
106
|
-
value: z.unknown(),
|
|
107
|
-
});
|
|
108
|
-
export const RuleStrategyZ = z.object({
|
|
109
|
-
type: z.literal('rules'),
|
|
110
|
-
rules: z.array(RuleZ),
|
|
111
|
-
default: z.unknown(),
|
|
112
|
-
});
|
|
113
|
-
export const ScoreStrategyZ = z.object({
|
|
114
|
-
type: z.literal('score'),
|
|
115
|
-
field: z.string(),
|
|
116
|
-
threshold: z.number(),
|
|
117
|
-
above: z.unknown(),
|
|
118
|
-
below: z.unknown(),
|
|
119
|
-
});
|
|
120
|
-
export const ModelStrategyZ = z.object({
|
|
121
|
-
type: z.literal('model'),
|
|
122
|
-
modelId: z.string(),
|
|
123
|
-
inputs: z.array(z.string()),
|
|
124
|
-
outputMapping: z.record(z.string(), z.unknown()),
|
|
125
|
-
default: z.unknown(),
|
|
126
|
-
});
|
|
127
|
-
export const ExternalStrategyZ = z.object({
|
|
128
|
-
type: z.literal('external'),
|
|
129
|
-
endpoint: z.string(),
|
|
130
|
-
method: z.enum(['GET', 'POST']).optional(),
|
|
131
|
-
default: z.unknown(),
|
|
132
|
-
timeoutMs: z.number().optional(),
|
|
133
|
-
});
|
|
134
|
-
export const DecisionStrategyZ = z.discriminatedUnion('type', [
|
|
135
|
-
RuleStrategyZ,
|
|
136
|
-
ScoreStrategyZ,
|
|
137
|
-
ModelStrategyZ,
|
|
138
|
-
ExternalStrategyZ,
|
|
139
|
-
]);
|
|
140
|
-
/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */
|
|
141
|
-
export const TriggerWhenZ = DecisionStrategyZ.nullable().optional();
|
|
142
|
-
// =============================================================================
|
|
143
|
-
// EVENT SCOPE SCHEMA
|
|
144
|
-
// =============================================================================
|
|
145
|
-
/** Scopes a widget to specific events/URLs. */
|
|
146
|
-
export const EventScopeZ = z.object({
|
|
147
|
-
events: z.array(z.string()),
|
|
148
|
-
urlContains: z.string().optional(),
|
|
149
|
-
props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),
|
|
150
|
-
});
|
|
151
|
-
// =============================================================================
|
|
152
|
-
// NOTIFY SCHEMA
|
|
153
|
-
// =============================================================================
|
|
154
|
-
/** Toast notification config for triggerWhen transitions. */
|
|
155
|
-
export const NotifyZ = z
|
|
156
|
-
.object({
|
|
157
|
-
title: z.string().optional(),
|
|
158
|
-
body: z.string().optional(),
|
|
159
|
-
icon: z.string().optional(),
|
|
160
|
-
})
|
|
161
|
-
.nullable()
|
|
162
|
-
.optional();
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@syntrologie/sdk-contracts",
|
|
3
|
-
"version": "0.0.0-semantically-released",
|
|
4
|
-
"description": "Shared TypeScript contracts between runtime-sdk and adaptive packages",
|
|
5
|
-
"license": "Proprietary",
|
|
6
|
-
"private": true,
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"import": "./dist/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./schemas": {
|
|
16
|
-
"types": "./dist/schemas.d.ts",
|
|
17
|
-
"import": "./dist/schemas.js"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"zod": "^3.25.76"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"typescript": "^5.9.3"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,CAE5E"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AnchorPicker — Shared Element Picker Overlay
|
|
3
|
-
*
|
|
4
|
-
* Full-page overlay that lets the user hover and click to select a DOM element.
|
|
5
|
-
* Returns the element, its CSS selector, and a human-readable description.
|
|
6
|
-
*
|
|
7
|
-
* Renders via createPortal to document.body. Uses inline styles (not Tailwind)
|
|
8
|
-
* because it lives outside the editor's style scope.
|
|
9
|
-
*
|
|
10
|
-
* EXCEPTION: This component MUST stay on document.body (not in shadow root).
|
|
11
|
-
* It uses document.elementFromPoint() to detect host page elements under the
|
|
12
|
-
* cursor. If placed inside a shadow root, the overlay would block detection
|
|
13
|
-
* of underlying host elements.
|
|
14
|
-
*
|
|
15
|
-
* Instructions / cancel UI should be rendered by the consumer in their own
|
|
16
|
-
* panel — this component only provides the page overlay.
|
|
17
|
-
*/
|
|
18
|
-
export interface PickedElement {
|
|
19
|
-
element: Element;
|
|
20
|
-
selector: string;
|
|
21
|
-
description: string;
|
|
22
|
-
}
|
|
23
|
-
export interface AnchorPickerProps {
|
|
24
|
-
isActive: boolean;
|
|
25
|
-
onPick: (picked: PickedElement) => void;
|
|
26
|
-
onCancel: () => void;
|
|
27
|
-
/** When true, clicks pass through to the page (no preventDefault/stopPropagation).
|
|
28
|
-
* The consumer is responsible for capturing the pick via EventBus or other means.
|
|
29
|
-
* Hover highlighting still works for visual feedback. */
|
|
30
|
-
passthroughClicks?: boolean;
|
|
31
|
-
excludeSelector?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare function AnchorPicker({ isActive, onPick, onCancel, passthroughClicks, excludeSelector, }: AnchorPickerProps): import("react").ReactPortal | null;
|
|
34
|
-
//# sourceMappingURL=AnchorPicker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorPicker.d.ts","sourceRoot":"","sources":["../../src/components/AnchorPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAWH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;8DAE0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAKD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,iBAAyB,EACzB,eAAuJ,GACxJ,EAAE,iBAAiB,sCAwMnB"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* AnchorPicker — Shared Element Picker Overlay
|
|
4
|
-
*
|
|
5
|
-
* Full-page overlay that lets the user hover and click to select a DOM element.
|
|
6
|
-
* Returns the element, its CSS selector, and a human-readable description.
|
|
7
|
-
*
|
|
8
|
-
* Renders via createPortal to document.body. Uses inline styles (not Tailwind)
|
|
9
|
-
* because it lives outside the editor's style scope.
|
|
10
|
-
*
|
|
11
|
-
* EXCEPTION: This component MUST stay on document.body (not in shadow root).
|
|
12
|
-
* It uses document.elementFromPoint() to detect host page elements under the
|
|
13
|
-
* cursor. If placed inside a shadow root, the overlay would block detection
|
|
14
|
-
* of underlying host elements.
|
|
15
|
-
*
|
|
16
|
-
* Instructions / cancel UI should be rendered by the consumer in their own
|
|
17
|
-
* panel — this component only provides the page overlay.
|
|
18
|
-
*/
|
|
19
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
20
|
-
import { createPortal } from 'react-dom';
|
|
21
|
-
import { generateSelector, getElementDescription, validateSelector, } from '../utils/selectorGenerator';
|
|
22
|
-
const HIGHLIGHT_COLOR = '#3b82f6';
|
|
23
|
-
const HIGHLIGHT_BG = 'rgba(59, 130, 246, 0.1)';
|
|
24
|
-
export function AnchorPicker({ isActive, onPick, onCancel, passthroughClicks = false, excludeSelector = '[data-syntro-editor-panel], [data-shadow-canvas-id], .syntro-tooltip, .syntro-modal, .syntro-highlight, [data-syntro-anchor-picker]', }) {
|
|
25
|
-
const [hoveredElement, setHoveredElement] = useState(null);
|
|
26
|
-
const [hoveredSelector, setHoveredSelector] = useState('');
|
|
27
|
-
const overlayRef = useRef(null);
|
|
28
|
-
const handleMouseMove = useCallback((e) => {
|
|
29
|
-
const overlay = overlayRef.current;
|
|
30
|
-
if (overlay) {
|
|
31
|
-
overlay.style.pointerEvents = 'none';
|
|
32
|
-
}
|
|
33
|
-
const elementAtPoint = document.elementFromPoint(e.clientX, e.clientY);
|
|
34
|
-
if (overlay) {
|
|
35
|
-
overlay.style.pointerEvents = 'auto';
|
|
36
|
-
}
|
|
37
|
-
if (!elementAtPoint) {
|
|
38
|
-
setHoveredElement(null);
|
|
39
|
-
setHoveredSelector('');
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (excludeSelector && elementAtPoint.closest(excludeSelector)) {
|
|
43
|
-
setHoveredElement(null);
|
|
44
|
-
setHoveredSelector('');
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (['HTML', 'BODY', 'HEAD'].includes(elementAtPoint.tagName)) {
|
|
48
|
-
setHoveredElement(null);
|
|
49
|
-
setHoveredSelector('');
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
setHoveredElement(elementAtPoint);
|
|
53
|
-
const selector = generateSelector(elementAtPoint);
|
|
54
|
-
setHoveredSelector(selector);
|
|
55
|
-
}, [excludeSelector]);
|
|
56
|
-
const handleClick = useCallback((e) => {
|
|
57
|
-
if (passthroughClicks)
|
|
58
|
-
return; // Let click propagate to PostHog
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
e.stopPropagation();
|
|
61
|
-
if (hoveredElement && hoveredSelector) {
|
|
62
|
-
if (validateSelector(hoveredSelector, hoveredElement)) {
|
|
63
|
-
onPick({
|
|
64
|
-
element: hoveredElement,
|
|
65
|
-
selector: hoveredSelector,
|
|
66
|
-
description: getElementDescription(hoveredElement),
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
const newSelector = generateSelector(hoveredElement);
|
|
71
|
-
onPick({
|
|
72
|
-
element: hoveredElement,
|
|
73
|
-
selector: newSelector,
|
|
74
|
-
description: getElementDescription(hoveredElement),
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, [passthroughClicks, hoveredElement, hoveredSelector, onPick]);
|
|
79
|
-
const handleKeyDown = useCallback((e) => {
|
|
80
|
-
if (e.key === 'Escape') {
|
|
81
|
-
e.preventDefault();
|
|
82
|
-
onCancel();
|
|
83
|
-
}
|
|
84
|
-
}, [onCancel]);
|
|
85
|
-
useEffect(() => {
|
|
86
|
-
if (!isActive)
|
|
87
|
-
return;
|
|
88
|
-
document.addEventListener('mousemove', handleMouseMove, true);
|
|
89
|
-
// In passthrough mode, don't register click handler — let clicks reach PostHog
|
|
90
|
-
if (!passthroughClicks) {
|
|
91
|
-
document.addEventListener('click', handleClick, true);
|
|
92
|
-
}
|
|
93
|
-
document.addEventListener('keydown', handleKeyDown, true);
|
|
94
|
-
return () => {
|
|
95
|
-
document.removeEventListener('mousemove', handleMouseMove, true);
|
|
96
|
-
if (!passthroughClicks) {
|
|
97
|
-
document.removeEventListener('click', handleClick, true);
|
|
98
|
-
}
|
|
99
|
-
document.removeEventListener('keydown', handleKeyDown, true);
|
|
100
|
-
};
|
|
101
|
-
}, [isActive, passthroughClicks, handleMouseMove, handleClick, handleKeyDown]);
|
|
102
|
-
if (!isActive)
|
|
103
|
-
return null;
|
|
104
|
-
const rect = hoveredElement?.getBoundingClientRect();
|
|
105
|
-
return createPortal(_jsxs("div", { ref: overlayRef, "data-syntro-anchor-picker": true, style: {
|
|
106
|
-
position: 'fixed',
|
|
107
|
-
inset: 0,
|
|
108
|
-
cursor: 'crosshair',
|
|
109
|
-
zIndex: 2147483644,
|
|
110
|
-
pointerEvents: passthroughClicks ? 'none' : undefined,
|
|
111
|
-
}, children: [_jsx("div", { style: {
|
|
112
|
-
position: 'absolute',
|
|
113
|
-
inset: 0,
|
|
114
|
-
background: 'rgba(0, 0, 0, 0.08)',
|
|
115
|
-
pointerEvents: 'none',
|
|
116
|
-
} }), hoveredElement && rect && (_jsx("div", { style: {
|
|
117
|
-
position: 'fixed',
|
|
118
|
-
left: rect.left - 2,
|
|
119
|
-
top: rect.top - 2,
|
|
120
|
-
width: rect.width + 4,
|
|
121
|
-
height: rect.height + 4,
|
|
122
|
-
border: `2px solid ${HIGHLIGHT_COLOR}`,
|
|
123
|
-
backgroundColor: HIGHLIGHT_BG,
|
|
124
|
-
borderRadius: '4px',
|
|
125
|
-
boxShadow: '0 0 0 9999px rgba(0, 0, 0, 0.2)',
|
|
126
|
-
pointerEvents: 'none',
|
|
127
|
-
transition: 'all 0.1s ease-out',
|
|
128
|
-
} })), hoveredElement && rect && (_jsxs("div", { className: "se-text-xs", style: {
|
|
129
|
-
position: 'fixed',
|
|
130
|
-
left: Math.max(8, Math.min(rect.left, window.innerWidth - 320)),
|
|
131
|
-
top: Math.max(8, rect.top - 68),
|
|
132
|
-
backgroundColor: '#1e293b',
|
|
133
|
-
color: '#e2e8f0',
|
|
134
|
-
padding: '8px 12px',
|
|
135
|
-
borderRadius: '6px',
|
|
136
|
-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',
|
|
137
|
-
zIndex: 1,
|
|
138
|
-
fontFamily: 'monospace',
|
|
139
|
-
maxWidth: '300px',
|
|
140
|
-
pointerEvents: 'none',
|
|
141
|
-
}, children: [_jsx("div", { className: "se-text-xs", style: {
|
|
142
|
-
textTransform: 'uppercase',
|
|
143
|
-
letterSpacing: '0.05em',
|
|
144
|
-
marginBottom: '4px',
|
|
145
|
-
color: '#94a3b8',
|
|
146
|
-
}, children: "Click to select" }), _jsx("div", { style: {
|
|
147
|
-
color: '#38bdf8',
|
|
148
|
-
overflow: 'hidden',
|
|
149
|
-
textOverflow: 'ellipsis',
|
|
150
|
-
whiteSpace: 'nowrap',
|
|
151
|
-
}, children: hoveredSelector }), _jsx("div", { style: {
|
|
152
|
-
marginTop: '4px',
|
|
153
|
-
color: '#cbd5e1',
|
|
154
|
-
overflow: 'hidden',
|
|
155
|
-
textOverflow: 'ellipsis',
|
|
156
|
-
whiteSpace: 'nowrap',
|
|
157
|
-
}, children: getElementDescription(hoveredElement) })] }))] }), document.body);
|
|
158
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface BeforeAfterToggleProps {
|
|
2
|
-
mode: 'before' | 'after';
|
|
3
|
-
onToggle: (mode: 'before' | 'after') => void;
|
|
4
|
-
}
|
|
5
|
-
export declare function BeforeAfterToggle({ mode, onToggle }: BeforeAfterToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=BeforeAfterToggle.d.ts.map
|
package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BeforeAfterToggle.d.ts","sourceRoot":"","sources":["../../src/components/BeforeAfterToggle.tsx"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CA6B3E"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../cn';
|
|
3
|
-
export function BeforeAfterToggle({ mode, onToggle }) {
|
|
4
|
-
return (_jsxs("div", { className: "se-flex se-mb-3 se-rounded-lg se-overflow-hidden se-border se-border-border-primary", children: [_jsx("button", { type: "button", onClick: () => onToggle('before'), className: cn('se-flex-1 se-py-1.5 se-px-3 se-border-none se-text-sm se-font-semibold se-cursor-pointer focus-visible:se-shadow-focus-primary focus-visible:se-outline-none', mode === 'before'
|
|
5
|
-
? 'se-bg-blue-5/30 se-text-blue-5'
|
|
6
|
-
: 'se-bg-transparent se-text-text-secondary'), children: "Before" }), _jsx("button", { type: "button", onClick: () => onToggle('after'), className: cn('se-flex-1 se-py-1.5 se-px-3 se-border-none se-border-l se-border-border-primary se-text-sm se-font-semibold se-cursor-pointer focus-visible:se-shadow-focus-primary focus-visible:se-outline-none', mode === 'after'
|
|
7
|
-
? 'se-bg-blue-5/30 se-text-blue-5'
|
|
8
|
-
: 'se-bg-transparent se-text-text-secondary'), children: "After" })] }));
|
|
9
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ConditionStatusLine — inline triggerWhen diagnostic on EditorCard.
|
|
3
|
-
*
|
|
4
|
-
* Shows a compact one-line status for items with triggerWhen conditions.
|
|
5
|
-
* Click to expand per-condition detail.
|
|
6
|
-
*/
|
|
7
|
-
import type { FormattedCondition } from '../formatConditionLabel';
|
|
8
|
-
export interface ConditionStatus {
|
|
9
|
-
type: string;
|
|
10
|
-
passed: boolean;
|
|
11
|
-
formatted: FormattedCondition;
|
|
12
|
-
}
|
|
13
|
-
export interface TriggerWhenStatus {
|
|
14
|
-
visible: boolean;
|
|
15
|
-
isFallback: boolean;
|
|
16
|
-
conditions: ConditionStatus[];
|
|
17
|
-
}
|
|
18
|
-
interface ConditionStatusLineProps {
|
|
19
|
-
status: TriggerWhenStatus | null;
|
|
20
|
-
}
|
|
21
|
-
export declare function ConditionStatusLine({ status }: ConditionStatusLineProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=ConditionStatusLine.d.ts.map
|
package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionStatusLine.d.ts","sourceRoot":"","sources":["../../src/components/ConditionStatusLine.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,kBAAkB,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,UAAU,wBAAwB;IAChC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAClC;AA6CD,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE,wBAAwB,kDAiEvE"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* ConditionStatusLine — inline triggerWhen diagnostic on EditorCard.
|
|
4
|
-
*
|
|
5
|
-
* Shows a compact one-line status for items with triggerWhen conditions.
|
|
6
|
-
* Click to expand per-condition detail.
|
|
7
|
-
*/
|
|
8
|
-
import { Check, Clock, X } from 'lucide-react';
|
|
9
|
-
import { useState } from 'react';
|
|
10
|
-
import { cn } from '../cn';
|
|
11
|
-
function ProgressBar({ current, target }) {
|
|
12
|
-
const pct = Math.min(100, Math.round((current / Math.max(target, 1)) * 100));
|
|
13
|
-
return (_jsx("span", { className: "se-inline-block se-w-12 se-h-1.5 se-rounded-full se-bg-white/20 se-align-middle se-ml-1", title: `${current}/${target} (${pct}%)`, children: _jsx("span", { className: cn('se-block se-h-full se-rounded-full se-transition-all', pct >= 100 ? 'se-bg-green-4' : 'se-bg-blue-4'), style: { width: `${pct}%` } }) }));
|
|
14
|
-
}
|
|
15
|
-
function ConditionRow({ cs }) {
|
|
16
|
-
return (_jsxs("div", { className: "se-flex se-items-center se-gap-1 se-pl-3 se-text-[12px] se-font-medium se-text-text-secondary", children: [cs.passed ? (_jsx(Check, { className: "se-w-3 se-h-3 se-text-green-4" })) : (_jsx(X, { className: "se-w-3 se-h-3 se-text-red-4" })), _jsxs("span", { children: [cs.type, ":"] }), _jsx("span", { className: "se-text-text-secondary", children: cs.formatted.label }), cs.formatted.progress && (_jsxs(_Fragment, { children: [_jsx(ProgressBar, { current: cs.formatted.progress.current, target: cs.formatted.progress.target }), _jsxs("span", { className: "se-text-text-secondary se-ml-0.5", children: [cs.formatted.progress.current, "/", cs.formatted.progress.target] })] }))] }));
|
|
17
|
-
}
|
|
18
|
-
export function ConditionStatusLine({ status }) {
|
|
19
|
-
const [expanded, setExpanded] = useState(false);
|
|
20
|
-
if (!status)
|
|
21
|
-
return null;
|
|
22
|
-
const { visible, conditions } = status;
|
|
23
|
-
const passedCount = conditions.filter((c) => c.passed).length;
|
|
24
|
-
const totalCount = conditions.length;
|
|
25
|
-
// Icon: visible = green check, hidden = clock
|
|
26
|
-
const StatusIcon = visible ? Check : Clock;
|
|
27
|
-
const iconColor = visible ? 'se-text-green-4' : 'se-text-yellow-5';
|
|
28
|
-
// Single condition: show inline detail
|
|
29
|
-
// Multi condition: show summary, click to expand
|
|
30
|
-
const isSingle = totalCount === 1;
|
|
31
|
-
if (isSingle) {
|
|
32
|
-
const cs = conditions[0];
|
|
33
|
-
return (_jsxs("div", { className: "se-text-[12px] se-font-medium se-text-text-secondary se-mt-0.5 se-flex se-items-center se-gap-1", children: [_jsx(StatusIcon, { className: cn('se-w-3 se-h-3', iconColor) }), _jsxs("span", { children: [cs.type, ":"] }), _jsx("span", { className: "se-text-text-secondary", children: cs.formatted.label }), cs.formatted.progress && (_jsxs(_Fragment, { children: [_jsx(ProgressBar, { current: cs.formatted.progress.current, target: cs.formatted.progress.target }), _jsxs("span", { className: "se-text-text-secondary se-ml-0.5", children: [cs.formatted.progress.current, "/", cs.formatted.progress.target] })] }))] }));
|
|
34
|
-
}
|
|
35
|
-
// Multi-condition: summary line + expandable detail
|
|
36
|
-
return (_jsxs("div", { className: "se-mt-0.5", children: [_jsxs("button", { type: "button", className: "se-flex se-items-center se-gap-1 se-text-[12px] se-font-medium se-text-text-secondary se-bg-transparent se-border-none se-cursor-pointer se-p-0 hover:se-text-text-primary", onClick: (e) => {
|
|
37
|
-
e.stopPropagation();
|
|
38
|
-
setExpanded(!expanded);
|
|
39
|
-
}, children: [_jsx(StatusIcon, { className: cn('se-w-3 se-h-3', iconColor) }), _jsxs("span", { children: [passedCount, " of ", totalCount, " conditions met"] }), _jsx("span", { className: "se-text-[11px] se-ml-0.5", children: expanded ? '\u25b2' : '\u25bc' })] }), expanded && (_jsx("div", { className: "se-mt-0.5 se-space-y-0.5", children: conditions.map((cs, i) => (_jsx(ConditionRow, { cs: cs }, i))) }))] }));
|
|
40
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface DetectionBadgeProps {
|
|
2
|
-
found: boolean;
|
|
3
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare function DetectionBadge({ found, onClick }: DetectionBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=DetectionBadge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetectionBadge.d.ts","sourceRoot":"","sources":["../../src/components/DetectionBadge.tsx"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,mBAAmB,2CA6CrE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../cn';
|
|
3
|
-
export function DetectionBadge({ found, onClick }) {
|
|
4
|
-
const title = onClick
|
|
5
|
-
? found
|
|
6
|
-
? 'Click to scroll to element'
|
|
7
|
-
: 'Click to navigate to page'
|
|
8
|
-
: found
|
|
9
|
-
? 'Found on this page'
|
|
10
|
-
: 'Not found on this page';
|
|
11
|
-
const textColor = found ? 'se-text-green-4' : 'se-text-text-tertiary';
|
|
12
|
-
const dotColor = found ? 'se-bg-green-4' : 'se-bg-text-tertiary';
|
|
13
|
-
const classes = cn('se-inline-flex se-items-center se-gap-1 se-text-xs se-font-medium se-shrink-0', textColor, onClick && 'se-cursor-pointer hover:se-opacity-80');
|
|
14
|
-
const dot = (_jsx("span", { "data-indicator": "", className: cn('se-w-1.5 se-h-1.5 se-rounded-full', dotColor) }));
|
|
15
|
-
if (onClick) {
|
|
16
|
-
return (_jsxs("button", { type: "button", className: cn(classes, 'se-border-none se-bg-transparent se-p-0'), title: title, onClick: (e) => {
|
|
17
|
-
e.stopPropagation();
|
|
18
|
-
onClick(e);
|
|
19
|
-
}, children: [dot, "GoTo"] }));
|
|
20
|
-
}
|
|
21
|
-
return (_jsxs("span", { className: classes, title: title, children: [dot, "GoTo"] }));
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
interface DismissedSectionProps {
|
|
3
|
-
count: number;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function DismissedSection({ count, children }: DismissedSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=DismissedSection.d.ts.map
|
package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DismissedSection.d.ts","sourceRoot":"","sources":["../../src/components/DismissedSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAqB1E"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
export function DismissedSection({ count, children }) {
|
|
4
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
5
|
-
return (_jsxs("div", { className: "se-mt-4 se-cursor-pointer se-select-none", children: [_jsxs("div", { role: "button", tabIndex: 0, className: "se-text-xs se-font-semibold se-text-text-secondary se-flex se-items-center se-gap-1.5 se-cursor-pointer", onClick: () => setIsOpen(!isOpen), onKeyDown: (e) => {
|
|
6
|
-
if (e.key === 'Enter' || e.key === ' ')
|
|
7
|
-
setIsOpen(!isOpen);
|
|
8
|
-
}, children: [_jsx("span", { children: isOpen ? '\u25be' : '\u25b8' }), _jsxs("span", { children: ["Dismissed (", count, ")"] })] }), isOpen && _jsx("div", { className: "se-mt-1.5", children: children })] }));
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditBackButton.d.ts","sourceRoot":"","sources":["../../src/components/EditBackButton.tsx"],"names":[],"mappings":"AAAA,UAAU,mBAAmB;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAqB,EAAE,EAAE,mBAAmB,2CAUrF"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function EditBackButton({ onClick, label = '\u2190 List' }) {
|
|
3
|
-
return (_jsx("button", { type: "button", onClick: onClick, className: "se-h-10 se-px-4 se-py-2 se-rounded-md se-bg-btn-neutral se-text-btn-neutral-text se-border se-border-btn-neutral-border hover:se-text-btn-neutral-text-hover se-text-sm se-font-medium se-cursor-pointer se-mt-2 se-inline-flex se-items-center se-justify-center focus-visible:se-shadow-focus-primary focus-visible:se-outline-none", children: label }));
|
|
4
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorBody.d.ts","sourceRoot":"","sources":["../../src/components/EditorBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAEvD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
interface EditorCardProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
itemKey: string;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
onMouseEnter?: () => void;
|
|
7
|
-
onMouseLeave?: () => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
validated?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function EditorCard({ children, itemKey, onClick, onMouseEnter, onMouseLeave, className, validated, }: EditorCardProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=EditorCard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard.d.ts","sourceRoot":"","sources":["../../src/components/EditorCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,eAAe,2CA+BjB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../cn';
|
|
3
|
-
export function EditorCard({ children, itemKey, onClick, onMouseEnter, onMouseLeave, className, validated, }) {
|
|
4
|
-
return (
|
|
5
|
-
// biome-ignore lint/a11y/noStaticElementInteractions: onMouseEnter/onMouseLeave are for presentational hover highlighting, not user interaction
|
|
6
|
-
_jsx("div", { "data-item-key": itemKey, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, onClick: onClick, onKeyDown: onClick
|
|
7
|
-
? (e) => {
|
|
8
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
onClick();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
: undefined, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, className: cn('se-py-2 se-px-2.5 se-rounded-lg se-border se-bg-card-bg se-shadow-sm se-mb-1 se-text-sm se-text-text-primary', validated ? 'se-border-green-4/50 se-shadow-glow-green' : 'se-border-border-primary', onClick &&
|
|
14
|
-
'se-cursor-pointer hover:se-border-border-primary/80 hover:se-bg-sidebar-hover se-transition-colors', className), children: children }));
|
|
15
|
-
}
|