@clepit/core 0.2.0-beta.322

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 (188) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +21 -0
  3. package/README.md +79 -0
  4. package/dist/core/editor/action-bar/css.d.ts +3 -0
  5. package/dist/core/editor/action-bar/index.d.ts +18 -0
  6. package/dist/core/editor/css.d.ts +3 -0
  7. package/dist/core/editor/index.d.ts +18 -0
  8. package/dist/core/editor/views/edit.d.ts +4 -0
  9. package/dist/core/editor/views/index.d.ts +4 -0
  10. package/dist/core/editor/views/json.d.ts +9 -0
  11. package/dist/core/editor/views/preview.d.ts +4 -0
  12. package/dist/core/element/index.d.ts +101 -0
  13. package/dist/core/i18n/index.d.ts +43 -0
  14. package/dist/core/managers/block/css.d.ts +3 -0
  15. package/dist/core/managers/block/index.d.ts +40 -0
  16. package/dist/core/managers/event.d.ts +13 -0
  17. package/dist/core/managers/style.d.ts +181 -0
  18. package/dist/core/renderer/draw.d.ts +27 -0
  19. package/dist/core/renderer/index.d.ts +15 -0
  20. package/dist/core/renderer/invalid-data.d.ts +4 -0
  21. package/dist/core/renderer/page.d.ts +37 -0
  22. package/dist/core/store.d.ts +42 -0
  23. package/dist/core/theme/css.d.ts +4 -0
  24. package/dist/core/theme/index.d.ts +42 -0
  25. package/dist/core/toolbars/block/css.d.ts +3 -0
  26. package/dist/core/toolbars/block/index.d.ts +38 -0
  27. package/dist/core/toolbars/inline/css.d.ts +6 -0
  28. package/dist/core/toolbars/inline/index.d.ts +43 -0
  29. package/dist/index.d.ts +12 -0
  30. package/dist/index.js +2 -0
  31. package/dist/index.mjs +2 -0
  32. package/dist/tools/block/alert/css.d.ts +5 -0
  33. package/dist/tools/block/alert/index.d.ts +13 -0
  34. package/dist/tools/block/alert/input.d.ts +13 -0
  35. package/dist/tools/block/alert/output.d.ts +9 -0
  36. package/dist/tools/block/audio/css.d.ts +5 -0
  37. package/dist/tools/block/audio/index.d.ts +13 -0
  38. package/dist/tools/block/audio/input.d.ts +22 -0
  39. package/dist/tools/block/audio/output.d.ts +9 -0
  40. package/dist/tools/block/checklist/css.d.ts +5 -0
  41. package/dist/tools/block/checklist/index.d.ts +13 -0
  42. package/dist/tools/block/checklist/input.d.ts +14 -0
  43. package/dist/tools/block/checklist/output.d.ts +9 -0
  44. package/dist/tools/block/code/css.d.ts +5 -0
  45. package/dist/tools/block/code/grammar/engine.d.ts +52 -0
  46. package/dist/tools/block/code/grammar/languages.d.ts +6 -0
  47. package/dist/tools/block/code/highlight.d.ts +22 -0
  48. package/dist/tools/block/code/index.d.ts +13 -0
  49. package/dist/tools/block/code/input.d.ts +57 -0
  50. package/dist/tools/block/code/loaders/language.d.ts +17 -0
  51. package/dist/tools/block/code/loaders/theme.d.ts +21 -0
  52. package/dist/tools/block/code/output.d.ts +32 -0
  53. package/dist/tools/block/code/theme-css.d.ts +14 -0
  54. package/dist/tools/block/code/theme-generator.d.ts +27 -0
  55. package/dist/tools/block/code/variants.d.ts +14 -0
  56. package/dist/tools/block/collapsible/css.d.ts +6 -0
  57. package/dist/tools/block/collapsible/index.d.ts +13 -0
  58. package/dist/tools/block/collapsible/input.d.ts +13 -0
  59. package/dist/tools/block/collapsible/output.d.ts +16 -0
  60. package/dist/tools/block/collection/css.d.ts +6 -0
  61. package/dist/tools/block/collection/index.d.ts +13 -0
  62. package/dist/tools/block/collection/input.d.ts +11 -0
  63. package/dist/tools/block/collection/output.d.ts +12 -0
  64. package/dist/tools/block/columns/css.d.ts +6 -0
  65. package/dist/tools/block/columns/index.d.ts +13 -0
  66. package/dist/tools/block/columns/input.d.ts +12 -0
  67. package/dist/tools/block/columns/output.d.ts +11 -0
  68. package/dist/tools/block/date/css.d.ts +6 -0
  69. package/dist/tools/block/date/index.d.ts +13 -0
  70. package/dist/tools/block/date/input.d.ts +12 -0
  71. package/dist/tools/block/date/output.d.ts +10 -0
  72. package/dist/tools/block/delimiter/css.d.ts +5 -0
  73. package/dist/tools/block/delimiter/index.d.ts +13 -0
  74. package/dist/tools/block/delimiter/input.d.ts +12 -0
  75. package/dist/tools/block/delimiter/output.d.ts +9 -0
  76. package/dist/tools/block/doc-card/css.d.ts +6 -0
  77. package/dist/tools/block/doc-card/index.d.ts +13 -0
  78. package/dist/tools/block/doc-card/input.d.ts +11 -0
  79. package/dist/tools/block/doc-card/output.d.ts +11 -0
  80. package/dist/tools/block/embed/css.d.ts +6 -0
  81. package/dist/tools/block/embed/index.d.ts +13 -0
  82. package/dist/tools/block/embed/input.d.ts +11 -0
  83. package/dist/tools/block/embed/output.d.ts +23 -0
  84. package/dist/tools/block/embed/providers.d.ts +5 -0
  85. package/dist/tools/block/file/css.d.ts +6 -0
  86. package/dist/tools/block/file/index.d.ts +13 -0
  87. package/dist/tools/block/file/input.d.ts +14 -0
  88. package/dist/tools/block/file/output.d.ts +10 -0
  89. package/dist/tools/block/glance/css.d.ts +5 -0
  90. package/dist/tools/block/glance/index.d.ts +13 -0
  91. package/dist/tools/block/glance/input.d.ts +11 -0
  92. package/dist/tools/block/glance/output.d.ts +18 -0
  93. package/dist/tools/block/header/css.d.ts +5 -0
  94. package/dist/tools/block/header/index.d.ts +13 -0
  95. package/dist/tools/block/header/input.d.ts +13 -0
  96. package/dist/tools/block/header/output.d.ts +9 -0
  97. package/dist/tools/block/image/css.d.ts +5 -0
  98. package/dist/tools/block/image/index.d.ts +13 -0
  99. package/dist/tools/block/image/input.d.ts +22 -0
  100. package/dist/tools/block/image/output.d.ts +9 -0
  101. package/dist/tools/block/list/css.d.ts +5 -0
  102. package/dist/tools/block/list/index.d.ts +13 -0
  103. package/dist/tools/block/list/input.d.ts +16 -0
  104. package/dist/tools/block/list/output.d.ts +9 -0
  105. package/dist/tools/block/openapi/css.d.ts +5 -0
  106. package/dist/tools/block/openapi/index.d.ts +13 -0
  107. package/dist/tools/block/openapi/input.d.ts +11 -0
  108. package/dist/tools/block/openapi/output.d.ts +24 -0
  109. package/dist/tools/block/openapi/schema.d.ts +17 -0
  110. package/dist/tools/block/openapi/snippets.d.ts +5 -0
  111. package/dist/tools/block/openapi/spec.d.ts +46 -0
  112. package/dist/tools/block/paragraph/css.d.ts +5 -0
  113. package/dist/tools/block/paragraph/index.d.ts +13 -0
  114. package/dist/tools/block/paragraph/input.d.ts +12 -0
  115. package/dist/tools/block/paragraph/output.d.ts +13 -0
  116. package/dist/tools/block/quote/css.d.ts +5 -0
  117. package/dist/tools/block/quote/index.d.ts +13 -0
  118. package/dist/tools/block/quote/input.d.ts +15 -0
  119. package/dist/tools/block/quote/output.d.ts +14 -0
  120. package/dist/tools/block/sketch/css.d.ts +6 -0
  121. package/dist/tools/block/sketch/index.d.ts +13 -0
  122. package/dist/tools/block/sketch/input.d.ts +14 -0
  123. package/dist/tools/block/sketch/output.d.ts +16 -0
  124. package/dist/tools/block/table/css.d.ts +5 -0
  125. package/dist/tools/block/table/index.d.ts +13 -0
  126. package/dist/tools/block/table/input.d.ts +28 -0
  127. package/dist/tools/block/table/output.d.ts +28 -0
  128. package/dist/tools/block/toc/css.d.ts +6 -0
  129. package/dist/tools/block/toc/index.d.ts +13 -0
  130. package/dist/tools/block/toc/input.d.ts +11 -0
  131. package/dist/tools/block/toc/output.d.ts +18 -0
  132. package/dist/tools/block/typeset/css.d.ts +6 -0
  133. package/dist/tools/block/typeset/index.d.ts +22 -0
  134. package/dist/tools/block/typeset/input.d.ts +18 -0
  135. package/dist/tools/block/typeset/latex/layout.d.ts +32 -0
  136. package/dist/tools/block/typeset/latex/model.d.ts +64 -0
  137. package/dist/tools/block/typeset/latex/parse.d.ts +3 -0
  138. package/dist/tools/block/typeset/latex/render.d.ts +7 -0
  139. package/dist/tools/block/typeset/latex/symbols.d.ts +26 -0
  140. package/dist/tools/block/typeset/mermaid/layout.d.ts +71 -0
  141. package/dist/tools/block/typeset/mermaid/model.d.ts +78 -0
  142. package/dist/tools/block/typeset/mermaid/parse.d.ts +3 -0
  143. package/dist/tools/block/typeset/mermaid/render.d.ts +7 -0
  144. package/dist/tools/block/typeset/output.d.ts +46 -0
  145. package/dist/tools/block/updates/css.d.ts +6 -0
  146. package/dist/tools/block/updates/index.d.ts +13 -0
  147. package/dist/tools/block/updates/input.d.ts +14 -0
  148. package/dist/tools/block/updates/output.d.ts +19 -0
  149. package/dist/tools/block/video/css.d.ts +5 -0
  150. package/dist/tools/block/video/index.d.ts +13 -0
  151. package/dist/tools/block/video/input.d.ts +22 -0
  152. package/dist/tools/block/video/output.d.ts +9 -0
  153. package/dist/tools/index.d.ts +3 -0
  154. package/dist/tools/inline/bold/css.d.ts +3 -0
  155. package/dist/tools/inline/bold/index.d.ts +10 -0
  156. package/dist/tools/inline/code/css.d.ts +3 -0
  157. package/dist/tools/inline/code/index.d.ts +12 -0
  158. package/dist/tools/inline/italic/css.d.ts +3 -0
  159. package/dist/tools/inline/italic/index.d.ts +10 -0
  160. package/dist/tools/inline/link/css.d.ts +3 -0
  161. package/dist/tools/inline/link/dialog.d.ts +31 -0
  162. package/dist/tools/inline/link/index.d.ts +11 -0
  163. package/dist/tools/inline/marker/css.d.ts +3 -0
  164. package/dist/tools/inline/marker/index.d.ts +16 -0
  165. package/dist/tools/inline/mention/css.d.ts +3 -0
  166. package/dist/tools/inline/mention/index.d.ts +10 -0
  167. package/dist/tools/inline/status/css.d.ts +3 -0
  168. package/dist/tools/inline/status/dialog.d.ts +30 -0
  169. package/dist/tools/inline/status/index.d.ts +12 -0
  170. package/dist/tools/inline/strikethrough/css.d.ts +3 -0
  171. package/dist/tools/inline/strikethrough/index.d.ts +10 -0
  172. package/dist/tools/inline/tooltip/css.d.ts +3 -0
  173. package/dist/tools/inline/tooltip/dialog.d.ts +52 -0
  174. package/dist/tools/inline/tooltip/index.d.ts +21 -0
  175. package/dist/tools/inline/underline/css.d.ts +3 -0
  176. package/dist/tools/inline/underline/index.d.ts +10 -0
  177. package/dist/types.d.ts +947 -0
  178. package/dist/utils/dialogs/css.d.ts +3 -0
  179. package/dist/utils/dom.d.ts +20 -0
  180. package/dist/utils/icons.d.ts +7 -0
  181. package/dist/utils/platform.d.ts +82 -0
  182. package/dist/utils/sanitize-html-nodom.d.ts +2 -0
  183. package/dist/utils/switch/css.d.ts +3 -0
  184. package/dist/utils/switch/index.d.ts +30 -0
  185. package/dist/utils/tooltip/css.d.ts +3 -0
  186. package/dist/utils/tooltip/index.d.ts +4 -0
  187. package/dist/utils/url.d.ts +52 -0
  188. package/package.json +66 -0
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-alert-input-styles";
2
+ export declare const inputStyle = "\n/* Alert block styles */\n.clepit-alert {\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.5;\n margin: 0 20px;\n}\n\n.clepit-alert[data-variant=\"info\"] {\n background: var(--clepit-primary-bg);\n color: var(--clepit-primary-hover);\n}\n\n.clepit-alert[data-variant=\"warning\"] {\n background: var(--clepit-warning-bg);\n color: var(--clepit-warning);\n}\n\n.clepit-alert[data-variant=\"error\"] {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n}\n\n.clepit-alert[data-variant=\"success\"] {\n background: var(--clepit-success-bg);\n color: var(--clepit-success);\n}\n\n.clepit-alert[data-variant=\"plain\"] {\n background: transparent;\n color: inherit;\n}\n\n.clepit-alert-text {\n outline: none;\n margin: 0;\n padding: 0;\n}\n\n.clepit-alert[data-placeholder]:empty::before {\n content: attr(data-placeholder);\n color: rgba(0, 0, 0, 0.6);\n font-style: italic;\n pointer-events: none;\n}\n\n/* Alert link styles */\n.clepit-alert-text a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-alert-text a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* Alert inline code styling */\n.clepit-alert-text code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Alert marker brush effect */\n.clepit-alert-text mark {\n background: none;\n position: relative;\n color: inherit;\n display: inline-block;\n z-index: 0; /* create stacking context so ::before sits behind text, not page */\n white-space: pre-wrap; /* ensure leading/trailing spaces inside mark render */\n}\n\n.clepit-alert-text mark::before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0.15em;\n height: 1.25em;\n transform: rotate(-0.4deg);\n background: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z' fill='%23FFE047'/></svg>\") no-repeat center / 100% 100%;\n z-index: -1; /* behind text but within mark's stacking context */\n}\n\n";
3
+ export declare const outputStylesKey = "clepit-alert-output-styles";
4
+ export declare const outputStyle = "\n/* Output alert styles */\n.clepit-output-alert {\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.5;\n margin: 1rem 0;\n}\n\n.clepit-output-alert--info {\n background: var(--clepit-primary-bg);\n color: var(--clepit-primary-hover);\n}\n\n.clepit-output-alert--warning {\n background: var(--clepit-warning-bg);\n color: var(--clepit-warning);\n}\n\n.clepit-output-alert--error {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n}\n\n.clepit-output-alert--success {\n background: var(--clepit-success-bg);\n color: var(--clepit-success);\n}\n\n.clepit-output-alert--plain {\n background: transparent;\n color: inherit;\n}\n\n.clepit-output-alert-content {\n line-height: 1.5;\n}\n\n/* Output alert link styles */\n.clepit-output-alert a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-output-alert a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* Output alert inline code styling */\n.clepit-output-alert code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Output alert marker brush effect */\n.clepit-output-alert mark {\n background: none;\n position: relative;\n color: inherit;\n display: inline-block;\n z-index: 0;\n white-space: pre-wrap;\n}\n\n.clepit-output-alert mark::before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n top: 0.15em;\n height: 1.25em;\n transform: rotate(-0.4deg);\n background: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'><path d='M0,8 C5,2 15,1 25,3 35,5 45,2 55,4 65,6 75,5 85,7 95,9 100,8 100,8 100,14 95,18 85,17 75,16 65,19 55,17 45,15 35,18 25,16 15,14 5,15 0,12 Z' fill='%23FFE047'/></svg>\") no-repeat center / 100% 100%;\n z-index: -1;\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { AlertInput } from './input';
2
+ import { AlertOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const AlertTool: {
5
+ icon: string;
6
+ readonly input: typeof AlertInput;
7
+ label: string;
8
+ readonly output: typeof AlertOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { AlertData, AlertVariant, InputConfig } from '../../../types';
2
+ export declare class AlertInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): AlertData;
7
+ static render(containerId: string, data?: AlertData, config?: InputConfig<'alert'>): HTMLElement;
8
+ static changeVariant(element: HTMLElement, variant: AlertVariant, containerId: string): void;
9
+ static isEmpty(blockElement: HTMLElement): boolean;
10
+ static isEmptyData(data: AlertData): boolean;
11
+ static destroy(containerId: string): void;
12
+ }
13
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { AlertData, BlockClassNames, BlockStyles, OutputConfig } from '../../../types';
3
+ export declare class AlertOutput {
4
+ static render(data: AlertData, config?: OutputConfig, styles?: BlockStyles['alert'], classNames?: BlockClassNames['alert']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: AlertData, backing?: Backing): ClepitElement | null;
7
+ private static validate;
8
+ }
9
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-audio-input-styles";
2
+ export declare const inputStyle: string;
3
+ export declare const outputStylesKey = "clepit-audio-output-styles";
4
+ export declare const outputStyle = "\n/* Output audio styles */\n.clepit-output-audio-container {\n width: 100%;\n margin: 1rem 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n}\n\n.clepit-output-audio-wrapper {\n width: 100%;\n display: flex;\n}\n\n.clepit-output-audio {\n width: 100%;\n}\n\n\n.clepit-output-audio-caption {\n margin-top: 0.5rem;\n font-size: 0.875rem;\n color: var(--clepit-text-muted);\n font-style: italic;\n text-align: center;\n}\n\n/* Output audio alignment */\n.clepit-output-audio-wrapper--left {\n justify-content: flex-start;\n}\n\n.clepit-output-audio-wrapper--center {\n justify-content: center;\n}\n\n.clepit-output-audio-wrapper--right {\n justify-content: flex-end;\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { AudioInput } from './input';
2
+ import { AudioOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const AudioTool: {
5
+ icon: string;
6
+ readonly input: typeof AudioInput;
7
+ label: string;
8
+ readonly output: typeof AudioOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { Alignment, AudioData, InputConfig, UploadFunction } from '../../../types';
2
+ export declare class AudioInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static validTypes;
6
+ private static addEventListener;
7
+ static save(element: HTMLElement): AudioData;
8
+ static render(uploadFunction: UploadFunction, containerId: string, data?: AudioData, config?: InputConfig<'audio'>): HTMLElement;
9
+ private static renderAudio;
10
+ private static renderDropArea;
11
+ private static handleFileSelect;
12
+ private static handleFileDrop;
13
+ private static isValidAudioFile;
14
+ private static processAudioFile;
15
+ private static showLoading;
16
+ private static showError;
17
+ static setAlignment(block: HTMLElement, alignment: Alignment): void;
18
+ static isEmpty(blockElement: HTMLElement): boolean;
19
+ static isEmptyData(data: AudioData): boolean;
20
+ static destroy(containerId: string): void;
21
+ }
22
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { AudioData, BlockClassNames, BlockStyles, OutputConfig } from '../../../types';
3
+ export declare class AudioOutput {
4
+ static render(data: AudioData, config?: OutputConfig, styles?: BlockStyles['audio'], classNames?: BlockClassNames['audio']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: AudioData, backing?: Backing): ClepitElement | null;
7
+ private static validate;
8
+ }
9
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-checklist-input-styles";
2
+ export declare const inputStyle: string;
3
+ export declare const outputStylesKey = "clepit-checklist-output-styles";
4
+ export declare const outputStyle = "\n/* Checklist output block styles */\n.clepit-output-checklist {\n margin: 0 0 1rem 0;\n padding-left: 0;\n}\n\n.clepit-output-checklist-item {\n --text: var(--clepit-text);\n --check: var(--clepit-marker);\n --disabled: var(--clepit-border);\n --border-radius: 10px;\n border-radius: var(--border-radius);\n position: relative;\n padding: 5px;\n display: grid;\n grid-template-columns: 30px auto;\n align-items: center;\n margin: 0.5rem 0;\n line-height: 1.6;\n}\n\n.clepit-output-checklist-text {\n color: var(--text);\n position: relative;\n cursor: pointer;\n display: grid;\n align-items: center;\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n transition: color 0.3s ease;\n line-height: 1.6;\n}\n\n.clepit-output-checklist-text::before,\n.clepit-output-checklist-text::after {\n content: \"\";\n position: absolute;\n}\n\n.clepit-output-checklist-text::before {\n height: 2px;\n width: 8px;\n left: -27px;\n background: var(--check);\n border-radius: 2px;\n transition: background 0.3s ease;\n}\n\n.clepit-output-checklist-text::after {\n height: 4px;\n width: 4px;\n top: 8px;\n left: -25px;\n border-radius: 50%;\n}\n\n.clepit-output-checklist-checkbox {\n -webkit-appearance: none;\n -moz-appearance: none;\n position: relative;\n height: 15px;\n width: 15px;\n outline: none;\n border: 0;\n margin: 0 15px 0 0;\n cursor: pointer;\n background: var(--background);\n display: grid;\n align-items: center;\n pointer-events: none;\n}\n\n.clepit-output-checklist-checkbox::before,\n.clepit-output-checklist-checkbox::after {\n content: \"\";\n position: absolute;\n height: 2px;\n top: auto;\n background: var(--check);\n border-radius: 2px;\n}\n\n.clepit-output-checklist-checkbox::before {\n width: 0px;\n right: 60%;\n transform-origin: right bottom;\n}\n\n.clepit-output-checklist-checkbox::after {\n width: 0px;\n left: 40%;\n transform-origin: left bottom;\n}\n\n.clepit-output-checklist-checkbox:checked::before {\n -webkit-animation: clepit-check-01-11 0.4s ease forwards;\n animation: clepit-check-01-11 0.4s ease forwards;\n}\n\n.clepit-output-checklist-checkbox:checked::after {\n -webkit-animation: clepit-check-02-11 0.4s ease forwards;\n animation: clepit-check-02-11 0.4s ease forwards;\n}\n\n.clepit-output-checklist-checkbox:checked + .clepit-output-checklist-text {\n color: var(--disabled);\n -webkit-animation: clepit-move-11 0.3s ease 0.1s forwards;\n animation: clepit-move-11 0.3s ease 0.1s forwards;\n}\n\n.clepit-output-checklist-checkbox:checked + .clepit-output-checklist-text::before {\n background: var(--disabled);\n -webkit-animation: clepit-slice-11 0.4s ease forwards;\n animation: clepit-slice-11 0.4s ease forwards;\n}\n\n.clepit-output-checklist-checkbox:checked + .clepit-output-checklist-text::after {\n -webkit-animation: clepit-firework-11 0.5s ease forwards 0.1s;\n animation: clepit-firework-11 0.5s ease forwards 0.1s;\n}\n\n@-webkit-keyframes clepit-move-11 {\n 50% {\n padding-left: 8px;\n padding-right: 0px;\n }\n 100% {\n padding-right: 4px;\n }\n}\n\n@keyframes clepit-move-11 {\n 50% {\n padding-left: 8px;\n padding-right: 0px;\n }\n 100% {\n padding-right: 4px;\n }\n}\n\n@-webkit-keyframes clepit-slice-11 {\n 60% {\n width: 100%;\n left: 4px;\n }\n 100% {\n width: 100%;\n left: -2px;\n padding-left: 0;\n }\n}\n\n@keyframes clepit-slice-11 {\n 60% {\n width: 100%;\n left: 4px;\n }\n 100% {\n width: 100%;\n left: -2px;\n padding-left: 0;\n }\n}\n\n@-webkit-keyframes clepit-check-01-11 {\n 0% {\n width: 4px;\n top: auto;\n transform: rotate(0);\n }\n 50% {\n width: 0px;\n top: auto;\n transform: rotate(0);\n }\n 51% {\n width: 0px;\n top: 8px;\n transform: rotate(45deg);\n }\n 100% {\n width: 5px;\n top: 8px;\n transform: rotate(45deg);\n }\n}\n\n@keyframes clepit-check-01-11 {\n 0% {\n width: 4px;\n top: auto;\n transform: rotate(0);\n }\n 50% {\n width: 0px;\n top: auto;\n transform: rotate(0);\n }\n 51% {\n width: 0px;\n top: 8px;\n transform: rotate(45deg);\n }\n 100% {\n width: 5px;\n top: 8px;\n transform: rotate(45deg);\n }\n}\n\n@-webkit-keyframes clepit-check-02-11 {\n 0% {\n width: 4px;\n top: 17px;\n transform: rotate(0);\n }\n 50% {\n width: 0px;\n top: 17px;\n transform: rotate(0);\n }\n 51% {\n width: 0px;\n top: 8px;\n transform: rotate(-45deg);\n }\n 100% {\n width: 10px;\n top: 8px;\n transform: rotate(-45deg);\n }\n}\n\n@keyframes clepit-check-02-11 {\n 0% {\n width: 4px;\n top: 17px;\n transform: rotate(0);\n }\n 50% {\n width: 0px;\n top: 17px;\n transform: rotate(0);\n }\n 51% {\n width: 0px;\n top: 8px;\n transform: rotate(-45deg);\n }\n 100% {\n width: 10px;\n top: 8px;\n transform: rotate(-45deg);\n }\n}\n\n@-webkit-keyframes clepit-firework-11 {\n 0% {\n opacity: 1;\n box-shadow: 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker);\n }\n 30% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n box-shadow: 0 -15px 0 0px var(--clepit-marker), 14px -8px 0 0px var(--clepit-marker), 14px 8px 0 0px var(--clepit-marker), 0 15px 0 0px var(--clepit-marker), -14px 8px 0 0px var(--clepit-marker), -14px -8px 0 0px var(--clepit-marker);\n }\n}\n\n@keyframes clepit-firework-11 {\n 0% {\n opacity: 1;\n box-shadow: 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker), 0 0 0 -2px var(--clepit-marker);\n }\n 30% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n box-shadow: 0 -15px 0 0px var(--clepit-marker), 14px -8px 0 0px var(--clepit-marker), 14px 8px 0 0px var(--clepit-marker), 0 15px 0 0px var(--clepit-marker), -14px 8px 0 0px var(--clepit-marker), -14px -8px 0 0px var(--clepit-marker);\n }\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ChecklistInput } from './input';
2
+ import { ChecklistOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const ChecklistTool: {
5
+ icon: string;
6
+ readonly input: typeof ChecklistInput;
7
+ label: string;
8
+ readonly output: typeof ChecklistOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { ChecklistData, InputConfig } from '../../../types';
2
+ export declare class ChecklistInput {
3
+ private static placeholder;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): ChecklistData;
7
+ static render(containerId: string, data?: ChecklistData, config?: InputConfig<'checklist'>): HTMLElement;
8
+ private static createAndAppendChecklistItem;
9
+ private static cleanupEmptyItems;
10
+ static isEmpty(blockElement: HTMLElement): boolean;
11
+ static isEmptyData(data: ChecklistData): boolean;
12
+ static destroy(containerId: string): void;
13
+ }
14
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, ChecklistData, OutputConfig } from '../../../types';
3
+ export declare class ChecklistOutput {
4
+ static render(data: ChecklistData, config?: OutputConfig, styles?: BlockStyles['checklist'], classNames?: BlockClassNames['checklist']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: ChecklistData, backing?: Backing): ClepitElement | null;
7
+ private static validate;
8
+ }
9
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-code-input-styles";
2
+ export declare const inputStyle: string;
3
+ export declare const outputStylesKey = "clepit-code-output-styles";
4
+ export declare const outputStyle = "\n/* Output Code Block */\n/* No margin of its own \u2014 every consumer already governs the gap around this\n * container (page rhythm via the block wrapper's margin-block, or a flex\n * container's gap inside the openapi block). A margin here just adds a second,\n * inconsistent gap on top of whichever one the consumer already applies. */\n.clepit-output-code-container {\n border: 1px solid var(--clepit-code-border);\n border-radius: 6px;\n overflow: hidden;\n background: var(--clepit-code-bg);\n margin: 0;\n}\n\n.clepit-output-code-header {\n background: var(--clepit-code-bg);\n padding: 8px 34px;\n border-bottom: 1px solid var(--clepit-code-border);\n font-size: 12px;\n color: var(--clepit-text-muted);\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n/* Output header \u2014 theme-agnostic; tokens handle light/dark automatically */\n.clepit-output-code-header {\n background: var(--clepit-code-bg);\n color: var(--clepit-text-muted);\n border-bottom-color: var(--clepit-code-border);\n --clepit-svg-stroke-color: var(--clepit-text-muted);\n --clepit-btn-hover-bg: var(--clepit-block-highlight-bg);\n}\n\n/* Output code variant tabs */\n.clepit-output-code-tabs {\n display: flex;\n align-items: stretch;\n gap: 4px;\n margin: -8px 0 -8px -18px;\n overflow-x: auto;\n scrollbar-width: none;\n}\n\n.clepit-output-code-tabs::-webkit-scrollbar {\n display: none;\n}\n\n.clepit-output-code-tab {\n appearance: none;\n -webkit-appearance: none;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n color: var(--clepit-text-muted);\n cursor: pointer;\n font: inherit;\n padding: 8px 10px;\n transition: color 0.2s ease, border-color 0.2s ease;\n white-space: nowrap;\n}\n\n.clepit-output-code-tab:hover {\n color: var(--clepit-text);\n}\n\n.clepit-output-code-tab[aria-selected=\"true\"] {\n border-bottom-color: var(--clepit-primary);\n color: var(--clepit-primary);\n}\n\n.clepit-output-code-tab:focus-visible {\n outline: 2px solid var(--clepit-primary);\n outline-offset: -2px;\n}\n\n.clepit-output-code-editor {\n overflow: auto;\n max-height: 60vh;\n position: relative;\n border: none;\n border-radius: 0;\n}\n\n/* The output panes: one pre per variant, the inactive ones carrying a hidden attribute.\n * Colour comes from the generated theme stylesheet, keyed on the container's\n * data-theme, so a published page keeps its palette with nothing running. */\n.clepit-output-code-pane {\n margin: 0;\n padding: 12px 34px;\n max-height: 60vh;\n overflow: auto;\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;\n font-size: 0.875rem;\n line-height: 1.5;\n tab-size: 2;\n white-space: pre;\n}\n\n/* Code Output */\n.clepit-output-code {\n margin: 1rem 0;\n background-color: var(--clepit-code-bg);\n border: 1px solid var(--clepit-code-border);\n border-radius: 6px;\n overflow: hidden;\n}\n\n.clepit-output-code code {\n display: block;\n padding: 1rem;\n font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;\n font-size: 0.875rem;\n line-height: 1.5;\n color: var(--clepit-code-text);\n overflow-x: auto;\n white-space: pre;\n}\n\n/* Output code copy button */\n.clepit-output-code-copy-btn {\n margin-left: auto;\n width: 24px;\n height: 24px;\n border: none;\n outline: none;\n cursor: pointer;\n border-radius: 50%;\n background: transparent;\n transition: all 0.2s ease;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.clepit-output-code-copy-btn {\n color: var(--clepit-text-muted);\n}\n\n.clepit-output-code-copy-btn:hover {\n background: var(--clepit-block-highlight-bg);\n color: var(--clepit-primary);\n}\n\n.clepit-output-code-copy-btn:hover .clepit-copy-icon {\n stroke: var(--clepit-primary);\n}\n\n.clepit-output-code-copy-btn:active {\n transform: scale(0.95);\n}\n\n.clepit-copy-icon,\n.clepit-check-icon {\n width: 20px;\n height: 20px;\n stroke: var(--clepit-svg-stroke-color);\n stroke-width: 2;\n fill: none;\n display: block;\n}\n\n/* Code output button animation styles */\n.clepit-output-code-copy-btn--animating {\n color: var(--clepit-success);\n transform: scale(1.1);\n}\n\n.clepit-output-code-copy-btn--normal {\n color: var(--clepit-svg-stroke-color);\n transform: scale(1);\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,52 @@
1
+ import { CodeToken } from '../highlight';
2
+ export type StringRule = {
3
+ open: string;
4
+ /** Defaults to `open`, which covers every quote-delimited string. */
5
+ close?: string;
6
+ /** The character that makes the next one literal, usually a backslash. */
7
+ escape?: string;
8
+ /** Whether the literal may cross a line break. Most may not, and stopping at
9
+ * the line is what keeps one unterminated quote from colouring a whole file
10
+ * while an author is still typing it. */
11
+ multiline?: boolean;
12
+ };
13
+ /**
14
+ * A language, described rather than parsed.
15
+ *
16
+ * Colouring a code block needs tokens, not a syntax tree: which run of
17
+ * characters is a keyword, a string, a comment, a number. That is a much
18
+ * smaller problem than parsing, and it is why one engine plus a short
19
+ * description per language replaces a grammar per language.
20
+ *
21
+ * The groups here are the ones `CODE_TAG_GROUPS` already names, so a language
22
+ * added tomorrow paints from the same nine themes as the rest.
23
+ */
24
+ export type GrammarSpec = {
25
+ lineComments?: string[];
26
+ blockComments?: Array<[string, string]>;
27
+ strings?: StringRule[];
28
+ keywords?: string[];
29
+ /** Type and class names: `string`, `int`, `Vec`. */
30
+ types?: string[];
31
+ /** Literals that are words: `true`, `nil`, `None`. Coloured as numbers are,
32
+ * which is what every one of the nine themes already does with them. */
33
+ constants?: string[];
34
+ /** Words that name a callable: `println`, `describe`. */
35
+ builtins?: string[];
36
+ /** An identifier immediately followed by `(` reads as a call. */
37
+ functionCalls?: boolean;
38
+ caseInsensitive?: boolean;
39
+ /** Extra characters that may appear in an identifier, beyond letters, digits
40
+ * and `_`. Ruby wants `?` and `!`, PHP and shell want `$`. */
41
+ identifierExtra?: string;
42
+ };
43
+ /**
44
+ * Split source into coloured runs.
45
+ *
46
+ * Every character of the input comes back exactly once, classified or not, so a
47
+ * caller can rejoin the runs and get the original source. That property is what
48
+ * lets the editor lay this under a textarea: the painted copy and the text the
49
+ * author is typing stay the same length and the caret lands where it looks.
50
+ */
51
+ export declare const tokenizeWith: (code: string, spec: GrammarSpec) => CodeToken[];
52
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { GrammarSpec } from './engine';
2
+ import { CodeLanguage } from '../../../../types';
3
+ export declare const GRAMMARS: {
4
+ readonly [L in CodeLanguage]: GrammarSpec;
5
+ };
6
+ //# sourceMappingURL=languages.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { CodeLanguage } from '../../../types';
2
+ export type CodeToken = {
3
+ classes: string;
4
+ text: string;
5
+ };
6
+ /**
7
+ * Split source into classified runs, using no DOM and no third-party grammar.
8
+ *
9
+ * This used to parse with a Lezer grammar per language, which meant a grammar
10
+ * package per language and a CodeMirror editor dragged in behind each one. What
11
+ * colouring actually needs is token classification, not a syntax tree, so one
12
+ * tokenizer reads a short description of each language instead.
13
+ *
14
+ * Synchronous, which the old path could not be: a grammar arrived by dynamic
15
+ * import, so a block drew as plain source until it landed and a server had to
16
+ * preload the languages its document used. Nothing to load now.
17
+ *
18
+ * Every character of the input comes back exactly once, classified or not, so a
19
+ * caller can join the runs and get the original source.
20
+ */
21
+ export declare const tokenizeCode: (code: string, language: CodeLanguage) => CodeToken[];
22
+ //# sourceMappingURL=highlight.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { CodeInput } from './input';
2
+ import { CodeOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const CodeTool: {
5
+ icon: string;
6
+ readonly input: typeof CodeInput;
7
+ label: string;
8
+ readonly output: typeof CodeOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,57 @@
1
+ import { CodeData, CodeLanguage, CodeTheme, InputConfig } from '../../../types';
2
+ export declare class CodeInput {
3
+ static placeholder: string;
4
+ static supportedLanguages: {
5
+ [k: string]: {
6
+ name: string;
7
+ };
8
+ };
9
+ static supportedThemes: {
10
+ [k: string]: {
11
+ name: string;
12
+ theme: null;
13
+ };
14
+ };
15
+ static defaultLanguage: CodeLanguage;
16
+ static defaultTheme: CodeTheme;
17
+ private static inputMap;
18
+ private static dataMap;
19
+ static save(element: HTMLElement): CodeData;
20
+ /** Turns a single-language block into a two-tab one, seeding the first tab
21
+ * from what the author already wrote. A block that already has tabs gains one. */
22
+ static addVariant(data: CodeData): CodeData;
23
+ /** Removing down to one variant drops the array entirely, so the block goes
24
+ * back to rendering as an ordinary code box rather than a one-tab strip. */
25
+ static removeVariant(data: CodeData, index: number): CodeData;
26
+ static render(containerId: string, data?: CodeData, config?: InputConfig<'code'>, defaults?: {
27
+ language?: CodeLanguage;
28
+ theme?: CodeTheme;
29
+ }): HTMLElement;
30
+ /**
31
+ * The editing surface: a textarea laid over a highlighted `pre`.
32
+ *
33
+ * The textarea holds the text and the caret; the `pre` behind it holds the
34
+ * colour, drawn by the same `tokenizeCode` a server uses. One highlighting
35
+ * path serves editing, display and a published page, so the three cannot show
36
+ * the same snippet three different ways.
37
+ */
38
+ private static mountEditor;
39
+ /** A trailing newline leaves the last line with no box to sit in, so the
40
+ * painted copy carries one more than the text does. */
41
+ private static paint;
42
+ static updateLanguage(block: HTMLElement, language: CodeLanguage): void;
43
+ static updateTheme(block: HTMLElement, theme: CodeTheme): void;
44
+ /**
45
+ * The block-navigation keys, which used to be a CodeMirror keymap.
46
+ *
47
+ * Behaviour is carried over unchanged, including Enter leaving the block for
48
+ * a new paragraph rather than inserting a newline. That is what the keymap
49
+ * did, so a newline has only ever been reachable here by pasting one.
50
+ */
51
+ private static handleKeydown;
52
+ private static getHeaderText;
53
+ static isEmpty(blockElement: HTMLElement): boolean;
54
+ static isEmptyData(data: CodeData): boolean;
55
+ static destroy(containerId: string): void;
56
+ }
57
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { CodeLanguage } from '../../../../types';
2
+ export declare const LANGUAGE_NAMES: Record<CodeLanguage, string>;
3
+ /**
4
+ * Check if a language is supported
5
+ */
6
+ export declare function isLanguageSupported(language: string): language is CodeLanguage;
7
+ /**
8
+ * Get all supported languages
9
+ */
10
+ export declare function getSupportedLanguages(): CodeLanguage[];
11
+ export declare function getLanguageName(language: CodeLanguage): string;
12
+ export declare const SUPPORTED_LANGUAGES: {
13
+ [k: string]: {
14
+ name: string;
15
+ };
16
+ };
17
+ //# sourceMappingURL=language.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { CodeTheme } from '../../../../types';
2
+ export declare const THEME_NAMES: Record<CodeTheme, string>;
3
+ /**
4
+ * Get theme name
5
+ */
6
+ export declare function getThemeName(theme: CodeTheme): string;
7
+ /**
8
+ * Check if a theme is supported
9
+ */
10
+ export declare function isThemeSupported(theme: string): theme is CodeTheme;
11
+ /**
12
+ * Get all supported themes
13
+ */
14
+ export declare function getSupportedThemes(): CodeTheme[];
15
+ export declare const SUPPORTED_THEMES: {
16
+ [k: string]: {
17
+ name: string;
18
+ theme: null;
19
+ };
20
+ };
21
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1,32 @@
1
+ import { Backing, ClepitElement, DrawContext } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, CodeData, OutputConfig } from '../../../types';
3
+ export declare class CodeOutput {
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ /**
7
+ * The block as markup, with no browser involved.
8
+ *
9
+ * Highlighting comes from our own tokenizer, so a published page shows the
10
+ * same colours the editor does without an editor being shipped to draw them.
11
+ * Colour itself arrives through the stylesheet, keyed on the theme this
12
+ * carries.
13
+ *
14
+ * Every variant pane is drawn, not only the active one, so the tabs have
15
+ * something to switch between the moment a browser picks the block up.
16
+ */
17
+ static draw(data: CodeData, backing?: Backing, context?: DrawContext): ClepitElement | null;
18
+ static render(data: CodeData, _config?: OutputConfig, styles?: BlockStyles['code'], classNames?: BlockClassNames['code'], containerId?: string): HTMLElement;
19
+ /**
20
+ * Everything the drawing above deliberately left out.
21
+ *
22
+ * Listeners, the clipboard and the grammar load all need a live page, so they
23
+ * live here rather than in the render path. Nothing in this method is reached
24
+ * when a document is drawn to a string.
25
+ */
26
+ private static attach;
27
+ private static validate;
28
+ private static copyCodeToClipboard;
29
+ private static animateCopyButton;
30
+ static destroy(containerId: string): void;
31
+ }
32
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The nine named themes as plain CSS.
3
+ *
4
+ * The colours are the same `CODE_THEME_TOKENS` the CodeMirror theme was built
5
+ * from, so a block keeps the palette it always had; what changes is that the
6
+ * palette now arrives in a stylesheet instead of being pushed from JavaScript.
7
+ * That is what lets a code block keep its colours on a page where nothing runs.
8
+ *
9
+ * `auto` is the unscoped default rather than a scope of its own, so a block
10
+ * that names no theme paints from the host page's `--clepit-code-*` variables
11
+ * and follows whatever palette the page installed.
12
+ */
13
+ export declare const codeThemeCss: () => string;
14
+ //# sourceMappingURL=theme-css.d.ts.map
@@ -0,0 +1,27 @@
1
+ import { CodeTheme } from '../../../types';
2
+ export type CodeThemeTokens = {
3
+ background: string;
4
+ comment: string;
5
+ function: string;
6
+ gutter: string;
7
+ keyword: string;
8
+ number: string;
9
+ punctuation: string;
10
+ selection: string;
11
+ string: string;
12
+ text: string;
13
+ type: string;
14
+ };
15
+ export type NamedCodeTheme = Exclude<CodeTheme, 'auto' | 'default'>;
16
+ export declare const resolveAutoTokens: () => CodeThemeTokens;
17
+ export declare const CODE_THEME_TOKENS: Record<NamedCodeTheme, CodeThemeTokens>;
18
+ /**
19
+ * The token groups a language can be coloured into.
20
+ *
21
+ * These are the vocabulary the tokenizer emits and the colours the nine themes
22
+ * declare, kept as one list so the two cannot drift. Typed against
23
+ * `CodeThemeTokens`, so a group with no colour behind it fails to compile.
24
+ */
25
+ export declare const CODE_TOKEN_GROUPS: readonly ["keyword", "string", "number", "comment", "function", "type", "punctuation", "text"];
26
+ export type CodeTokenGroup = (typeof CODE_TOKEN_GROUPS)[number];
27
+ //# sourceMappingURL=theme-generator.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { CodeVariant } from '../../../types';
2
+ /** Broadcast on `window` when a reader picks a language, so every block sharing
3
+ * the same `syncKey` follows without the blocks knowing about each other. */
4
+ export declare const SYNC_EVENT = "clepit:code-variant-sync";
5
+ export declare const variantLabel: (variant: CodeVariant, index: number) => string;
6
+ /** A stored language the block does not offer resolves to the block's first
7
+ * variant, and the stored value is left alone — a page offering only curl and
8
+ * python must not clobber the reader's Dart preference elsewhere. */
9
+ export declare const resolveActiveIndex: (variants: CodeVariant[], stored: string | null) => number;
10
+ /** `localStorage` throws on access in Safari private mode and under a
11
+ * blocked-cookies policy; a documentation page must render regardless. */
12
+ export declare const readStoredLanguage: (syncKey: string | undefined) => string | null;
13
+ export declare const writeStoredLanguage: (syncKey: string | undefined, label: string) => void;
14
+ //# sourceMappingURL=variants.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "collapsible-input";
2
+ export declare const outputStylesKey = "collapsible-output";
3
+ export declare const sharedStyle = "\n.clepit-collapsible {\n display: block;\n}\n.clepit-collapsible > summary {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n cursor: pointer;\n font-weight: 600;\n list-style: none;\n}\n.clepit-collapsible > summary::-webkit-details-marker {\n display: none;\n}\n.clepit-collapsible > summary::before {\n content: '';\n flex: 0 0 auto;\n width: 8px;\n height: 8px;\n margin-top: 7px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 120ms ease;\n}\n.clepit-collapsible[open] > summary::before {\n transform: rotate(45deg);\n}\n.clepit-collapsible__children {\n padding-left: 22px;\n}\n.clepit-collapsible__children > * + * {\n margin-top: 8px;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-collapsible {\n display: block;\n}\n.clepit-collapsible > summary {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n cursor: pointer;\n font-weight: 600;\n list-style: none;\n}\n.clepit-collapsible > summary::-webkit-details-marker {\n display: none;\n}\n.clepit-collapsible > summary::before {\n content: '';\n flex: 0 0 auto;\n width: 8px;\n height: 8px;\n margin-top: 7px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 120ms ease;\n}\n.clepit-collapsible[open] > summary::before {\n transform: rotate(45deg);\n}\n.clepit-collapsible__children {\n padding-left: 22px;\n}\n.clepit-collapsible__children > * + * {\n margin-top: 8px;\n}\n\n.clepit-collapsible__title-input {\n border: none;\n outline: none;\n background: transparent;\n font: inherit;\n font-weight: 600;\n width: 100%;\n}\n.clepit-collapsible__add-child {\n border: none;\n background: transparent;\n cursor: pointer;\n font: inherit;\n opacity: 0.6;\n padding: 4px 0;\n}\n.clepit-collapsible__add-child:hover {\n opacity: 1;\n}\n.clepit-collapsible__child-row {\n display: flex;\n align-items: flex-start;\n gap: 4px;\n}\n.clepit-collapsible__child-row > :first-child {\n flex: 1 1 auto;\n}\n.clepit-collapsible__remove-child {\n border: none;\n background: transparent;\n cursor: pointer;\n opacity: 0.4;\n padding: 2px;\n}\n.clepit-collapsible__remove-child:hover {\n opacity: 1;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-collapsible {\n display: block;\n}\n.clepit-collapsible > summary {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n cursor: pointer;\n font-weight: 600;\n list-style: none;\n}\n.clepit-collapsible > summary::-webkit-details-marker {\n display: none;\n}\n.clepit-collapsible > summary::before {\n content: '';\n flex: 0 0 auto;\n width: 8px;\n height: 8px;\n margin-top: 7px;\n border-right: 2px solid currentColor;\n border-bottom: 2px solid currentColor;\n transform: rotate(-45deg);\n transition: transform 120ms ease;\n}\n.clepit-collapsible[open] > summary::before {\n transform: rotate(45deg);\n}\n.clepit-collapsible__children {\n padding-left: 22px;\n}\n.clepit-collapsible__children > * + * {\n margin-top: 8px;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { CollapsibleInput } from './input';
2
+ import { CollapsibleOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const CollapsibleTool: {
5
+ icon: string;
6
+ readonly input: typeof CollapsibleInput;
7
+ label: string;
8
+ readonly output: typeof CollapsibleOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { CollapsibleData, InputConfig } from '../../../types';
2
+ export declare class CollapsibleInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): CollapsibleData;
7
+ static render(containerId: string, data?: CollapsibleData, config?: InputConfig<'collapsible'>): HTMLElement;
8
+ private static renderChild;
9
+ static isEmpty(blockElement: HTMLElement): boolean;
10
+ static isEmptyData(data: CollapsibleData): boolean;
11
+ static destroy(containerId: string): void;
12
+ }
13
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { Backing, ClepitElement, DrawContext } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, CollapsibleData, OutputConfig } from '../../../types';
3
+ export declare class CollapsibleOutput {
4
+ static render(data: CollapsibleData, config?: OutputConfig, styles?: BlockStyles['collapsible'], classNames?: BlockClassNames['collapsible']): HTMLElement;
5
+ private static renderChild;
6
+ /**
7
+ * The same drawing, against the element layer, so it runs with no browser.
8
+ *
9
+ * Children go through `drawBlock`, the same table every other consumer uses,
10
+ * so a collapsible carries whatever a document can carry rather than its own
11
+ * shorter list that would quietly fall behind.
12
+ */
13
+ static draw(data: CollapsibleData, backing?: Backing, context?: DrawContext): ClepitElement | null;
14
+ private static validate;
15
+ }
16
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "collection-input";
2
+ export declare const outputStylesKey = "collection-output";
3
+ export declare const sharedStyle = "\n.clepit-collection {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-collection__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-collection__label {\n opacity: 0.7;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-collection {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-collection__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-collection__label {\n opacity: 0.7;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-collection {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n}\n.clepit-collection__icon {\n font-size: 18px;\n line-height: 1;\n}\n.clepit-collection__label {\n opacity: 0.7;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { CollectionInput } from './input';
2
+ import { CollectionOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const CollectionTool: {
5
+ icon: string;
6
+ readonly input: typeof CollectionInput;
7
+ label: string;
8
+ readonly output: typeof CollectionOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { CollectionData, InputConfig } from '../../../types';
2
+ export declare class CollectionInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ static save(element: HTMLElement): CollectionData;
6
+ static render(containerId: string, data?: CollectionData, config?: InputConfig<'collection'>): HTMLElement;
7
+ static isEmpty(blockElement: HTMLElement): boolean;
8
+ static isEmptyData(data: CollectionData): boolean;
9
+ static destroy(containerId: string): void;
10
+ }
11
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, CollectionData, OutputConfig } from '../../../types';
3
+ /** A `collection` renders as the reference it is. Rows, columns, filters and
4
+ * sort live on the server, so a public page or an export shows the pointer —
5
+ * never a stale copy of a table that has since changed. */
6
+ export declare class CollectionOutput {
7
+ static render(data: CollectionData, _config?: OutputConfig, styles?: BlockStyles['collection'], classNames?: BlockClassNames['collection']): HTMLElement;
8
+ /** The same drawing, against the element layer, so it runs with no browser. */
9
+ static draw(data: CollectionData, backing?: Backing): ClepitElement | null;
10
+ private static validate;
11
+ }
12
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "columns-input";
2
+ export declare const outputStylesKey = "columns-output";
3
+ export declare const sharedStyle = "\n.clepit-columns {\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n.clepit-columns__column {\n flex: 1 1 0;\n min-width: 0;\n}\n.clepit-columns__column > * + * {\n margin-top: 8px;\n}\n@media (max-width: 640px) {\n .clepit-columns {\n flex-direction: column;\n }\n}\n";
4
+ export declare const inputStyle = "\n.clepit-columns {\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n.clepit-columns__column {\n flex: 1 1 0;\n min-width: 0;\n}\n.clepit-columns__column > * + * {\n margin-top: 8px;\n}\n@media (max-width: 640px) {\n .clepit-columns {\n flex-direction: column;\n }\n}\n\n.clepit-columns__add-child,\n.clepit-columns__add-column {\n border: none;\n background: transparent;\n cursor: pointer;\n font: inherit;\n opacity: 0.6;\n padding: 4px 0;\n}\n.clepit-columns__add-child:hover,\n.clepit-columns__add-column:hover {\n opacity: 1;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-columns {\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n.clepit-columns__column {\n flex: 1 1 0;\n min-width: 0;\n}\n.clepit-columns__column > * + * {\n margin-top: 8px;\n}\n@media (max-width: 640px) {\n .clepit-columns {\n flex-direction: column;\n }\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ColumnsInput } from './input';
2
+ import { ColumnsOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const ColumnsTool: {
5
+ icon: string;
6
+ readonly input: typeof ColumnsInput;
7
+ label: string;
8
+ readonly output: typeof ColumnsOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ColumnsData, InputConfig } from '../../../types';
2
+ export declare class ColumnsInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ static save(element: HTMLElement): ColumnsData;
6
+ static render(containerId: string, data?: ColumnsData, config?: InputConfig<'columns'>): HTMLElement;
7
+ private static renderChild;
8
+ static isEmpty(blockElement: HTMLElement): boolean;
9
+ static isEmptyData(data: ColumnsData): boolean;
10
+ static destroy(containerId: string): void;
11
+ }
12
+ //# sourceMappingURL=input.d.ts.map