@signalsafe/content-editor-react 0.0.0-stage → 0.1.1

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 (196) hide show
  1. package/README.md +105 -2
  2. package/dist/BootstrapBlockRenderer.d.ts +10 -0
  3. package/dist/BootstrapBlockRenderer.js +256 -0
  4. package/dist/BootstrapInlineCanvasEditor.d.ts +11 -0
  5. package/dist/BootstrapInlineCanvasEditor.js +38 -0
  6. package/dist/BootstrapInlineText.d.ts +9 -0
  7. package/dist/BootstrapInlineText.js +121 -0
  8. package/dist/BootstrapNavigationBlocks.d.ts +13 -0
  9. package/dist/BootstrapNavigationBlocks.js +33 -0
  10. package/dist/BootstrapProgressGroup.d.ts +11 -0
  11. package/dist/BootstrapProgressGroup.js +13 -0
  12. package/dist/BootstrapProperties.d.ts +15 -0
  13. package/dist/BootstrapProperties.js +217 -0
  14. package/dist/CanvasTheme.d.ts +25 -0
  15. package/dist/CanvasTheme.js +34 -0
  16. package/dist/CollectionRowActions.d.ts +19 -0
  17. package/dist/CollectionRowActions.js +9 -0
  18. package/dist/ColorModeSelect.d.ts +9 -0
  19. package/dist/ColorModeSelect.js +28 -0
  20. package/dist/ColumnContent.d.ts +6 -0
  21. package/dist/ColumnContent.js +6 -0
  22. package/dist/ComponentPicker.d.ts +10 -0
  23. package/dist/ComponentPicker.js +22 -0
  24. package/dist/ComponentPickerIcon.d.ts +3 -0
  25. package/dist/ComponentPickerIcon.js +52 -0
  26. package/dist/ContentEditor.d.ts +16 -0
  27. package/dist/ContentEditor.js +73 -0
  28. package/dist/ContentImage.d.ts +16 -0
  29. package/dist/ContentImage.js +45 -0
  30. package/dist/ContentInteractionProvider.d.ts +21 -0
  31. package/dist/ContentInteractionProvider.js +102 -0
  32. package/dist/ContentKeyboardHelp.d.ts +4 -0
  33. package/dist/ContentKeyboardHelp.js +8 -0
  34. package/dist/ContentOutline.d.ts +20 -0
  35. package/dist/ContentOutline.js +71 -0
  36. package/dist/ContentRuntime.d.ts +28 -0
  37. package/dist/ContentRuntime.js +13 -0
  38. package/dist/EditorActionIcon.d.ts +18 -0
  39. package/dist/EditorActionIcon.js +32 -0
  40. package/dist/EditorCanvasScroll.d.ts +6 -0
  41. package/dist/EditorCanvasScroll.js +82 -0
  42. package/dist/EditorCanvasSettings.d.ts +5 -0
  43. package/dist/EditorCanvasSettings.js +21 -0
  44. package/dist/EditorCanvasToolbar.d.ts +16 -0
  45. package/dist/EditorCanvasToolbar.js +22 -0
  46. package/dist/EditorCollectionAdd.d.ts +6 -0
  47. package/dist/EditorCollectionAdd.js +6 -0
  48. package/dist/EditorCollectionRow.d.ts +18 -0
  49. package/dist/EditorCollectionRow.js +6 -0
  50. package/dist/EditorCommandBar.d.ts +7 -0
  51. package/dist/EditorCommandBar.js +9 -0
  52. package/dist/EditorContainerFields.d.ts +17 -0
  53. package/dist/EditorContainerFields.js +27 -0
  54. package/dist/EditorHistoryControls.d.ts +8 -0
  55. package/dist/EditorHistoryControls.js +6 -0
  56. package/dist/EditorIssuesPanel.d.ts +5 -0
  57. package/dist/EditorIssuesPanel.js +6 -0
  58. package/dist/EditorLayoutMenu.d.ts +23 -0
  59. package/dist/EditorLayoutMenu.js +13 -0
  60. package/dist/EditorMenuChoice.d.ts +8 -0
  61. package/dist/EditorMenuChoice.js +6 -0
  62. package/dist/EditorPanel.d.ts +10 -0
  63. package/dist/EditorPanel.js +12 -0
  64. package/dist/EditorPreviewToggle.d.ts +6 -0
  65. package/dist/EditorPreviewToggle.js +6 -0
  66. package/dist/EditorSidebarLayout.d.ts +8 -0
  67. package/dist/EditorSidebarLayout.js +29 -0
  68. package/dist/EditorStatusBar.d.ts +5 -0
  69. package/dist/EditorStatusBar.js +8 -0
  70. package/dist/EditorStatusBarContext.d.ts +2 -0
  71. package/dist/EditorStatusBarContext.js +3 -0
  72. package/dist/EditorSubmenu.d.ts +18 -0
  73. package/dist/EditorSubmenu.js +74 -0
  74. package/dist/EditorTabs.d.ts +9 -0
  75. package/dist/EditorTabs.js +28 -0
  76. package/dist/EditorTemplateMenu.d.ts +12 -0
  77. package/dist/EditorTemplateMenu.js +7 -0
  78. package/dist/EditorViewportSelect.d.ts +30 -0
  79. package/dist/EditorViewportSelect.js +17 -0
  80. package/dist/EditorWorkflowActions.d.ts +12 -0
  81. package/dist/EditorWorkflowActions.js +6 -0
  82. package/dist/EmptyContent.d.ts +6 -0
  83. package/dist/EmptyContent.js +18 -0
  84. package/dist/InlineCanvasEditor.d.ts +7 -0
  85. package/dist/InlineCanvasEditor.js +12 -0
  86. package/dist/InteractiveBootstrapBlocks.d.ts +17 -0
  87. package/dist/InteractiveBootstrapBlocks.js +434 -0
  88. package/dist/JsonEditor.css +163 -0
  89. package/dist/JsonTextEditor.d.ts +11 -0
  90. package/dist/JsonTextEditor.js +70 -0
  91. package/dist/JsonViewer.d.ts +15 -0
  92. package/dist/JsonViewer.js +109 -0
  93. package/dist/LayoutPresets.d.ts +8 -0
  94. package/dist/LayoutPresets.js +66 -0
  95. package/dist/LayoutPropertyFields.d.ts +8 -0
  96. package/dist/LayoutPropertyFields.js +43 -0
  97. package/dist/MarkdownEditor.d.ts +13 -0
  98. package/dist/MarkdownEditor.js +82 -0
  99. package/dist/PracticeInputBlock.d.ts +12 -0
  100. package/dist/PracticeInputBlock.js +21 -0
  101. package/dist/ReadableButton.d.ts +5 -0
  102. package/dist/ReadableButton.js +20 -0
  103. package/dist/ReadableDropdownSurface.d.ts +6 -0
  104. package/dist/ReadableDropdownSurface.js +16 -0
  105. package/dist/ReadableDropdownToggle.d.ts +2 -0
  106. package/dist/ReadableDropdownToggle.js +14 -0
  107. package/dist/ReadableFormSelect.d.ts +3 -0
  108. package/dist/ReadableFormSelect.js +10 -0
  109. package/dist/ReorderHandle.d.ts +15 -0
  110. package/dist/ReorderHandle.js +31 -0
  111. package/dist/ReorderTarget.d.ts +10 -0
  112. package/dist/ReorderTarget.js +7 -0
  113. package/dist/SpacingEditor.d.ts +9 -0
  114. package/dist/SpacingEditor.js +53 -0
  115. package/dist/authoringActions.d.ts +18 -0
  116. package/dist/authoringActions.js +172 -0
  117. package/dist/authoringText.d.ts +4 -0
  118. package/dist/authoringText.js +45 -0
  119. package/dist/authoringUuid.d.ts +2 -0
  120. package/dist/authoringUuid.js +11 -0
  121. package/dist/bootstrapFamilies.d.ts +10 -0
  122. package/dist/bootstrapFamilies.js +151 -0
  123. package/dist/bootstrapGridImport.d.ts +8 -0
  124. package/dist/bootstrapGridImport.js +122 -0
  125. package/dist/bootstrapGridMigration.d.ts +3 -0
  126. package/dist/bootstrapGridMigration.js +27 -0
  127. package/dist/bootstrapRegistry.d.ts +69 -0
  128. package/dist/bootstrapRegistry.js +966 -0
  129. package/dist/canvasPreferences.d.ts +27 -0
  130. package/dist/canvasPreferences.js +28 -0
  131. package/dist/collectionNavigation.d.ts +20 -0
  132. package/dist/collectionNavigation.js +38 -0
  133. package/dist/componentPickerFamilies.d.ts +5 -0
  134. package/dist/componentPickerFamilies.js +40 -0
  135. package/dist/componentPolicy.d.ts +31 -0
  136. package/dist/componentPolicy.js +25 -0
  137. package/dist/componentValidation.d.ts +23707 -0
  138. package/dist/componentValidation.js +7 -0
  139. package/dist/content-editor.css +584 -0
  140. package/dist/content-layout.css +597 -0
  141. package/dist/contentContainment.d.ts +4 -0
  142. package/dist/contentContainment.js +117 -0
  143. package/dist/contentCssPath.d.ts +5 -0
  144. package/dist/contentCssPath.js +63 -0
  145. package/dist/contentEditingCommands.d.ts +35 -0
  146. package/dist/contentEditingCommands.js +69 -0
  147. package/dist/contentInsertion.d.ts +3 -0
  148. package/dist/contentInsertion.js +16 -0
  149. package/dist/contentModel.d.ts +3 -0
  150. package/dist/contentModel.js +1 -0
  151. package/dist/contentTreeValidation.d.ts +8 -0
  152. package/dist/contentTreeValidation.js +211 -0
  153. package/dist/contracts/semantics.gen.d.ts +2 -0
  154. package/dist/contracts/semantics.gen.js +3 -0
  155. package/dist/contracts/types.gen.d.ts +3741 -0
  156. package/dist/contracts/types.gen.js +1 -0
  157. package/dist/contracts/zod.gen.d.ts +62365 -0
  158. package/dist/contracts/zod.gen.js +3036 -0
  159. package/dist/controlBackgroundIconContrast.d.ts +3 -0
  160. package/dist/controlBackgroundIconContrast.js +60 -0
  161. package/dist/dropdownContrast.d.ts +5 -0
  162. package/dist/dropdownContrast.js +34 -0
  163. package/dist/editor-ui-colors.css +40 -0
  164. package/dist/editorThemes.d.ts +10 -0
  165. package/dist/editorThemes.js +12 -0
  166. package/dist/inlineMarkup.d.ts +6 -0
  167. package/dist/inlineMarkup.js +171 -0
  168. package/dist/layout.d.ts +17 -0
  169. package/dist/layout.js +37 -0
  170. package/dist/nestedComponentLabel.d.ts +2 -0
  171. package/dist/nestedComponentLabel.js +17 -0
  172. package/dist/responsiveLayout.d.ts +51 -0
  173. package/dist/responsiveLayout.js +97 -0
  174. package/dist/slideAppearance.d.ts +25 -0
  175. package/dist/slideAppearance.js +283 -0
  176. package/dist/source-manifest.json +105 -0
  177. package/dist/spacingShorthand.d.ts +12 -0
  178. package/dist/spacingShorthand.js +47 -0
  179. package/dist/themes/canvas-themes.css +131 -0
  180. package/dist/useCanvasSelectionScroll.d.ts +3 -0
  181. package/dist/useCanvasSelectionScroll.js +51 -0
  182. package/dist/useContentHistory.d.ts +40 -0
  183. package/dist/useContentHistory.js +42 -0
  184. package/dist/useContentReorderTarget.d.ts +6 -0
  185. package/dist/useContentReorderTarget.js +44 -0
  186. package/dist/useContentSelection.d.ts +10 -0
  187. package/dist/useContentSelection.js +23 -0
  188. package/dist/useDropdownContrast.d.ts +16 -0
  189. package/dist/useDropdownContrast.js +145 -0
  190. package/dist/useEditorControlContrast.d.ts +3 -0
  191. package/dist/useEditorControlContrast.js +188 -0
  192. package/dist/useSiteThemeStyles.d.ts +3 -0
  193. package/dist/useSiteThemeStyles.js +30 -0
  194. package/dist/useValidationFocus.d.ts +5 -0
  195. package/dist/useValidationFocus.js +17 -0
  196. package/package.json +74 -5
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ import { zBootstrapBlock, zInteractionBlock, zSlideImage, zSlideRow, zSlideColumn, zSlideHeading, zSlideParagraph } from './contracts/zod.gen.js';
3
+ /** Canonical component validation; embedding domains still validate their complete documents. */
4
+ export const contentBlockSchema = z.discriminatedUnion('type', [...zBootstrapBlock.options, ...zInteractionBlock.options, zSlideImage, zSlideRow, zSlideColumn, zSlideHeading, zSlideParagraph]);
5
+ export function componentPropertyAccepted(block, name, value) {
6
+ return contentBlockSchema.safeParse({ ...block, props: { ...block.props, [name]: value } }).success;
7
+ }
@@ -0,0 +1,584 @@
1
+ @import './themes/canvas-themes.css';
2
+ @import './content-layout.css';
3
+ @import './editor-ui-colors.css';
4
+ .content-text-editor {
5
+ border: 1px solid var(--bs-border-color);
6
+ border-radius: var(--bs-border-radius);
7
+ color: var(--bs-body-color);
8
+ background: var(--bs-body-bg);
9
+ }
10
+
11
+ .content-text-content {
12
+ min-height: 5rem;
13
+ padding: 0.75rem;
14
+ overflow-wrap: anywhere;
15
+ }
16
+
17
+ .content-text-editor [role='toolbar'] {
18
+ flex-wrap: wrap;
19
+ }
20
+
21
+ .content-text-toolbar > div {
22
+ min-width: 0;
23
+ max-width: 100%;
24
+ }
25
+
26
+ .content-text-toolbar button[role='combobox'] {
27
+ min-width: 0;
28
+ max-width: 100%;
29
+ }
30
+
31
+ .content-text-toolbar button[role='combobox'] > span {
32
+ min-width: 0;
33
+ overflow: hidden;
34
+ text-overflow: ellipsis;
35
+ }
36
+
37
+ .content-inline-editor {
38
+ position: relative;
39
+ z-index: 2;
40
+ min-width: 0;
41
+ }
42
+ .content-inline-editor .content-text-field {
43
+ margin-bottom: 0 !important;
44
+ }
45
+ /* Inline editing inherits the authored surface instead of adding a second card. */
46
+ .content-inline-editor .content-text-editor {
47
+ border: 0;
48
+ border-radius: 0;
49
+ background: transparent;
50
+ color: inherit;
51
+ font-family: inherit;
52
+ }
53
+ .content-inline-editor .content-text-content {
54
+ min-height: 1.5em;
55
+ padding: 0;
56
+ color: inherit;
57
+ font-family: inherit;
58
+ font-size: inherit;
59
+ line-height: inherit;
60
+ }
61
+ .content-inline-editor .content-text-content:focus {
62
+ outline: none;
63
+ }
64
+ .content-inline-editor .content-text-toolbar {
65
+ gap: 0.125rem;
66
+ padding: 0.25rem;
67
+ margin-bottom: 0.375rem;
68
+ min-height: 0;
69
+ background: var(--bs-body-bg);
70
+ color: var(--editor-ui-text);
71
+ border: 1px solid var(--editor-ui-border);
72
+ border-radius: var(--bs-border-radius-sm);
73
+ }
74
+ .content-inline-editor .content-text-toolbar button[data-state='on'] {
75
+ background: var(--bs-primary-bg-subtle);
76
+ color: var(--bs-primary-text-emphasis);
77
+ }
78
+ .content-inline-editor .content-text-toolbar button:focus-visible {
79
+ outline: 2px solid var(--editor-ui-text);
80
+ outline-offset: 2px;
81
+ }
82
+ .content-inline-editor[data-block-type='Heading']
83
+ .content-text-content
84
+ :is(p, h1, h2, h3, h4, h5, h6) {
85
+ font-size: var(--content-inline-heading-size, 2rem);
86
+ font-weight: 500;
87
+ line-height: 1.2;
88
+ margin-top: 0;
89
+ margin-bottom: 0.5rem;
90
+ }
91
+ .content-inline-editor[data-heading-level='1'] {
92
+ --content-inline-heading-size: 2.5rem;
93
+ }
94
+ .content-inline-editor[data-heading-level='3'] {
95
+ --content-inline-heading-size: 1.75rem;
96
+ }
97
+ .content-inline-editor[data-heading-level='4'] {
98
+ --content-inline-heading-size: 1.5rem;
99
+ }
100
+ .content-inline-editor[data-heading-level='5'] {
101
+ --content-inline-heading-size: 1.25rem;
102
+ }
103
+ .content-inline-editor[data-heading-level='6'] {
104
+ --content-inline-heading-size: 1rem;
105
+ }
106
+
107
+ /* Guides follow authored surfaces; layout wrappers and dedicated insertion slots have one owner. */
108
+ .content-authoring-canvas[data-editing='true'] :is([data-block-id], [data-content-edit-guide]):where(:not([data-content-edit-guide-root])) {
109
+ outline: 1px dashed var(--bs-secondary-color, #6c757d);
110
+ outline-offset: 0;
111
+ }
112
+ .content-authoring-canvas[data-editing='true'] [data-block-id]:where(:not([data-content-edit-guide])):is(:has([data-block-id]), :has(.content-empty-component), :has(> .content-empty-text)) {
113
+ outline: none;
114
+ }
115
+ .content-authoring-canvas[data-editing='true'] [data-block-id]:where(:not([data-content-edit-guide-root])):where(:not(:has(.content-empty-component), :has(> .content-empty-text))):hover:not(:has([data-block-id]:hover)):not([data-selected='true']):where(:not(:focus-visible, :has(:focus-visible))) {
116
+ outline: 1px dashed var(--bs-secondary-color, #6c757d);
117
+ outline-offset: 0;
118
+ }
119
+ .content-authoring-canvas[data-editing='true'] :is([data-block-id], [data-content-edit-guide]):where(:not([data-content-edit-guide-root])):focus-visible,
120
+ .content-authoring-canvas[data-editing='true'] [data-content-edit-guide]:has(:focus-visible),
121
+ .content-authoring-canvas[data-editing='true'] :where(.btn-check):focus-visible + [data-block-id],
122
+ .content-authoring-canvas[data-editing='true'] [data-content-edit-guide-root]:focus-visible > [data-content-edit-guide] {
123
+ outline: 2px solid var(--bs-body-color);
124
+ outline-offset: 0;
125
+ }
126
+ .content-authoring-canvas[data-editing='true'] [data-block-id][data-selected='true']:where(:not([data-content-edit-guide-root])),
127
+ .content-authoring-canvas[data-editing='true'] [data-content-edit-guide-root][data-selected='true'] > [data-content-edit-guide] {
128
+ outline: 2px solid var(--bs-primary);
129
+ outline-offset: 0;
130
+ }
131
+ /* A multi-progress track has one guide; its segments retain individual selection and focus. */
132
+ .content-authoring-canvas[data-editing='true'] .progress[data-content-edit-guide] > .progress-bar[data-block-id]:not([data-selected='true']):not(:focus-visible) {
133
+ outline: none;
134
+ }
135
+ /* Loading widgets stay visible and their guides stay still while authoring. */
136
+ .content-authoring-canvas[data-editing='true'] [data-content-edit-static]:is([data-block-id], [data-content-edit-guide]) {
137
+ animation: none;
138
+ }
139
+ .content-authoring-canvas[data-editing='true'] .spinner-grow[data-content-edit-static] {
140
+ opacity: 1;
141
+ }
142
+ /* Native Preview clipping must not trim authoring title/caption guides. */
143
+ .content-authoring-canvas[data-editing='true'] .carousel-inner { overflow: visible; }
144
+ /* Every carousel item is editable; native slide floats must not stack their guides on one another. */
145
+ .content-authoring-canvas[data-editing='true'] .carousel .carousel-item[data-block-id] {
146
+ float: none;
147
+ margin-inline-end: 0;
148
+ animation: none;
149
+ }
150
+ .content-empty-text, .content-empty-component {
151
+ display: block;
152
+ min-height: 2.5rem;
153
+ padding: .5rem;
154
+ border: 1px dashed var(--bs-secondary-color, #6c757d);
155
+ border-radius: var(--bs-border-radius, .375rem);
156
+ color: var(--bs-secondary-color, #6c757d);
157
+ cursor: text;
158
+ }
159
+ .content-empty-component { width: 100%; font: inherit; font-size: 1rem; text-align: center; background: transparent; cursor: pointer; }
160
+
161
+ .content-outline .content-outline-selector { color: inherit; font-size: inherit; }
162
+
163
+ /* Shared authoring chrome, used by page and lesson editors. */
164
+ .content-editor-shell .editor-panel > summary {
165
+ padding: 0.5rem 0.75rem;
166
+ background: var(--bs-tertiary-bg);
167
+ color: var(--bs-emphasis-color);
168
+ font-weight: 600;
169
+ list-style: none;
170
+ cursor: pointer;
171
+ }
172
+ .content-editor-shell .editor-panel > summary::-webkit-details-marker {
173
+ display: none;
174
+ }
175
+ .content-editor-shell .editor-panel[open] > summary {
176
+ border-bottom: 1px solid var(--bs-border-color);
177
+ }
178
+ .content-editor-shell .editor-icon-action {
179
+ border: 0;
180
+ background: transparent;
181
+ color: inherit;
182
+ padding: 0.25rem;
183
+ border-radius: var(--bs-border-radius-sm);
184
+ line-height: 1;
185
+ }
186
+ .content-editor-shell .editor-icon-action:disabled {
187
+ opacity: var(--bs-btn-disabled-opacity, .65);
188
+ }
189
+ .content-editor-shell .editor-panel .editor-icon-action:is([aria-label='Delete block'], [aria-label='Remove slide'], [aria-label^='Delete page']) {
190
+ color: var(--bs-danger);
191
+ }
192
+ .content-editor-shell .editor-list-row:last-child {
193
+ border-bottom: 0;
194
+ }
195
+ .content-editor-shell .editor-list-row:has([aria-pressed='true']) {
196
+ background: var(--bs-tertiary-bg);
197
+ color: var(--bs-emphasis-color);
198
+ }
199
+ .content-editor-shell .editor-list-row {
200
+ display: flex;
201
+ align-items: stretch;
202
+ border-bottom: 1px solid var(--bs-border-color);
203
+ flex-wrap: nowrap;
204
+ }
205
+ .content-editor-shell .editor-list-row.selection-ancestor {
206
+ box-shadow: inset 3px 0 var(--bs-border-color);
207
+ }
208
+
209
+ .content-editor-shell { min-width: 0; container-type: inline-size; }
210
+ .content-editor-shell .content-editor-columns {
211
+ display: grid;
212
+ grid-template-columns: minmax(16rem, 1fr) minmax(0, 3fr) minmax(14rem, 1fr);
213
+ gap: 1rem;
214
+ align-items: start;
215
+ }
216
+ .content-editor-shell:where([data-preview='true']) .content-editor-columns { grid-template-columns: minmax(16rem, 1fr) minmax(0, 3fr); }
217
+ .content-editor-columns > * { min-width: 0; }
218
+ .content-editor-shell .editor-panel-fields { display: grid; gap: .75rem; padding: .75rem; }
219
+ .content-editor-shell .editor-panel-fields label { display: block; margin: 0; }
220
+ .content-editor-shell .editor-panel-fields label > :is(input, select) { margin-top: .25rem; }
221
+ .content-editor-shell .editor-tabs { display: flex; margin: 0; padding: 0; background: transparent; }
222
+ :is(.content-editor-shell, .component-picker) .editor-tabs {
223
+ --bs-nav-tabs-border-color: var(--bs-border-color);
224
+ --bs-nav-tabs-link-active-color: color-mix(in srgb, var(--bs-body-color) 75%, #000);
225
+ --bs-nav-tabs-link-active-bg: var(--bs-body-bg);
226
+ --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);
227
+ }
228
+ /* Named dark palettes can retain light-slot emphasis colors; pair ink with the visible site mode. */
229
+ [data-editor-color-scheme='dark'] :is(.content-editor-shell, .component-picker) .editor-tabs {
230
+ --bs-nav-tabs-link-active-color: color-mix(in srgb, var(--bs-body-color) 75%, #fff);
231
+ }
232
+ :is(.content-editor-shell, .component-picker) .editor-tabs .nav-link { font-size: .875rem; }
233
+ :is(.content-editor-shell, .component-picker) .editor-tabs .nav-link.active { color: var(--bs-nav-tabs-link-active-color); background-color: var(--bs-nav-tabs-link-active-bg); }
234
+ .content-editor-shell .editor-tab-content { border: 1px solid var(--bs-border-color); border-top: 0; border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); }
235
+ .content-editor-shell .editor-selection-toolbar { position: relative; z-index: 5; flex: 0 0 auto; background: var(--bs-body-bg); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .25rem .5rem; border-top: 1px solid var(--bs-border-color); font-size: .875rem; }
236
+ .content-editor-shell .editor-selection-toolbar .editor-viewport { margin-left: auto; }
237
+ .content-editor-shell .editor-collection-row { display: flex; flex-wrap: wrap; align-items: center; padding: 0; border-bottom: 1px solid var(--bs-border-color); }
238
+ .content-editor-shell .editor-collection-row.selected { background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); }
239
+ .content-editor-shell .editor-collection-select { flex: 1 1 0; min-width: 0; padding: .5rem; border: 0; background: transparent; color: inherit; text-align: left; font-weight: 600; }
240
+ .content-editor-shell .editor-collection-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; max-width: 100%; margin-left: auto; }
241
+ .content-editor-shell .editor-tree-list { max-block-size: min(60vh, 36rem); overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; }
242
+ .content-editor-toolbar { position: sticky; top: var(--editor-toolbar-top, 0px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .25rem 0; margin-bottom: .5rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
243
+ .content-editor-toolbar > .content-editor-title { margin: 0 auto 0 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
244
+ .content-editor-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: .5rem; margin-left: auto; max-width: 100%; }
245
+ @container (max-width: 65rem) {
246
+ .content-editor-shell:not([data-preview='true']) .content-editor-columns { grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr) minmax(12rem, 1fr); }
247
+ }
248
+ @container (max-width: 45rem) {
249
+ .content-editor-shell .content-editor-columns,
250
+ .content-editor-shell:not([data-preview='true']) .content-editor-columns { grid-template-columns: minmax(0, 1fr); }
251
+ .content-editor-columns > .content-editor-inspector { grid-column: 1; }
252
+ }
253
+
254
+ .content-editor-shell .lesson-reorder-handle { cursor: grab; touch-action: none; flex-shrink: 0; }
255
+ .content-editor-shell .lesson-reorder-handle:active { cursor: grabbing; }
256
+ .content-editor-shell .editor-icon-action:focus-visible { outline: 2px solid var(--editor-ui-text); outline-offset: -2px; }
257
+
258
+ .content-editor-shell .editor-panel {
259
+ border: 1px solid var(--bs-border-color);
260
+ border-radius: var(--bs-border-radius);
261
+ overflow: hidden;
262
+ background: var(--bs-body-bg);
263
+ }
264
+ .content-editor-shell .content-outline {
265
+ border: 0;
266
+ }
267
+ .content-editor-shell .list-row-actions {
268
+ display: flex;
269
+ align-items: center;
270
+ flex-shrink: 0;
271
+ padding-right: 0.75rem;
272
+ flex-wrap: nowrap;
273
+ margin-left: auto;
274
+ max-width: 100%;
275
+ }
276
+ .content-editor-shell .editor-list-item {
277
+ min-width: 0;
278
+ border: 0;
279
+ background: transparent;
280
+ color: inherit;
281
+ text-align: left;
282
+ padding: 0.5rem 1rem 0.5rem 3rem;
283
+ overflow: hidden;
284
+ text-overflow: ellipsis;
285
+ white-space: nowrap;
286
+ overflow-wrap: normal;
287
+ flex: 1 1 0;
288
+ font-weight: 400;
289
+ }
290
+ .content-editor-shell .editor-list-row.selected {
291
+ background: var(--bs-primary-bg-subtle);
292
+ color: var(--bs-primary-text-emphasis);
293
+ box-shadow: inset 3px 0 var(--bs-primary);
294
+ }
295
+
296
+ .content-editor-shell .editor-panel-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
297
+ .content-editor-shell .editor-panel-title::after { content: '\25B2'; margin-left: .4rem; color: var(--bs-secondary-color); font-size: .8em; }
298
+ .content-editor-shell .editor-panel:not([open]) .editor-panel-title::after { content: '\25BC'; }
299
+ .content-editor-shell .panel-header-actions { display: inline-flex; align-items: center; gap: .25rem; }
300
+ .content-editor-shell .editor-collection-row { width: 100%; }
301
+ .content-editor-shell .editor-viewport { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; min-width: 0; max-width: 100%; }
302
+
303
+ .content-editor-shell .editor-selection-toolbar .btn {
304
+ text-transform: none;
305
+ max-width: 100%;
306
+ overflow-wrap: anywhere;
307
+ }
308
+
309
+ /* Use a contrasting neutral pair: theme text and surface tokens can belong to different color modes. */
310
+ :is(.content-editor-shell :is(.editor-tree-list, .slide-tree-list, .editor-panel-content, .preview-scroll, .lesson-canvas-scroll, .editor-canvas-scroll), .component-picker-panel, .editor-choice-menu)::-webkit-scrollbar { width: 14px; height: 14px; }
311
+ :is(.content-editor-shell :is(.editor-tree-list, .slide-tree-list, .editor-panel-content, .preview-scroll, .lesson-canvas-scroll, .editor-canvas-scroll), .component-picker-panel, .editor-choice-menu)::-webkit-scrollbar-track { background: #f8f9fa; }
312
+ :is(.content-editor-shell :is(.editor-tree-list, .slide-tree-list, .editor-panel-content, .preview-scroll, .lesson-canvas-scroll, .editor-canvas-scroll), .component-picker-panel, .editor-choice-menu)::-webkit-scrollbar-thumb { background: #6c757d; border: 3px solid #f8f9fa; border-radius: 7px; }
313
+ :is(.content-editor-shell :is(.editor-tree-list, .slide-tree-list, .editor-panel-content, .preview-scroll, .lesson-canvas-scroll, .editor-canvas-scroll), .component-picker-panel, .editor-choice-menu)::-webkit-scrollbar-thumb:hover { background: #495057; }
314
+
315
+ .content-editor-shell .editor-selection-path { flex: 1; align-self: stretch; display: flex; align-items: center; gap: .35rem; min-width: 0; max-width: 100%; }
316
+ .content-editor-shell .editor-path-item { display: flex; align-items: center; gap: .35rem; min-width: 0; }
317
+ .content-editor-shell .editor-path-link { border: 0; padding: 0; background: none; color: var(--bs-link-color); font: inherit; text-transform: none; white-space: nowrap; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
318
+ .content-editor-shell .editor-path-link:hover { text-decoration: underline; }
319
+ .content-editor-shell .editor-path-link[aria-current] { color: var(--bs-body-color); font-weight: 600; }
320
+ .content-editor-shell .editor-path-ancestors { position: relative; align-self: stretch; display: flex; align-items: center; }
321
+ .content-editor-shell .editor-path-ancestors > summary { list-style: none; cursor: pointer; color: var(--bs-link-color); }
322
+ .content-editor-shell .editor-path-ancestors > summary::-webkit-details-marker { display: none; }
323
+ .content-editor-shell .editor-path-menu { position: absolute; inset-block-end: calc(100% + .25rem); z-index: 10; max-height: min(20rem, 70dvh); overflow: auto; display: grid; gap: .5rem; padding: .5rem; background: var(--bs-body-bg); box-shadow: var(--bs-box-shadow, 0 .25rem .75rem #0003); }
324
+
325
+
326
+ /* Shared chrome must not depend on a host's global button/font reset. */
327
+ .content-editor-shell :is(.editor-list-item, .editor-collection-select, .editor-icon-action) { font-family: inherit; font-size: 1rem; line-height: var(--bs-body-line-height, 1.5); text-transform: none; }
328
+ .content-editor-shell .editor-viewport-select { margin: 0; }
329
+ .content-editor-shell .editor-container-fields { display: grid; gap: .75rem; min-width: 0; }
330
+ .content-editor-shell .editor-canvas-scroll { block-size: clamp(18rem, calc(100dvh - 15rem), 65rem); overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; max-width: 100%; min-width: 0; }
331
+ .content-editor-shell .editor-selection-toolbar { background: var(--bs-body-bg); }
332
+
333
+ .content-editor-shell .editor-collection-add { color: var(--bs-primary); padding: .25rem; line-height: 1; }
334
+
335
+ /* A grid label's box includes row gutters; paint its guide inside those gutters. */
336
+ .content-authoring-canvas[data-editing='true'] .row > label.col-form-label[data-block-id],
337
+ .content-authoring-canvas[data-editing='true'] .row > label.col-form-label[data-block-id]:hover:not([data-selected='true']) {
338
+ position: relative;
339
+ outline: none;
340
+ }
341
+ .content-authoring-canvas[data-editing='true'] .row > label.col-form-label[data-block-id]::after {
342
+ content: '';
343
+ position: absolute;
344
+ inset-block: 0;
345
+ inset-inline: calc(var(--bs-gutter-x, 1.5rem) * .5);
346
+ box-sizing: border-box;
347
+ border: 1px dashed var(--bs-secondary-color, #6c757d);
348
+ pointer-events: none;
349
+ }
350
+ .content-authoring-canvas[data-editing='true'] .row > label.col-form-label[data-block-id][data-selected='true']::after {
351
+ border: 2px solid var(--bs-primary);
352
+ }
353
+
354
+ .content-editor-shell .editor-list-row > .editor-icon-action { flex-shrink: 0; }
355
+
356
+ .content-editor-shell [data-outline-block]:focus-visible { outline: 2px solid var(--editor-ui-text); outline-offset: -3px; }
357
+ .content-editor-shell [data-puck-overlay-portal]:focus-visible { outline: 2px solid var(--editor-ui-text); }
358
+
359
+ .content-editor-shell .lesson-reorder-handle:focus-visible { outline: 2px solid var(--editor-ui-text); outline-offset: -2px; }
360
+
361
+ /* Inspector headings remain outside each bounded, internally scrolling body. */
362
+ .content-editor-shell .content-editor-inspector {
363
+ max-block-size: clamp(18rem, calc(100dvh - 15rem), 65rem);
364
+ display: flex;
365
+ flex-direction: column;
366
+ gap: .75rem;
367
+ min-block-size: 0;
368
+ }
369
+ .content-editor-shell .content-editor-inspector > .slide-block-properties {
370
+ display: flex;
371
+ flex-direction: column;
372
+ gap: .75rem;
373
+ max-block-size: inherit;
374
+ min-block-size: 0;
375
+ }
376
+ .content-editor-shell .content-editor-inspector .editor-panel {
377
+ display: flex;
378
+ flex-direction: column;
379
+ min-block-size: 0;
380
+ }
381
+ .content-editor-shell .content-editor-inspector .editor-panel > summary { flex: none; }
382
+ .content-editor-shell .content-editor-inspector .editor-panel::details-content {
383
+ display: flex;
384
+ flex-direction: column;
385
+ min-block-size: 0;
386
+ }
387
+ .content-editor-shell .content-editor-inspector .editor-panel-content {
388
+ min-block-size: 0;
389
+ overflow-y: auto;
390
+ scrollbar-gutter: stable;
391
+ overscroll-behavior: contain;
392
+ }
393
+
394
+ /* MDXEditor mounts its menus in a body portal; both roots share this class. */
395
+ .content-text-editor.mdxeditor,
396
+ .content-text-editor.mdxeditor-popup-container {
397
+ color: var(--bs-body-color);
398
+ font-family: var(--bs-body-font-family);
399
+ --font-body: var(--bs-body-font-family);
400
+ --font-mono: var(--bs-font-monospace);
401
+ --basePageBg: var(--bs-body-bg);
402
+ --baseBase: var(--bs-body-bg);
403
+ --baseBgSubtle: var(--editor-ui-surface-subtle);
404
+ --baseBg: var(--editor-ui-surface);
405
+ --baseBgHover: var(--editor-ui-surface-hover);
406
+ --baseBgActive: var(--bs-primary-bg-subtle);
407
+ --baseLine: var(--bs-border-color);
408
+ --baseBorder: var(--bs-border-color);
409
+ --baseBorderHover: var(--bs-secondary-color);
410
+ --baseSolid: var(--bs-secondary);
411
+ --baseSolidHover: var(--bs-secondary-color);
412
+ --baseText: var(--bs-secondary-color);
413
+ --baseTextContrast: var(--bs-body-color);
414
+ --accentBase: var(--bs-primary-bg-subtle);
415
+ --accentBgSubtle: var(--bs-primary-bg-subtle);
416
+ --accentBg: var(--bs-primary-bg-subtle);
417
+ --accentBgHover: var(--bs-primary-bg-subtle);
418
+ --accentBgActive: var(--bs-primary-bg-subtle);
419
+ --accentLine: var(--bs-primary-border-subtle);
420
+ --accentBorder: var(--bs-primary-border-subtle);
421
+ --accentBorderHover: var(--bs-primary);
422
+ --accentSolid: var(--bs-primary);
423
+ --accentSolidHover: var(--bs-primary-text-emphasis);
424
+ --accentText: var(--bs-link-color);
425
+ --accentTextContrast: var(--bs-primary-text-emphasis);
426
+ --error-color: var(--bs-danger);
427
+ --radius-medium: var(--bs-border-radius);
428
+ }
429
+
430
+ /* Themes may resize list-group containers; shared outline rows have one owner. */
431
+ .content-editor-shell .editor-tree-list {
432
+ font-size: inherit;
433
+ line-height: inherit;
434
+ }
435
+
436
+ .editor-theme-select { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: .875rem; }
437
+ .editor-theme-select select { width: auto; }
438
+
439
+ .component-picker .editor-tabs { gap: .125rem; }
440
+ .component-picker-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
441
+ .component-picker-body > :not(.component-picker) { flex-shrink: 0; }
442
+ .component-picker { display: flex; flex-direction: column; min-height: 0; }
443
+ .component-picker > .editor-tabs { flex-shrink: 0; }
444
+ .component-picker-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); align-content: start; align-items: start; gap: 1rem; min-height: 0; max-height: min(50vh, 28rem); overflow-y: scroll; scrollbar-gutter: stable; overscroll-behavior: contain; padding: .75rem 0 .25rem; }
445
+ .component-picker-panel[hidden] { display: none; }
446
+ .component-picker-family { min-width: 0; }
447
+ .component-picker-family-wide { grid-column: 1 / -1; }
448
+ .component-picker-heading { margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }
449
+ .component-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr)); gap: .5rem; }
450
+ .component-picker .component-picker-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 6rem; padding: .75rem .5rem; text-transform: none; white-space: normal; overflow-wrap: anywhere; font-size: .875rem; }
451
+ .component-picker-item svg { flex-shrink: 0; }
452
+
453
+ @media (max-width: 575px) {
454
+ .component-picker .editor-tabs { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
455
+ .component-picker .editor-tabs .nav-link { flex-shrink: 0; }
456
+ }
457
+
458
+ /* Puck and native columns share the same empty-slot geometry and theme tokens. */
459
+ .content-authoring-canvas .content-column-content[data-empty='true'] {
460
+ --puck-slot-min-empty-height: 3rem;
461
+ min-height: 3rem;
462
+ height: auto;
463
+ padding: 0;
464
+ margin: 0;
465
+ background: transparent;
466
+ }
467
+ .content-authoring-canvas .content-column-content[data-empty='true'] > .content-column-placeholder {
468
+ opacity: 1;
469
+ pointer-events: auto;
470
+ box-sizing: border-box;
471
+ min-height: 3rem;
472
+ margin: 0;
473
+ padding: 0.5rem;
474
+ font: inherit;
475
+ font-size: 1rem;
476
+ line-height: 1.5;
477
+ background: var(--bs-tertiary-bg);
478
+ }
479
+
480
+ /* A fixed-width canvas starts at the scroll origin, never at a centered negative edge. */
481
+ .content-editor-shell .editor-canvas-scroll {
482
+ display: block;
483
+ overflow-anchor: none;
484
+ scroll-behavior: auto;
485
+ scrollbar-width: auto;
486
+ }
487
+ .content-editor-shell .editor-canvas-scroll[data-horizontal-overflow='true'] { overflow-x: scroll; }
488
+ .content-editor-shell .editor-canvas-scroll > .content-authoring-canvas {
489
+ box-sizing: border-box;
490
+ min-width: 0;
491
+ max-width: none;
492
+ margin-inline: 0;
493
+ }
494
+
495
+ .content-editor-shell .editor-canvas-viewport {
496
+ display: flex;
497
+ flex-direction: column;
498
+ block-size: clamp(18rem, calc(100dvh - 15rem), 65rem);
499
+ min-width: 0;
500
+ }
501
+ .content-editor-shell .editor-canvas-viewport > .editor-canvas-scroll { block-size: auto; flex: 1; min-height: 0; }
502
+ .content-editor-shell .editor-canvas-scroll[data-custom-scrollbar='true']::-webkit-scrollbar:horizontal { height: 0; }
503
+ .content-editor-shell .editor-canvas-horizontal-scrollbar {
504
+ position: relative;
505
+ flex: 0 0 14px;
506
+ height: 14px;
507
+ background: #f8f9fa;
508
+ touch-action: none;
509
+ cursor: default;
510
+ }
511
+ .content-editor-shell .editor-canvas-horizontal-thumb {
512
+ position: absolute;
513
+ top: 0;
514
+ height: 100%;
515
+ border: 3px solid #f8f9fa;
516
+ border-radius: 7px;
517
+ background: #6c757d;
518
+ }
519
+ .content-editor-shell .editor-canvas-horizontal-scrollbar:focus-visible { outline: 2px solid var(--editor-ui-text); outline-offset: -2px; }
520
+ .content-editor-shell .editor-canvas-horizontal-scrollbar:hover .editor-canvas-horizontal-thumb { background: #495057; }
521
+
522
+ /* Picker and outline share icon artwork; compact outline rows retain one-line labels. */
523
+ .content-editor-shell .content-outline .editor-list-item { display: flex; align-items: center; gap: 0.5rem; }
524
+ .content-editor-shell .content-outline-icon { display: inline-flex; flex: 0 0 1rem; }
525
+ .content-editor-shell .content-outline-icon > svg { display: block; width: 1rem; height: 1rem; }
526
+ .content-editor-shell .content-outline-selector { min-width: 0; }
527
+
528
+ .content-editor-shell .editor-path-link { display: inline-flex; align-items: center; gap: 0.35rem; }
529
+ .content-editor-shell .editor-path-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
530
+
531
+ /* Fieldset canvases must measure the same viewport as div canvases. */
532
+ .content-editor-shell fieldset.content-authoring-canvas {
533
+ margin: 0;
534
+ padding: 0;
535
+ border: 0;
536
+ min-inline-size: 0;
537
+ }
538
+
539
+ /* Popper keeps portaled overlays mounted while their trigger is outside the
540
+ * canvas scrollport. Do not leave a detached hint floating over other controls. */
541
+ .content-canvas-overlay[data-popper-reference-hidden='true'] {
542
+ visibility: hidden;
543
+ pointer-events: none;
544
+ }
545
+
546
+ /* Sidebar disclosure is shared by both host layouts; hidden panels retain their state. */
547
+ .editor-sidebar-controls { display: inline-flex; align-items: center; gap: .5rem; }
548
+ .content-editor-columns[data-left-collapsed='true'] > :is(.component-outline, aside[aria-label='Slides tree']),
549
+ .content-editor-columns[data-right-collapsed='true'] > .content-editor-inspector { display: none; }
550
+ @container (min-width: 768px) {
551
+ .content-editor-shell .content-editor-columns[data-left-collapsed='true'] { grid-template-columns: minmax(0, 3fr) minmax(12rem, 1fr); }
552
+ .content-editor-shell .content-editor-columns[data-right-collapsed='true'] { grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr); }
553
+ .content-editor-shell .content-editor-columns[data-left-collapsed='true'][data-right-collapsed='true'] { grid-template-columns: minmax(0, 1fr); }
554
+ }
555
+
556
+ .editor-menu-check { display: inline-flex; inline-size: 1rem; block-size: 1rem; align-items: center; flex: none; }
557
+ .editor-choice-menu { max-block-size: min(70vh, 32rem); overflow-y: auto; overscroll-behavior: contain; }
558
+
559
+ .editor-submenu > .dropdown-toggle { inline-size: 100%; text-align: start; }
560
+
561
+ /* Some Bootswatch button rules hardcode ink instead of honoring the Bootstrap state tokens. */
562
+ .editor-readable-dropdown-toggle.btn:not(:disabled) { color: var(--bs-btn-color); }
563
+ .editor-readable-dropdown-toggle.btn:is(:hover, :focus-visible):not(:disabled) { color: var(--bs-btn-hover-color); }
564
+ .editor-readable-dropdown-toggle.btn:is(:active, .active, .show):not(:disabled) { color: var(--bs-btn-active-color); }
565
+
566
+ /* Commands remain buttons; menu links and history icons share a compact, theme-native surface. */
567
+ .content-editor-toolbar .btn:is(.editor-command-link, .editor-command-icon) { text-decoration: none; text-transform: none; }
568
+ .content-editor-toolbar .btn.editor-command-icon { color: var(--bs-body-color); display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; }
569
+ .content-editor-toolbar .editor-command-link { --bs-btn-color: var(--bs-body-color); --bs-btn-hover-color: var(--bs-body-color); --bs-btn-active-color: var(--bs-body-color); --bs-btn-hover-bg: transparent; --bs-btn-active-bg: transparent; }
570
+ .content-editor-toolbar .editor-command-link:hover { text-decoration: underline; }
571
+ .content-editor-shell .editor-canvas-statusbar > .btn:last-child { margin-left: auto; }
572
+
573
+ /* The selection footer belongs to the editor page, outside every scrolling column. */
574
+ .content-editor-shell .editor-page-statusbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: var(--bs-body-bg); }
575
+ .content-editor-shell .editor-page-statusbar:empty { display: none; }
576
+
577
+ /* Some themes set button ink directly; let corrected state variables remain authoritative. */
578
+ .editor-readable-button.btn { color: var(--bs-btn-color); }
579
+ .editor-readable-button.btn:is(:hover, :focus-visible):not(:disabled, .disabled) { color: var(--bs-btn-hover-color); }
580
+ .editor-readable-button.btn:is(:active, .active, .show):not(:disabled, .disabled) { color: var(--bs-btn-active-color); }
581
+ .editor-readable-button.btn:is(:disabled, .disabled) { color: var(--bs-btn-disabled-color); }
582
+
583
+ [data-editor-placeholder-adjusted='true']::placeholder { color: var(--editor-placeholder-color); opacity: 1; }
584
+ [data-editor-file-button-adjusted='true']::file-selector-button { color: var(--editor-file-button-color); opacity: 1; }