@syntrologie/adapt-nav 2.16.0 → 2.18.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 (211) hide show
  1. package/dist/NavWidgetLit.d.ts.map +1 -1
  2. package/dist/chunk-7DTOSQNC.js +43 -0
  3. package/dist/chunk-7DTOSQNC.js.map +7 -0
  4. package/dist/chunk-ZYHZ6JAD.js +447 -0
  5. package/dist/chunk-ZYHZ6JAD.js.map +7 -0
  6. package/dist/editor.d.ts +48 -21
  7. package/dist/editor.d.ts.map +1 -1
  8. package/dist/editor.js +5361 -310
  9. package/dist/editor.js.map +7 -0
  10. package/dist/resolveNavTarget.d.ts +61 -0
  11. package/dist/resolveNavTarget.d.ts.map +1 -0
  12. package/dist/resolveNavTarget.test.d.ts +2 -0
  13. package/dist/resolveNavTarget.test.d.ts.map +1 -0
  14. package/dist/runtime.d.ts +3 -4
  15. package/dist/runtime.d.ts.map +1 -1
  16. package/dist/runtime.js +612 -221
  17. package/dist/runtime.js.map +7 -0
  18. package/dist/schema.d.ts +182 -72
  19. package/dist/schema.d.ts.map +1 -1
  20. package/dist/schema.js +155 -125
  21. package/dist/schema.js.map +7 -0
  22. package/package.json +9 -24
  23. package/dist/NavWidget.d.ts +0 -31
  24. package/dist/NavWidget.d.ts.map +0 -1
  25. package/dist/NavWidget.js +0 -476
  26. package/dist/NavWidgetLit.js +0 -495
  27. package/dist/NavWidgetLit.test.js +0 -199
  28. package/dist/cdn.d.ts +0 -62
  29. package/dist/cdn.d.ts.map +0 -1
  30. package/dist/cdn.js +0 -48
  31. package/dist/editor-lit.d.ts +0 -49
  32. package/dist/editor-lit.d.ts.map +0 -1
  33. package/dist/editor-lit.js +0 -319
  34. package/dist/runtime-lit.d.ts +0 -108
  35. package/dist/runtime-lit.d.ts.map +0 -1
  36. package/dist/runtime-lit.js +0 -241
  37. package/dist/summarize.js +0 -51
  38. package/dist/types.js +0 -18
  39. package/node_modules/@syntro/design-system/README.md +0 -335
  40. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logo.svg +0 -21
  41. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logomark.svg +0 -10
  42. package/node_modules/@syntro/design-system/dist/index.d.ts +0 -8
  43. package/node_modules/@syntro/design-system/dist/index.d.ts.map +0 -1
  44. package/node_modules/@syntro/design-system/dist/index.js +0 -7
  45. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts +0 -19
  46. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts.map +0 -1
  47. package/node_modules/@syntro/design-system/dist/tailwind-preset.js +0 -455
  48. package/node_modules/@syntro/design-system/dist/tokens/colors.css +0 -464
  49. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts +0 -874
  50. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts.map +0 -1
  51. package/node_modules/@syntro/design-system/dist/tokens/colors.js +0 -564
  52. package/node_modules/@syntro/design-system/dist/tokens/effects.css +0 -43
  53. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts +0 -139
  54. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts.map +0 -1
  55. package/node_modules/@syntro/design-system/dist/tokens/effects.js +0 -121
  56. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +0 -12
  57. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +0 -1
  58. package/node_modules/@syntro/design-system/dist/tokens/index.js +0 -11
  59. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts +0 -93
  60. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.d.ts.map +0 -1
  61. package/node_modules/@syntro/design-system/dist/tokens/panel-shell.js +0 -72
  62. package/node_modules/@syntro/design-system/package.json +0 -55
  63. package/node_modules/@syntro/design-system/src/assets/syntrologie-logo.svg +0 -21
  64. package/node_modules/@syntro/design-system/src/assets/syntrologie-logomark.svg +0 -10
  65. package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +0 -129
  66. package/node_modules/@syntrologie/sdk-contracts/dist/index.js +0 -17
  67. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +0 -2296
  68. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +0 -361
  69. package/node_modules/@syntrologie/sdk-contracts/package.json +0 -33
  70. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts +0 -2
  71. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts.map +0 -1
  72. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.js +0 -3
  73. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts +0 -34
  74. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts.map +0 -1
  75. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +0 -161
  76. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts +0 -84
  77. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.d.ts.map +0 -1
  78. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPickerLit.js +0 -323
  79. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts +0 -7
  80. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map +0 -1
  81. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.js +0 -9
  82. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts +0 -25
  83. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.d.ts.map +0 -1
  84. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggleLit.js +0 -55
  85. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +0 -23
  86. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +0 -1
  87. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +0 -40
  88. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts +0 -33
  89. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.d.ts.map +0 -1
  90. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLineLit.js +0 -118
  91. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +0 -7
  92. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +0 -1
  93. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +0 -22
  94. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts +0 -32
  95. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.d.ts.map +0 -1
  96. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadgeLit.js +0 -68
  97. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts +0 -8
  98. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map +0 -1
  99. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.js +0 -9
  100. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts +0 -34
  101. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.d.ts.map +0 -1
  102. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSectionLit.js +0 -57
  103. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts +0 -7
  104. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts.map +0 -1
  105. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.js +0 -4
  106. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts +0 -13
  107. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.d.ts.map +0 -1
  108. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButtonLit.js +0 -31
  109. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts +0 -7
  110. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts.map +0 -1
  111. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.js +0 -4
  112. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts +0 -7
  113. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.d.ts.map +0 -1
  114. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBodyLit.js +0 -15
  115. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts +0 -13
  116. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts.map +0 -1
  117. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.js +0 -15
  118. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts +0 -36
  119. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.d.ts.map +0 -1
  120. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCardLit.js +0 -102
  121. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts +0 -7
  122. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts.map +0 -1
  123. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.js +0 -4
  124. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts +0 -20
  125. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.d.ts.map +0 -1
  126. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooterLit.js +0 -48
  127. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts +0 -9
  128. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts.map +0 -1
  129. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.js +0 -4
  130. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts +0 -16
  131. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.d.ts.map +0 -1
  132. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeaderLit.js +0 -25
  133. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts +0 -8
  134. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts.map +0 -1
  135. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.js +0 -8
  136. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts +0 -66
  137. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.d.ts.map +0 -1
  138. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInputLit.js +0 -87
  139. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts +0 -7
  140. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts.map +0 -1
  141. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.js +0 -4
  142. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts +0 -7
  143. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.d.ts.map +0 -1
  144. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayoutLit.js +0 -15
  145. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +0 -25
  146. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +0 -1
  147. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +0 -390
  148. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts +0 -66
  149. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.d.ts.map +0 -1
  150. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShellLit.js +0 -528
  151. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts +0 -8
  152. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts.map +0 -1
  153. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.js +0 -8
  154. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts +0 -41
  155. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.d.ts.map +0 -1
  156. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelectLit.js +0 -63
  157. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts +0 -8
  158. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts.map +0 -1
  159. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.js +0 -17
  160. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts +0 -55
  161. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.d.ts.map +0 -1
  162. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextareaLit.js +0 -92
  163. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts +0 -32
  164. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts.map +0 -1
  165. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +0 -85
  166. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts +0 -90
  167. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.d.ts.map +0 -1
  168. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlightLit.js +0 -242
  169. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts +0 -6
  170. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts.map +0 -1
  171. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.js +0 -4
  172. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts +0 -12
  173. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.d.ts.map +0 -1
  174. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyStateLit.js +0 -21
  175. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts +0 -8
  176. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts.map +0 -1
  177. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.js +0 -5
  178. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts +0 -21
  179. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.d.ts.map +0 -1
  180. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeaderLit.js +0 -33
  181. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +0 -12
  182. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +0 -1
  183. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +0 -40
  184. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts +0 -28
  185. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.d.ts.map +0 -1
  186. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourneyLit.js +0 -121
  187. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts +0 -110
  188. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.d.ts.map +0 -1
  189. package/node_modules/@syntrologie/shared-editor-ui/dist/controllers/PanelShellController.js +0 -481
  190. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +0 -26
  191. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +0 -1
  192. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +0 -202
  193. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts +0 -8
  194. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts.map +0 -1
  195. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.js +0 -46
  196. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +0 -24
  197. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +0 -1
  198. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.js +0 -86
  199. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +0 -36
  200. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +0 -1
  201. package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +0 -26
  202. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts +0 -15
  203. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.d.ts.map +0 -1
  204. package/node_modules/@syntrologie/shared-editor-ui/dist/lit-elements.js +0 -14
  205. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -33
  206. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +0 -1
  207. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +0 -68
  208. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts +0 -22
  209. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts.map +0 -1
  210. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.js +0 -143
  211. package/node_modules/@syntrologie/shared-editor-ui/package.json +0 -55
@@ -1,528 +0,0 @@
1
- /**
2
- * EditorPanelShellLit — moveable, resizable wrapper for editor sidebars (Lit web component).
3
- *
4
- * Renders:
5
- * 1. A fixed FAB button (Syntrologie logo) at the panel's bottom-left corner.
6
- * Click toggles open/minimized. Drag moves the entire panel.
7
- * 2. A resizable panel container with semi-transparent background and backdrop blur.
8
- * Supports docked (left/right edge, full height) and free-floating modes.
9
- * Position, size, and dock state persist in localStorage.
10
- *
11
- * Lit port of EditorPanelShell.tsx — preserves all behavior including:
12
- * - FAB drag with pointer capture and edge snapping
13
- * - 8-direction resize handles with direct DOM manipulation for performance
14
- * - localStorage persistence of geometry
15
- * - Viewport clamping on window resize
16
- */
17
- import { panelShell } from '@syntro/design-system';
18
- import { html, LitElement, nothing } from 'lit';
19
- import { styleMap } from 'lit/directives/style-map.js';
20
- // =============================================================================
21
- // Constants
22
- // =============================================================================
23
- const STORAGE_KEY = 'syntro:editor-panel';
24
- const MIN_WIDTH = panelShell.behavior.minWidth;
25
- const MIN_HEIGHT = panelShell.behavior.minHeight;
26
- const FAB_SIZE = panelShell.fab.size;
27
- const FAB_INSET = panelShell.fab.inset;
28
- const SNAP_THRESHOLD = panelShell.behavior.snapThreshold;
29
- const DRAG_THRESHOLD = panelShell.behavior.dragThreshold;
30
- const HANDLE_SIZE = panelShell.behavior.handleSize;
31
- // =============================================================================
32
- // Geometry Helpers
33
- // =============================================================================
34
- function getDefaultGeometry() {
35
- return {
36
- x: 0,
37
- y: 0,
38
- width: MIN_WIDTH,
39
- height: typeof window !== 'undefined' ? window.innerHeight : 800,
40
- docked: 'left',
41
- };
42
- }
43
- function loadGeometry(storageKey) {
44
- if (typeof window === 'undefined')
45
- return getDefaultGeometry();
46
- try {
47
- const raw = localStorage.getItem(storageKey);
48
- if (raw) {
49
- const parsed = JSON.parse(raw);
50
- return {
51
- x: typeof parsed.x === 'number' ? parsed.x : 0,
52
- y: typeof parsed.y === 'number' ? parsed.y : 0,
53
- width: Math.max(MIN_WIDTH, typeof parsed.width === 'number' ? parsed.width : MIN_WIDTH),
54
- height: Math.max(MIN_HEIGHT, typeof parsed.height === 'number' ? parsed.height : window.innerHeight),
55
- docked: parsed.docked === 'left' || parsed.docked === 'right' ? parsed.docked : null,
56
- };
57
- }
58
- }
59
- catch {
60
- /* ignore corrupt localStorage */
61
- }
62
- return getDefaultGeometry();
63
- }
64
- function saveGeometry(storageKey, geo) {
65
- try {
66
- localStorage.setItem(storageKey, JSON.stringify(geo));
67
- }
68
- catch {
69
- /* ignore full localStorage */
70
- }
71
- }
72
- function getPanelRect(geo) {
73
- if (geo.docked === 'left') {
74
- return { top: 0, left: 0, width: geo.width, height: window.innerHeight };
75
- }
76
- if (geo.docked === 'right') {
77
- return {
78
- top: 0,
79
- left: window.innerWidth - geo.width,
80
- width: geo.width,
81
- height: window.innerHeight,
82
- };
83
- }
84
- const { x: left, y: top, width, height } = geo;
85
- return { top, left, width, height };
86
- }
87
- function getFabPosition(geo) {
88
- const rect = getPanelRect(geo);
89
- return {
90
- left: rect.left + FAB_INSET,
91
- top: rect.top + FAB_INSET,
92
- };
93
- }
94
- function clampToViewport(geo) {
95
- if (geo.docked)
96
- return geo;
97
- const vw = window.innerWidth;
98
- const vh = window.innerHeight;
99
- return {
100
- ...geo,
101
- x: Math.max(-(geo.width - FAB_SIZE), Math.min(geo.x, vw - FAB_SIZE)),
102
- y: Math.max(-FAB_INSET, Math.min(geo.y, vh - FAB_SIZE - FAB_INSET)),
103
- };
104
- }
105
- function undockGeometry(geo) {
106
- const rect = getPanelRect(geo);
107
- return {
108
- x: rect.left,
109
- y: rect.top,
110
- width: geo.width,
111
- height: rect.height,
112
- docked: null,
113
- };
114
- }
115
- const RESIZE_HANDLES = [
116
- {
117
- dir: 'n',
118
- style: {
119
- top: '0',
120
- left: `${HANDLE_SIZE}px`,
121
- right: `${HANDLE_SIZE}px`,
122
- height: `${HANDLE_SIZE}px`,
123
- },
124
- cursor: 'ns-resize',
125
- },
126
- {
127
- dir: 's',
128
- style: {
129
- bottom: '0',
130
- left: `${HANDLE_SIZE}px`,
131
- right: `${HANDLE_SIZE}px`,
132
- height: `${HANDLE_SIZE}px`,
133
- },
134
- cursor: 'ns-resize',
135
- },
136
- {
137
- dir: 'e',
138
- style: {
139
- right: '0',
140
- top: `${HANDLE_SIZE}px`,
141
- bottom: `${HANDLE_SIZE}px`,
142
- width: `${HANDLE_SIZE}px`,
143
- },
144
- cursor: 'ew-resize',
145
- },
146
- {
147
- dir: 'w',
148
- style: {
149
- left: '0',
150
- top: `${HANDLE_SIZE}px`,
151
- bottom: `${HANDLE_SIZE}px`,
152
- width: `${HANDLE_SIZE}px`,
153
- },
154
- cursor: 'ew-resize',
155
- },
156
- {
157
- dir: 'ne',
158
- style: { top: '0', right: '0', width: `${HANDLE_SIZE * 2}px`, height: `${HANDLE_SIZE * 2}px` },
159
- cursor: 'nesw-resize',
160
- },
161
- {
162
- dir: 'nw',
163
- style: { top: '0', left: '0', width: `${HANDLE_SIZE * 2}px`, height: `${HANDLE_SIZE * 2}px` },
164
- cursor: 'nwse-resize',
165
- },
166
- {
167
- dir: 'se',
168
- style: {
169
- bottom: '0',
170
- right: '0',
171
- width: `${HANDLE_SIZE * 2}px`,
172
- height: `${HANDLE_SIZE * 2}px`,
173
- },
174
- cursor: 'nwse-resize',
175
- },
176
- {
177
- dir: 'sw',
178
- style: {
179
- bottom: '0',
180
- left: '0',
181
- width: `${HANDLE_SIZE * 2}px`,
182
- height: `${HANDLE_SIZE * 2}px`,
183
- },
184
- cursor: 'nesw-resize',
185
- },
186
- ];
187
- // =============================================================================
188
- // SVG Logo (inline template)
189
- // =============================================================================
190
- const syntroLogoSvg = html `<svg
191
- aria-hidden="true"
192
- width="28"
193
- height="18"
194
- viewBox="0 0 101 63"
195
- fill="none"
196
- xmlns="http://www.w3.org/2000/svg"
197
- >
198
- <g clip-path="url(#syntro-fab-clip)">
199
- <path
200
- d="M51.989 0.284C52.386 0.29 52.808 0.341 53.192 0.443C53.769 0.596 54.362 0.983 54.745 1.442C55.895 2.822 56.767 4.782 57.669 6.357C59.947 10.334 62.152 14.372 64.498 18.307C64.671 18.597 65.127 19.343 65.475 19.411C66.654 19.641 79.278 11.523 81.123 10.317C80.704 8.6 80.624 7.21 81.334 5.525C82.014 3.916 83.317 2.651 84.946 2.019C86.593 1.366 88.286 1.42 89.902 2.123C91.486 2.795 92.733 4.076 93.363 5.677C95.111 10.218 91.347 15.013 86.561 14.442C85.392 14.302 84.649 13.927 83.6 13.441C76.542 18.247 69.094 22.597 61.207 25.907C60.153 26.349 59.42 26.6 58.519 27.328C60.583 27.43 87.034 24.236 87.878 23.781C87.926 23.755 88.048 23.697 88.08 23.652C88.244 23.421 88.277 23.007 88.376 22.735C88.819 21.511 89.563 20.379 90.604 19.586C91.887 18.608 93.6 18.093 95.208 18.324C96.992 18.581 98.67 19.55 99.74 21.005C100.733 22.364 101.141 24.064 100.875 25.726C100.607 27.394 99.692 28.888 98.329 29.887C96.02 31.573 92.641 31.613 90.392 29.789C89.579 29.13 89.177 28.535 88.566 27.692C86.692 28.103 83.447 28.463 81.472 28.73C76.577 29.399 71.671 29.99 66.756 30.504C65.752 30.608 59.279 31.013 58.779 31.24L58.781 31.387C59.106 31.577 66.974 33.025 68.328 33.358C72.475 34.405 76.572 35.64 80.606 37.06C82.709 37.818 84.721 38.686 86.814 39.457C88.505 38.051 89.243 36.875 91.925 36.841C93.665 36.833 95.339 37.506 96.589 38.717C97.986 40.087 98.415 41.541 98.429 43.422C98.417 44.842 98.099 45.978 97.229 47.137C96.168 48.531 94.597 49.447 92.86 49.682C91.161 49.922 89.437 49.472 88.073 48.431C86.201 47.02 85.795 45.462 85.488 43.323C85.255 43.193 85.018 43.071 84.776 42.958C83.907 42.553 78.511 40.359 77.911 40.577C77.837 41.147 78.926 42.592 79.243 43.155L84.336 52.073C85.165 53.529 86.027 54.991 86.789 56.483C87.253 57.391 87.414 58.355 87.056 59.343C86.557 60.722 85.014 61.408 83.626 61.438C81.429 61.427 79.228 61.427 77.029 61.427L62.967 61.427L35.549 61.435C33.337 61.436 20.693 61.626 19.579 61.199C18.758 60.889 18.093 60.265 17.732 59.465C17.455 58.844 17.335 57.994 17.577 57.361C18.242 55.623 19.5 53.659 20.438 52.043L28.119 39.028C28.9 37.701 31.213 33.891 31.7 32.634C25.671 32.936 18.736 32.547 12.6 32.721C11.75 34.138 10.992 35.281 9.368 35.935C7.744 36.588 5.704 36.604 4.097 35.922C2.546 35.272 1.319 34.028 0.69 32.468C0.053 30.839 0.086 29.025 0.781 27.42C2.812 22.739 9.259 22.202 12.05 26.464C12.555 27.235 12.774 27.84 13.104 28.703L26.462 28.711C28.926 28.713 31.729 28.779 34.17 28.668C35.279 26.892 36.442 24.733 37.515 22.901L45.376 9.375C46.797 6.902 48.214 4.368 49.685 1.924C50.222 1.032 50.962 0.493 51.989 0.284ZM22.119 57.31C23.512 57.503 26.045 57.431 27.526 57.429L36.661 57.42L68.412 57.422C73.113 57.421 77.994 57.351 82.68 57.438L75.664 45.098C74.562 43.171 73.093 40.773 72.104 38.827C71.245 38.351 70.291 38.109 69.335 37.848C59.189 35.076 48.669 33.421 38.172 32.796C37.642 32.764 36.994 32.766 36.469 32.794L25.855 50.865C24.634 52.935 23.364 55.302 22.119 57.31ZM52.216 5.513C49.384 10.611 46.473 15.665 43.484 20.673C42.193 22.878 40.862 25.071 39.63 27.31C39.46 27.618 39.36 27.782 39.453 28.133C40.522 28.342 45.866 26.973 47.112 26.644C49.169 26.137 60.135 22.684 61.174 21.436C61.248 21.163 61.287 21.069 61.125 20.762C60.279 19.163 59.326 17.527 58.435 15.958L53.592 7.329C53.355 6.915 52.677 5.599 52.216 5.513ZM96.18 26.494C96.963 25.713 97.12 24.502 96.563 23.547C96.005 22.592 94.872 22.133 93.807 22.432C92.972 22.666 92.324 23.327 92.108 24.167C91.892 25.007 92.14 25.899 92.758 26.507C93.396 27.134 94.327 27.361 95.182 27.096C95.558 26.98 95.901 26.773 96.18 26.494ZM87.871 10.399C89.147 10.087 89.941 8.813 89.659 7.529C89.377 6.246 88.122 5.422 86.832 5.673C85.97 5.841 85.266 6.463 84.994 7.298C84.722 8.133 84.923 9.05 85.52 9.694C86.118 10.339 87.017 10.608 87.871 10.399ZM91.505 40.879C90.185 41.122 89.31 42.388 89.55 43.709C89.791 45.03 91.055 45.907 92.377 45.669C93.22 45.517 93.921 44.933 94.223 44.131C94.525 43.329 94.383 42.428 93.85 41.758C93.29 41.055 92.389 40.717 91.505 40.879ZM9.138 29.557C9.005 28.88 8.592 28.292 8.001 27.937C7.409 27.583 6.696 27.495 6.036 27.697C5.665 27.81 5.326 28.011 5.048 28.282C4.24 29.07 4.079 30.31 4.66 31.278C5.241 32.247 6.411 32.688 7.487 32.346C8.666 31.97 9.376 30.771 9.138 29.557Z"
201
- fill="currentColor"
202
- />
203
- </g>
204
- <defs>
205
- <clipPath id="syntro-fab-clip">
206
- <rect width="101" height="63" fill="white" />
207
- </clipPath>
208
- </defs>
209
- </svg>`;
210
- // =============================================================================
211
- // Component
212
- // =============================================================================
213
- export class EditorPanelShellLit extends LitElement {
214
- constructor() {
215
- super(...arguments);
216
- this.isOpen = false;
217
- this.zIndex = 2147483647;
218
- // Internal geometry state
219
- this._geometry = getDefaultGeometry();
220
- // DOM refs (set in render via query after update)
221
- this._panelEl = null;
222
- this._fabEl = null;
223
- // Drag state (imperative refs for performance -- no re-renders during drag)
224
- this._isDragging = false;
225
- this._hasMoved = false;
226
- this._dragOffset = { x: 0, y: 0 };
227
- this._startPanelPos = { x: 0, y: 0 };
228
- this._pendingGeo = null;
229
- // Resize state
230
- this._activeResize = null;
231
- this._resizeStartMouse = { x: 0, y: 0 };
232
- this._resizeStartGeo = getDefaultGeometry();
233
- this._handleWindowResize = () => {
234
- this._updateGeometry(clampToViewport(this._geometry));
235
- };
236
- }
237
- // No _bound* wrapper needed — method is an arrow class field
238
- get _storageKey() {
239
- return this.panelId ? `syntro:editor-panel:${this.panelId}` : STORAGE_KEY;
240
- }
241
- createRenderRoot() {
242
- return this;
243
- }
244
- connectedCallback() {
245
- super.connectedCallback();
246
- this._geometry = loadGeometry(this._storageKey);
247
- window.addEventListener('resize', this._handleWindowResize);
248
- }
249
- disconnectedCallback() {
250
- super.disconnectedCallback();
251
- window.removeEventListener('resize', this._handleWindowResize);
252
- }
253
- updated() {
254
- // Cache DOM refs after each render
255
- this._panelEl = this.querySelector('[data-syntro-editor-panel]');
256
- this._fabEl = this.querySelector('[data-syntro-fab]');
257
- }
258
- // ---- HELPERS ----
259
- _updateGeometry(geo) {
260
- this._geometry = geo;
261
- saveGeometry(this._storageKey, geo);
262
- this.requestUpdate();
263
- }
264
- _emitToggle() {
265
- this.dispatchEvent(new CustomEvent('toggle', {
266
- bubbles: true,
267
- composed: true,
268
- }));
269
- }
270
- // ---- FAB DRAG HANDLERS ----
271
- _handleFabPointerDown(e) {
272
- this._isDragging = true;
273
- this._hasMoved = false;
274
- const rect = getPanelRect(this._geometry);
275
- this._startPanelPos = { x: rect.left, y: rect.top };
276
- this._dragOffset = {
277
- x: e.clientX - rect.left,
278
- y: e.clientY - rect.top,
279
- };
280
- e.target.setPointerCapture(e.pointerId);
281
- e.preventDefault();
282
- }
283
- _handleFabPointerMove(e) {
284
- if (!this._isDragging)
285
- return;
286
- const newX = e.clientX - this._dragOffset.x;
287
- const newY = e.clientY - this._dragOffset.y;
288
- if (!this._hasMoved) {
289
- const dx = Math.abs(newX - this._startPanelPos.x);
290
- const dy = Math.abs(newY - this._startPanelPos.y);
291
- if (dx < DRAG_THRESHOLD && dy < DRAG_THRESHOLD)
292
- return;
293
- this._hasMoved = true;
294
- }
295
- const geo = this._geometry;
296
- const height = geo.docked ? window.innerHeight : geo.height;
297
- // Update panel DOM directly for performance (bypass Lit re-render)
298
- if (this._panelEl) {
299
- this._panelEl.style.left = `${newX}px`;
300
- this._panelEl.style.top = `${newY}px`;
301
- this._panelEl.style.right = 'auto';
302
- this._panelEl.style.height = `${height}px`;
303
- }
304
- if (this._fabEl) {
305
- this._fabEl.style.left = `${newX + FAB_INSET}px`;
306
- this._fabEl.style.top = `${newY + FAB_INSET}px`;
307
- }
308
- this._pendingGeo = { x: newX, y: newY, width: geo.width, height, docked: null };
309
- }
310
- _handleFabPointerUp(e) {
311
- e.target.releasePointerCapture(e.pointerId);
312
- const wasDragging = this._hasMoved;
313
- this._isDragging = false;
314
- this._hasMoved = false;
315
- if (!wasDragging) {
316
- this._emitToggle();
317
- return;
318
- }
319
- if (this._pendingGeo) {
320
- const geo = this._pendingGeo;
321
- // Edge snapping
322
- if (geo.x <= SNAP_THRESHOLD) {
323
- this._updateGeometry({ ...geo, docked: 'left', x: 0, y: 0 });
324
- }
325
- else if (geo.x + geo.width >= window.innerWidth - SNAP_THRESHOLD) {
326
- this._updateGeometry({ ...geo, docked: 'right', x: 0, y: 0 });
327
- }
328
- else {
329
- this._updateGeometry(geo);
330
- }
331
- this._pendingGeo = null;
332
- }
333
- }
334
- // ---- RESIZE HANDLERS ----
335
- _handleResizePointerDown(e) {
336
- const dir = e.currentTarget.dataset.resizeDir;
337
- if (!dir)
338
- return;
339
- let geo = this._geometry;
340
- // Undock if currently docked
341
- if (geo.docked) {
342
- geo = undockGeometry(geo);
343
- this._updateGeometry(geo);
344
- }
345
- this._activeResize = dir;
346
- this._resizeStartMouse = { x: e.clientX, y: e.clientY };
347
- this._resizeStartGeo = { ...geo };
348
- e.target.setPointerCapture(e.pointerId);
349
- e.preventDefault();
350
- }
351
- _handleResizePointerMove(e) {
352
- if (!this._activeResize)
353
- return;
354
- const dx = e.clientX - this._resizeStartMouse.x;
355
- const dy = e.clientY - this._resizeStartMouse.y;
356
- const dir = this._activeResize;
357
- const start = this._resizeStartGeo;
358
- let { x, y, width, height } = start;
359
- if (dir.includes('e'))
360
- width = Math.max(MIN_WIDTH, start.width + dx);
361
- if (dir.includes('w')) {
362
- const newW = Math.max(MIN_WIDTH, start.width - dx);
363
- x = start.x + start.width - newW;
364
- width = newW;
365
- }
366
- if (dir.includes('s'))
367
- height = Math.max(MIN_HEIGHT, start.height + dy);
368
- if (dir.includes('n')) {
369
- const newH = Math.max(MIN_HEIGHT, start.height - dy);
370
- y = start.y + start.height - newH;
371
- height = newH;
372
- }
373
- // Update DOM directly for performance
374
- if (this._panelEl) {
375
- this._panelEl.style.left = `${x}px`;
376
- this._panelEl.style.top = `${y}px`;
377
- this._panelEl.style.width = `${width}px`;
378
- this._panelEl.style.height = `${height}px`;
379
- }
380
- if (this._fabEl) {
381
- this._fabEl.style.left = `${x + FAB_INSET}px`;
382
- this._fabEl.style.top = `${y + FAB_INSET}px`;
383
- }
384
- this._pendingGeo = { x, y, width, height, docked: null };
385
- }
386
- _handleResizePointerUp(e) {
387
- e.target.releasePointerCapture(e.pointerId);
388
- this._activeResize = null;
389
- if (this._pendingGeo) {
390
- this._updateGeometry(this._pendingGeo);
391
- this._pendingGeo = null;
392
- }
393
- }
394
- // ---- COMPUTED STYLES ----
395
- _getPanelClasses() {
396
- const geo = this._geometry;
397
- const isDocked = geo.docked !== null;
398
- const base = 'syntro-editor-scope se-fixed se-flex se-flex-col se-text-text-primary se-backdrop-blur-xl se-font-sans se-antialiased se-overflow-hidden';
399
- if (isDocked) {
400
- return geo.docked === 'right'
401
- ? `${base} se-border-l se-border-border-primary`
402
- : `${base} se-border-r se-border-border-primary`;
403
- }
404
- return `${base} se-rounded-lg se-border se-border-border-primary`;
405
- }
406
- _getPanelStyles() {
407
- const geo = this._geometry;
408
- const isDocked = geo.docked !== null;
409
- const styles = {
410
- position: 'fixed',
411
- zIndex: String(this.zIndex),
412
- // Re-enable pointer events — parent editor container uses pointer-events:none
413
- // so clicks pass through to elements beneath (e.g., the launcher FAB).
414
- pointerEvents: 'auto',
415
- background: panelShell.background,
416
- backdropFilter: `blur(${panelShell.backdropBlur})`,
417
- webkitBackdropFilter: `blur(${panelShell.backdropBlur})`,
418
- boxShadow: isDocked
419
- ? geo.docked === 'right'
420
- ? panelShell.shadows.dockedRight
421
- : panelShell.shadows.dockedLeft
422
- : panelShell.shadows.floating,
423
- overflowY: 'auto',
424
- overscrollBehavior: 'contain',
425
- };
426
- if (geo.docked === 'left') {
427
- styles.top = '0';
428
- styles.left = '0';
429
- styles.width = `${geo.width}px`;
430
- styles.height = '100vh';
431
- }
432
- else if (geo.docked === 'right') {
433
- styles.top = '0';
434
- styles.right = '0';
435
- styles.width = `${geo.width}px`;
436
- styles.height = '100vh';
437
- }
438
- else {
439
- styles.top = `${geo.y}px`;
440
- styles.left = `${geo.x}px`;
441
- styles.width = `${geo.width}px`;
442
- styles.height = `${geo.height}px`;
443
- }
444
- return styles;
445
- }
446
- _getFabStyles() {
447
- const fabPos = getFabPosition(this._geometry);
448
- return {
449
- position: 'fixed',
450
- left: `${fabPos.left}px`,
451
- top: `${fabPos.top}px`,
452
- zIndex: String(this.zIndex),
453
- // Re-enable pointer events — parent editor container uses pointer-events:none
454
- pointerEvents: 'auto',
455
- width: `${FAB_SIZE}px`,
456
- height: `${FAB_SIZE}px`,
457
- borderRadius: '50%',
458
- border: panelShell.fab.border,
459
- cursor: 'grab',
460
- display: 'flex',
461
- alignItems: 'center',
462
- justifyContent: 'center',
463
- background: panelShell.fab.background,
464
- color: panelShell.fab.color,
465
- boxShadow: this.isOpen ? panelShell.fab.shadowOpen : panelShell.fab.shadowClosed,
466
- transition: 'box-shadow 150ms ease',
467
- touchAction: 'none',
468
- userSelect: 'none',
469
- webkitUserSelect: 'none',
470
- };
471
- }
472
- // ---- RENDER ----
473
- render() {
474
- return html `
475
- ${this.isOpen
476
- ? html `<div
477
- data-syntro-editor-panel
478
- data-syntro-editor-ui="panel"
479
- class=${this._getPanelClasses()}
480
- style=${styleMap(this._getPanelStyles())}
481
- ${this.panelId ? html `` : nothing}
482
- id=${this.panelId ?? nothing}
483
- >
484
- ${RESIZE_HANDLES.map((h) => html `<div
485
- data-syntro-editor-ui="resize-${h.dir}"
486
- data-resize-dir=${h.dir}
487
- @pointerdown=${this._handleResizePointerDown}
488
- @pointermove=${this._handleResizePointerMove}
489
- @pointerup=${this._handleResizePointerUp}
490
- style=${styleMap({
491
- position: 'absolute',
492
- ...h.style,
493
- cursor: h.cursor,
494
- zIndex: '1',
495
- touchAction: 'none',
496
- })}
497
- ></div>`)}
498
- <slot></slot>
499
- </div>`
500
- : nothing}
501
-
502
- <div
503
- class="syntro-editor-scope"
504
- data-syntro-editor-ui="fab-wrapper"
505
- style="display: contents"
506
- >
507
- <button
508
- type="button"
509
- data-syntro-fab
510
- data-syntro-editor-ui="fab"
511
- @pointerdown=${this._handleFabPointerDown}
512
- @pointermove=${this._handleFabPointerMove}
513
- @pointerup=${this._handleFabPointerUp}
514
- style=${styleMap(this._getFabStyles())}
515
- title=${this.isOpen ? 'Minimize panel' : 'Open panel'}
516
- >
517
- ${syntroLogoSvg}
518
- </button>
519
- </div>
520
- `;
521
- }
522
- }
523
- EditorPanelShellLit.properties = {
524
- isOpen: { type: Boolean, attribute: 'is-open' },
525
- panelId: { type: String, attribute: 'panel-id' },
526
- zIndex: { type: Number, attribute: 'z-index' },
527
- };
528
- customElements.define('se-editor-panel-shell', EditorPanelShellLit);
@@ -1,8 +0,0 @@
1
- import type React from 'react';
2
- interface EditorSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
3
- label?: string;
4
- className?: string;
5
- }
6
- export declare function EditorSelect({ label, className, children, id, ...props }: EditorSelectProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=EditorSelect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorSelect.d.ts","sourceRoot":"","sources":["../../src/components/EditorSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CA2B3F"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from 'react';
3
- import { cn } from '../cn';
4
- export function EditorSelect({ label, className, children, id, ...props }) {
5
- const generatedId = useId();
6
- const selectId = id || generatedId;
7
- return (_jsxs("div", { children: [label && (_jsx("label", { htmlFor: selectId, className: "se-text-sm se-font-medium se-text-input-field-text-label se-mb-1 se-block", children: label })), _jsx("select", { id: selectId, ...props, className: cn('se-w-full se-py-2 se-px-3 se-rounded-lg se-border se-border-input-field-border se-bg-slate-grey-3 se-text-text-primary se-text-sm se-mb-2', 'focus:se-border-input-field-border-selected focus:se-outline-none focus:se-shadow-focus-primary', 'disabled:se-bg-input-field-bg-disabled disabled:se-cursor-not-allowed disabled:se-opacity-50', className), children: children })] }));
8
- }
@@ -1,41 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class EditorSelectLit extends LitElement {
3
- static properties: {
4
- label: {
5
- type: StringConstructor;
6
- };
7
- selectClass: {
8
- type: StringConstructor;
9
- attribute: string;
10
- };
11
- selectId: {
12
- type: StringConstructor;
13
- attribute: string;
14
- };
15
- name: {
16
- type: StringConstructor;
17
- };
18
- value: {
19
- type: StringConstructor;
20
- };
21
- disabled: {
22
- type: BooleanConstructor;
23
- };
24
- required: {
25
- type: BooleanConstructor;
26
- };
27
- };
28
- label: string | undefined;
29
- selectClass: string | undefined;
30
- selectId: string | undefined;
31
- name: string | undefined;
32
- value: string | undefined;
33
- disabled: boolean;
34
- required: boolean;
35
- private _generatedId;
36
- constructor();
37
- createRenderRoot(): this;
38
- private _handleChange;
39
- render(): import("lit-html").TemplateResult<1>;
40
- }
41
- //# sourceMappingURL=EditorSelectLit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorSelectLit.d.ts","sourceRoot":"","sources":["../../src/components/EditorSelectLit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAIvC,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,OAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;MAQxB;IAEF,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,UAAS;IACjB,QAAQ,UAAS;IAEjB,OAAO,CAAC,YAAY,CAAS;;IAOpB,gBAAgB;IAIzB,OAAO,CAAC,aAAa;IAYZ,MAAM;CAkChB"}
@@ -1,63 +0,0 @@
1
- import { html, LitElement } from 'lit';
2
- let _selectIdCounter = 0;
3
- export class EditorSelectLit extends LitElement {
4
- constructor() {
5
- super();
6
- this.disabled = false;
7
- this.required = false;
8
- this._generatedId = `se-select-${++_selectIdCounter}`;
9
- }
10
- createRenderRoot() {
11
- return this;
12
- }
13
- _handleChange(e) {
14
- const target = e.target;
15
- this.value = target.value;
16
- this.dispatchEvent(new CustomEvent('change', {
17
- detail: { value: target.value },
18
- bubbles: true,
19
- composed: true,
20
- }));
21
- }
22
- render() {
23
- const id = this.selectId || this._generatedId;
24
- const classes = [
25
- 'se-w-full se-py-2 se-px-3 se-rounded-lg se-border se-border-input-field-border se-bg-slate-grey-3 se-text-text-primary se-text-sm se-mb-2',
26
- 'focus:se-border-input-field-border-selected focus:se-outline-none focus:se-shadow-focus-primary',
27
- 'disabled:se-bg-input-field-bg-disabled disabled:se-cursor-not-allowed disabled:se-opacity-50',
28
- this.selectClass || '',
29
- ]
30
- .filter(Boolean)
31
- .join(' ');
32
- return html `
33
- <div>
34
- ${this.label
35
- ? html `<label
36
- for=${id}
37
- class="se-text-sm se-font-medium se-text-input-field-text-label se-mb-1 se-block"
38
- >${this.label}</label>`
39
- : ''}
40
- <select
41
- id=${id}
42
- class=${classes}
43
- name=${this.name ?? ''}
44
- ?disabled=${this.disabled}
45
- ?required=${this.required}
46
- @change=${this._handleChange}
47
- >
48
- <slot></slot>
49
- </select>
50
- </div>
51
- `;
52
- }
53
- }
54
- EditorSelectLit.properties = {
55
- label: { type: String },
56
- selectClass: { type: String, attribute: 'select-class' },
57
- selectId: { type: String, attribute: 'select-id' },
58
- name: { type: String },
59
- value: { type: String },
60
- disabled: { type: Boolean },
61
- required: { type: Boolean },
62
- };
63
- customElements.define('se-editor-select', EditorSelectLit);
@@ -1,8 +0,0 @@
1
- import type React from 'react';
2
- interface EditorTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
- label?: string;
4
- className?: string;
5
- }
6
- export declare function EditorTextarea({ label, className, value, id, ...props }: EditorTextareaProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=EditorTextarea.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorTextarea.d.ts","sourceRoot":"","sources":["../../src/components/EditorTextarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAsC5F"}