@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,11 @@
1
+ import { Backing, ClepitElement, DrawContext } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, ColumnsData, OutputConfig } from '../../../types';
3
+ export declare class ColumnsOutput {
4
+ static render(data: ColumnsData, config?: OutputConfig, styles?: BlockStyles['columns'], classNames?: BlockClassNames['columns']): HTMLElement;
5
+ private static renderChild;
6
+ /** The same drawing, against the element layer, so it runs with no browser.
7
+ * Children go through `drawBlock`, the same table every other consumer uses. */
8
+ static draw(data: ColumnsData, backing?: Backing, context?: DrawContext): ClepitElement | null;
9
+ private static validate;
10
+ }
11
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "date-input";
2
+ export declare const outputStylesKey = "date-output";
3
+ export declare const sharedStyle = "\n.clepit-date {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px;\n border-radius: 6px;\n background: rgba(127, 127, 127, 0.12);\n font-variant-numeric: tabular-nums;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-date {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px;\n border-radius: 6px;\n background: rgba(127, 127, 127, 0.12);\n font-variant-numeric: tabular-nums;\n}\n\n.clepit-date--input {\n cursor: pointer;\n border: none;\n font: inherit;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-date {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px;\n border-radius: 6px;\n background: rgba(127, 127, 127, 0.12);\n font-variant-numeric: tabular-nums;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { DateInput } from './input';
2
+ import { DateOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const DateTool: {
5
+ icon: string;
6
+ readonly input: typeof DateInput;
7
+ label: string;
8
+ readonly output: typeof DateOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { DateData, InputConfig } from '../../../types';
2
+ export declare class DateInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): DateData;
7
+ static render(containerId: string, data?: DateData, config?: InputConfig<'date'>): HTMLElement;
8
+ static isEmpty(blockElement: HTMLElement): boolean;
9
+ static isEmptyData(data: DateData): boolean;
10
+ static destroy(containerId: string): void;
11
+ }
12
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, DateData, OutputConfig } from '../../../types';
3
+ export declare function parseIsoDate(value: string): Date | null;
4
+ export declare class DateOutput {
5
+ static render(data: DateData, _config?: OutputConfig, styles?: BlockStyles['date'], classNames?: BlockClassNames['date']): HTMLElement;
6
+ /** The same drawing, against the element layer, so it runs with no browser. */
7
+ static draw(data: DateData, backing?: Backing): ClepitElement | null;
8
+ private static validate;
9
+ }
10
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-delimiter-input-styles";
2
+ export declare const inputStyle = "\n/* Delimiter block styles */\n.clepit-delimiter-container {\n margin: 0.5rem 0;\n text-align: center;\n}\n\n.clepit-delimiter {\n border: none;\n height: 2px;\n background: linear-gradient(to right, transparent, var(--clepit-border), transparent);\n margin: 20px 0;\n}\n\n.clepit-delimiter[data-variant=\"stars\"] {\n height: auto;\n background: none;\n font-size: 24px;\n letter-spacing: 8px;\n margin: 0; /* Remove margin for star variant */\n}\n\n";
3
+ export declare const outputStylesKey = "clepit-delimiter-output-styles";
4
+ export declare const outputStyle = "\n/* Output delimiter styles */\n.clepit-output-delimiter {\n margin: 2rem 0;\n text-align: center;\n}\n\n.clepit-output-delimiter[data-variant=\"stars\"] {\n font-size: 1.5rem;\n font-weight: 300;\n letter-spacing: 8px;\n margin: 0; /* Remove margin for star variant */\n}\n\n.clepit-output-delimiter hr[data-variant=\"line\"] {\n border: none;\n height: 2px;\n background: linear-gradient(to right, transparent, var(--clepit-border), transparent);\n margin: 20px 0;\n}\n\n.clepit-output-delimiter[data-variant=\"line\"] {\n margin: 0; /* Remove container margin for line variant */\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { DelimiterInput } from './input';
2
+ import { DelimiterOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const DelimiterTool: {
5
+ icon: string;
6
+ readonly input: typeof DelimiterInput;
7
+ label: string;
8
+ readonly output: typeof DelimiterOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { DelimiterData, DelimiterVariant, InputConfig } from '../../../types';
2
+ export declare class DelimiterInput {
3
+ private static eventListenersMap;
4
+ private static addEventListener;
5
+ static save(element: HTMLElement): DelimiterData;
6
+ static render(containerId: string, data?: DelimiterData, config?: InputConfig<'delimiter'>): HTMLElement;
7
+ static changeVariant(element: HTMLElement, variant: DelimiterVariant, containerId: string): void;
8
+ static isEmpty(blockElement: HTMLElement): boolean;
9
+ static isEmptyData(data: DelimiterData): boolean;
10
+ static destroy(containerId: string): void;
11
+ }
12
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, DelimiterData, OutputConfig } from '../../../types';
3
+ export declare class DelimiterOutput {
4
+ static render(data: DelimiterData, config?: OutputConfig, styles?: BlockStyles['delimiter'], classNames?: BlockClassNames['delimiter']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: DelimiterData, backing?: Backing): ClepitElement | null;
7
+ private static validate;
8
+ }
9
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "doc-card-input";
2
+ export declare const outputStylesKey = "doc-card-output";
3
+ export declare const sharedStyle = "\n.clepit-doc-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n cursor: pointer;\n color: inherit;\n text-decoration: none;\n}\n.clepit-doc-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-doc-card__icon {\n font-size: 20px;\n line-height: 1;\n}\n.clepit-doc-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-doc-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-doc-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n cursor: pointer;\n color: inherit;\n text-decoration: none;\n}\n.clepit-doc-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-doc-card__icon {\n font-size: 20px;\n line-height: 1;\n}\n.clepit-doc-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-doc-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-doc-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n cursor: pointer;\n color: inherit;\n text-decoration: none;\n}\n.clepit-doc-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-doc-card__icon {\n font-size: 20px;\n line-height: 1;\n}\n.clepit-doc-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-doc-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { DocCardInput } from './input';
2
+ import { DocCardOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const DocCardTool: {
5
+ icon: string;
6
+ readonly input: typeof DocCardInput;
7
+ label: string;
8
+ readonly output: typeof DocCardOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { DocCardData, InputConfig } from '../../../types';
2
+ export declare class DocCardInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ static save(element: HTMLElement): DocCardData;
6
+ static render(containerId: string, data?: DocCardData, config?: InputConfig<'doc_card'>): HTMLElement;
7
+ static isEmpty(blockElement: HTMLElement): boolean;
8
+ static isEmptyData(data: DocCardData): boolean;
9
+ static destroy(containerId: string): void;
10
+ }
11
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { Backing, ClepitElement, DrawContext } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, DocCardData, OutputConfig } from '../../../types';
3
+ export declare class DocCardOutput {
4
+ static render(data: DocCardData, config?: OutputConfig & {
5
+ docHref?: (pageId: string) => string;
6
+ }, styles?: BlockStyles['doc_card'], classNames?: BlockClassNames['doc_card']): HTMLElement;
7
+ /** The same drawing, against the element layer, so it runs with no browser. */
8
+ static draw(data: DocCardData, backing?: Backing, context?: DrawContext): ClepitElement | null;
9
+ private static validate;
10
+ }
11
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "embed-input";
2
+ export declare const outputStylesKey = "embed-output";
3
+ export declare const sharedStyle = "\n.clepit-embed {\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n overflow: hidden;\n}\n.clepit-embed__frame {\n display: block;\n width: 100%;\n border: 0;\n}\n.clepit-embed-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-embed-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-embed-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-embed-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-embed {\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n overflow: hidden;\n}\n.clepit-embed__frame {\n display: block;\n width: 100%;\n border: 0;\n}\n.clepit-embed-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-embed-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-embed-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-embed-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-embed {\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n overflow: hidden;\n}\n.clepit-embed__frame {\n display: block;\n width: 100%;\n border: 0;\n}\n.clepit-embed-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-embed-card:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-embed-card__title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-embed-card__description {\n opacity: 0.7;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { EmbedInput } from './input';
2
+ import { EmbedOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const EmbedTool: {
5
+ icon: string;
6
+ readonly input: typeof EmbedInput;
7
+ label: string;
8
+ readonly output: typeof EmbedOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { EmbedData, InputConfig } from '../../../types';
2
+ export declare class EmbedInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ static save(element: HTMLElement): EmbedData;
6
+ static render(containerId: string, data?: EmbedData, config?: InputConfig<'embed'>): HTMLElement;
7
+ static isEmpty(blockElement: HTMLElement): boolean;
8
+ static isEmptyData(data: EmbedData): boolean;
9
+ static destroy(containerId: string): void;
10
+ }
11
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { Backing, ClepitElement, DrawContext } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, EmbedData, OutputConfig } from '../../../types';
3
+ export declare class EmbedOutput {
4
+ static render(data: EmbedData, config?: OutputConfig & {
5
+ mapsEmbedKey?: string;
6
+ }, styles?: BlockStyles['embed'], classNames?: BlockClassNames['embed']): HTMLElement;
7
+ /**
8
+ * The same drawing, against the element layer, so it runs with no browser.
9
+ *
10
+ * `src`, `href`, `rel` and `target` are assigned as PROPERTIES by `render`.
11
+ * A string builder has no live element to hold a property, so `draw` sets the
12
+ * attributes they reflect, and the parity tests prove the two serialise the
13
+ * same. The aspect ratio moves from `style.aspectRatio` to the `style`
14
+ * attribute for the same reason.
15
+ */
16
+ static draw(data: EmbedData, backing?: Backing, context?: DrawContext): ClepitElement | null;
17
+ private static drawFrame;
18
+ private static drawCard;
19
+ private static frame;
20
+ private static card;
21
+ private static validate;
22
+ }
23
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { EmbedResolution, EmbedResolveOptions } from '../../../types';
2
+ /** Resolves a URL to what it should render as. Pure — no network, no state, so
3
+ * the editor, the public renderer, exports and the Flutter app all agree. */
4
+ export declare function resolveEmbed(raw: string, options?: EmbedResolveOptions): EmbedResolution;
5
+ //# sourceMappingURL=providers.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const inputStylesKey = "file-input";
2
+ export declare const outputStylesKey = "file-output";
3
+ export declare const sharedStyle = "\n.clepit-file {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-file:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-file__name {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-file__size {\n opacity: 0.6;\n font-size: 12px;\n}\n";
4
+ export declare const inputStyle = "\n.clepit-file {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-file:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-file__name {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-file__size {\n opacity: 0.6;\n font-size: 12px;\n}\n\n.clepit-file__upload {\n border: 1px dashed rgba(127, 127, 127, 0.5);\n background: transparent;\n cursor: pointer;\n font: inherit;\n padding: 10px 12px;\n border-radius: 8px;\n}\n";
5
+ export declare const outputStyle = "\n.clepit-file {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border: 1px solid rgba(127, 127, 127, 0.35);\n border-radius: 8px;\n color: inherit;\n text-decoration: none;\n}\n.clepit-file:hover {\n background: rgba(127, 127, 127, 0.08);\n}\n.clepit-file__name {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.clepit-file__size {\n opacity: 0.6;\n font-size: 12px;\n}\n";
6
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { FileInput } from './input';
2
+ import { FileOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const FileTool: {
5
+ icon: string;
6
+ readonly input: typeof FileInput;
7
+ label: string;
8
+ readonly output: typeof FileOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { FileData, InputConfig, UploadFunction } from '../../../types';
2
+ export declare class FileInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): FileData;
7
+ static render(uploader: UploadFunction, containerId: string, data?: FileData, config?: InputConfig<'file'>): HTMLElement;
8
+ private static renderState;
9
+ private static pick;
10
+ static isEmpty(blockElement: HTMLElement): boolean;
11
+ static isEmptyData(data: FileData): boolean;
12
+ static destroy(containerId: string): void;
13
+ }
14
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, FileData, OutputConfig } from '../../../types';
3
+ export declare function formatFileSize(bytes?: number): string;
4
+ export declare class FileOutput {
5
+ static render(data: FileData, _config?: OutputConfig, styles?: BlockStyles['file'], classNames?: BlockClassNames['file']): HTMLElement;
6
+ /** The same drawing, against the element layer, so it runs with no browser. */
7
+ static draw(data: FileData, backing?: Backing): ClepitElement | null;
8
+ private static validate;
9
+ }
10
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const outputStylesKey = "clepit-glance-output-styles";
2
+ export declare const outputStyle = "\n.clepit-glance {\n background: var(--clepit-surface);\n border: 1px solid var(--clepit-border);\n border-radius: 8px;\n padding: 12px 14px;\n}\n\n/* A variant tints the surface only. Text keeps the reading colours the rest of\n * the page uses, so a glance stays as legible as the prose around it. */\n.clepit-glance[data-variant=\"info\"] {\n background: var(--clepit-primary-bg);\n}\n\n.clepit-glance[data-variant=\"success\"] {\n background: var(--clepit-success-bg);\n}\n\n.clepit-glance[data-variant=\"warning\"] {\n background: var(--clepit-warning-bg);\n}\n\n.clepit-glance[data-variant=\"error\"] {\n background: var(--clepit-error-bg);\n}\n\n.clepit-glance-caption {\n color: var(--clepit-text-subtle);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n margin: 0 0 8px;\n text-transform: uppercase;\n}\n\n/* Labels form a single vertical rail whatever their length, so the reader scans\n * one column for the question and one for the answer. */\n.clepit-glance-rows {\n column-gap: 16px;\n display: grid;\n grid-template-columns: max-content 1fr;\n margin: 0;\n row-gap: 4px;\n}\n\n.clepit-glance-label {\n color: var(--clepit-text-subtle);\n font-size: 14px;\n}\n\n.clepit-glance-value {\n color: var(--clepit-text);\n font-size: 14px;\n margin: 0;\n}\n\n.clepit-glance-value code {\n background: var(--clepit-code-bg);\n border-radius: 4px;\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 13px;\n padding: 1px 5px;\n}\n\n.clepit-glance-value a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-glance-value a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* A single-column stack below the narrowest tablet: a max-content label column\n * squeezes the value to a few characters once the viewport is phone width. */\n@media (max-width: 600px) {\n .clepit-glance-rows {\n grid-template-columns: 1fr;\n row-gap: 2px;\n }\n\n .clepit-glance-value {\n margin: 0 0 6px;\n }\n}\n";
3
+ export declare const inputStylesKey = "clepit-glance-input-styles";
4
+ export declare const inputStyle = "\n.clepit-glance--input {\n cursor: text;\n}\n\n.clepit-glance--input .clepit-glance-label:empty::before,\n.clepit-glance--input .clepit-glance-value:empty::before {\n color: var(--clepit-text-subtle);\n content: attr(data-placeholder);\n font-style: italic;\n pointer-events: none;\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { GlanceInput } from './input';
2
+ import { GlanceOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const GlanceTool: {
5
+ icon: string;
6
+ readonly input: typeof GlanceInput;
7
+ label: string;
8
+ readonly output: typeof GlanceOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { AlertVariant, GlanceData, InputConfig } from '../../../types';
2
+ export declare class GlanceInput {
3
+ static placeholder: string;
4
+ static save(element: HTMLElement): GlanceData;
5
+ static render(containerId: string, data?: GlanceData, config?: InputConfig<'glance'>): HTMLElement;
6
+ static changeVariant(element: HTMLElement, variant: AlertVariant, containerId: string): void;
7
+ static isEmpty(blockElement: HTMLElement): boolean;
8
+ static isEmptyData(data: GlanceData): boolean;
9
+ static destroy(_containerId: string): void;
10
+ }
11
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, GlanceData, OutputConfig } from '../../../types';
3
+ /** The answers a reader most often arrives wanting, above the prose that
4
+ * explains them. A definition list rather than a table because the pairs are
5
+ * label-to-value, not rows of a record. */
6
+ export declare class GlanceOutput {
7
+ static render(data: GlanceData, _config?: OutputConfig, styles?: BlockStyles['glance'], classNames?: BlockClassNames['glance']): HTMLElement;
8
+ /**
9
+ * The same drawing, against the element layer, so it runs with no browser.
10
+ *
11
+ * Row markup goes through the backing's own sanitiser rather than
12
+ * `sanitizeHtml`, which builds a DOM to parse with and therefore cannot run
13
+ * here.
14
+ */
15
+ static draw(data: GlanceData, backing?: Backing): ClepitElement | null;
16
+ private static validate;
17
+ }
18
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const inputStylesKey = "clepit-header-input-styles";
2
+ export declare const inputStyle = "\n/* Header block styles */\n.clepit-header {\n outline: none;\n margin: 0;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0;\n margin-inline-end: 0;\n padding: 0 20px;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content {\n font-weight: bold;\n margin: 16px 0 8px 0;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h1 {\n font-size: 32px;\n margin: 0;\n color: inherit;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h2 {\n font-size: 24px;\n margin: 0;\n color: inherit;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h3 {\n font-size: 20px;\n margin: 0;\n color: inherit;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h4 {\n font-size: 18px;\n margin: 0;\n color: inherit;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h5 {\n font-size: 16px;\n margin: 0;\n color: inherit;\n}\n\n.clepit-block[data-tool=\"header\"] .clepit-block-content h6 {\n font-size: 14px;\n margin: 0;\n color: inherit;\n}\n\n/* Header placeholder styles */\n.clepit-header[data-placeholder]:empty::before {\n content: attr(data-placeholder);\n color: var(--clepit-text-subtle);\n pointer-events: none;\n font-style: italic;\n}\n\n/* Header link styles */\n.clepit-header a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-header a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* Header inline code styling */\n.clepit-header code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Header marker brush effect */\n.clepit-header 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-header 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-header-output-styles";
4
+ export declare const outputStyle = "\n/* Output header styles */\n.clepit-output-header {\n margin: 0 0 1rem 0;\n font-weight: 600;\n color: var(--clepit-text);\n}\n\n.clepit-output-header[data-level=\"1\"] {\n font-size: 2.5rem;\n line-height: 1.2;\n}\n\n.clepit-output-header[data-level=\"2\"] {\n font-size: 2rem;\n line-height: 1.3;\n}\n\n.clepit-output-header[data-level=\"3\"] {\n font-size: 1.75rem;\n line-height: 1.4;\n}\n\n.clepit-output-header[data-level=\"4\"] {\n font-size: 1.5rem;\n line-height: 1.4;\n}\n\n.clepit-output-header[data-level=\"5\"] {\n font-size: 1.25rem;\n line-height: 1.4;\n}\n\n.clepit-output-header[data-level=\"6\"] {\n font-size: 1rem;\n line-height: 1.4;\n}\n\n/* Output header inline code styling */\n.clepit-output-header code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Output header marker brush effect */\n.clepit-output-header 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-header 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\n/* Output header link styles */\n.clepit-output-header a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-output-header a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n .clepit-output-header[data-level=\"1\"] {\n font-size: 2rem;\n }\n\n .clepit-output-header[data-level=\"2\"] {\n font-size: 1.75rem;\n }\n\n .clepit-output-header[data-level=\"3\"] {\n font-size: 1.5rem;\n }\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { HeaderInput } from './input';
2
+ import { HeaderOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const HeaderTool: {
5
+ icon: string;
6
+ readonly input: typeof HeaderInput;
7
+ label: string;
8
+ readonly output: typeof HeaderOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { HeaderData, HeaderLevel, InputConfig } from '../../../types';
2
+ export declare class HeaderInput {
3
+ static placeholder: string;
4
+ private static eventListenersMap;
5
+ private static addEventListener;
6
+ static save(element: HTMLElement): HeaderData;
7
+ static render(containerId: string, data?: HeaderData, config?: InputConfig<'header'>): HTMLElement;
8
+ static changeLevel(element: HTMLElement, level: HeaderLevel, containerId: string): void;
9
+ static isEmpty(blockElement: HTMLElement): boolean;
10
+ static isEmptyData(data: HeaderData): 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 { BlockClassNames, BlockStyles, HeaderData, OutputConfig } from '../../../types';
3
+ export declare class HeaderOutput {
4
+ static render(data: HeaderData, config?: OutputConfig, styles?: BlockStyles['header'], classNames?: BlockClassNames['header']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: HeaderData, 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-image-input-styles";
2
+ export declare const inputStyle: string;
3
+ export declare const outputStylesKey = "clepit-image-output-styles";
4
+ export declare const outputStyle = "\n/* Output image styles */\n.clepit-output-image-container {\n margin: 1rem 0;\n text-align: center;\n}\n\n.clepit-output-image {\n max-width: 100%;\n height: auto;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.clepit-output-image-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/* Image wrapper positioning */\n.clepit-image-wrapper {\n position: relative;\n cursor: pointer;\n display: flex;\n margin-bottom: 10px;\n}\n.clepit-output-image-wrapper--left {\n justify-content: flex-start;\n}\n\n.clepit-output-image-wrapper--center {\n justify-content: center;\n}\n\n.clepit-output-image-wrapper--right {\n justify-content: flex-end;\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ImageInput } from './input';
2
+ import { ImageOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const ImageTool: {
5
+ icon: string;
6
+ readonly input: typeof ImageInput;
7
+ label: string;
8
+ readonly output: typeof ImageOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ import { Alignment, ImageData, InputConfig, UploadFunction } from '../../../types';
2
+ export declare class ImageInput {
3
+ static placeholder: string;
4
+ private static validTypes;
5
+ private static eventListenersMap;
6
+ private static addEventListener;
7
+ static save(element: HTMLElement): ImageData;
8
+ static render(uploadFunction: UploadFunction, containerId: string, data?: ImageData, config?: InputConfig<'image'>): HTMLElement;
9
+ private static renderImage;
10
+ private static renderDropArea;
11
+ private static handleFileDrop;
12
+ private static handleFileSelect;
13
+ private static isValidImageFile;
14
+ private static processImageFile;
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: ImageData): 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 { BlockClassNames, BlockStyles, ImageData, OutputConfig } from '../../../types';
3
+ export declare class ImageOutput {
4
+ static render(data: ImageData, config?: OutputConfig, styles?: BlockStyles['image'], classNames?: BlockClassNames['image']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: ImageData, 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-list-input-styles";
2
+ export declare const inputStyle = "\n/* List block styles */\n.clepit-list {\n margin: 0;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0;\n margin-inline-end: 0;\n padding: 0 16px;\n}\n\n.clepit-list-item {\n margin: 0;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0;\n margin-inline-end: 0;\n padding: 0;\n}\n\n.clepit-block[data-tool=\"list\"] .clepit-block-content {\n padding-left: 40px;\n}\n\n.clepit-block[data-tool=\"list\"] .clepit-block-content ul,\n.clepit-block[data-tool=\"list\"] .clepit-block-content ol {\n margin: 0;\n padding-left: 20px;\n}\n\n.clepit-block[data-tool=\"list\"] .clepit-block-content li {\n margin: 4px 0;\n}\n\n/* List item placeholder styles */\n.clepit-list-item[data-placeholder]:empty::before {\n content: attr(data-placeholder);\n color: var(--clepit-text-subtle);\n pointer-events: none;\n font-style: italic;\n}\n\n/* List item link styles */\n.clepit-list-item a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-list-item a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* List item inline code styling */\n.clepit-list-item code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* List item marker brush effect */\n.clepit-list-item 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-list-item 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-list-output-styles";
4
+ export declare const outputStyle = "\n/* Output list styles */\n.clepit-output-list {\n margin: 0 0 1rem 0;\n padding-left: 2rem;\n}\n\n.clepit-output-list-item {\n margin: 0.5rem 0;\n line-height: 1.6;\n}\n\n/* Output list link styles */\n.clepit-output-list a {\n color: var(--clepit-primary);\n text-decoration: none;\n cursor: pointer;\n transition: color 0.2s ease;\n}\n\n.clepit-output-list a:hover {\n color: var(--clepit-primary-hover);\n text-decoration: none;\n}\n\n/* Output list inline code styling */\n.clepit-output-list li code {\n background: var(--clepit-error-bg);\n color: var(--clepit-error);\n padding: 0 4px;\n border-radius: 4px;\n}\n\n/* Output list marker brush effect */\n.clepit-output-list li 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-list li 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\n/* Responsive Design */\n@media (max-width: 768px) {\n .clepit-output-list {\n padding-left: 1.5rem;\n }\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { ListInput } from './input';
2
+ import { ListOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const ListTool: {
5
+ icon: string;
6
+ readonly input: typeof ListInput;
7
+ label: string;
8
+ readonly output: typeof ListOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { InputConfig, ListData, ListType } from '../../../types';
2
+ export declare class ListInput {
3
+ static placeholder: string;
4
+ static defaultType: ListType;
5
+ private static eventListenersMap;
6
+ private static addEventListener;
7
+ static save(element: HTMLElement): ListData;
8
+ static render(containerId: string, data?: ListData, config?: InputConfig<'list'>): HTMLElement;
9
+ private static createAndAppendListItem;
10
+ static changeType(list: HTMLElement, type: ListType, containerId: string): void;
11
+ private static cleanupEmptyItems;
12
+ static isEmpty(blockElement: HTMLElement): boolean;
13
+ static isEmptyData(data: ListData): boolean;
14
+ static destroy(containerId: string): void;
15
+ }
16
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { BlockClassNames, BlockStyles, ListData, OutputConfig } from '../../../types';
3
+ export declare class ListOutput {
4
+ static render(data: ListData, config?: OutputConfig, styles?: BlockStyles['list'], classNames?: BlockClassNames['list']): HTMLElement;
5
+ /** The same drawing, against the element layer, so it runs with no browser. */
6
+ static draw(data: ListData, backing?: Backing): ClepitElement | null;
7
+ private static validate;
8
+ }
9
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const outputStylesKey = "clepit-openapi-output-styles";
2
+ export declare const outputStyle = "\n.clepit-openapi {\n display: flex;\n flex-direction: column;\n gap: 40px;\n margin: 16px 0;\n}\n\n/* Groups and operations are separated by rhythm, never by rules \u2014 the same\n * house style the tables follow. */\n.clepit-openapi-group {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n/* An eyebrow label rather than a heading, matching the uppercase group headings\n * in the docs sidebar so the reference echoes the nav \u2014 approved 2026-08-06\n * (direction 2B, \"Eyebrow\"). */\n.clepit-openapi-group-title {\n color: var(--clepit-text-subtle);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n margin: 0;\n text-transform: uppercase;\n}\n\n.clepit-openapi-operation {\n border: 1px solid var(--clepit-border);\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n/* The head is a tinted strip so an operation reads as one bounded unit in a\n * page of a dozen \u2014 approved 2026-08-06 (direction 1B, \"Panel\"). */\n.clepit-openapi-operation-head {\n align-items: center;\n background: color-mix(in oklab, var(--clepit-text) 4%, transparent);\n border-bottom: 1px solid var(--clepit-border);\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n padding: 10px 14px;\n}\n\n.clepit-openapi-operation-body {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px;\n}\n\n.clepit-openapi-method {\n border-radius: 4px;\n color: var(--clepit-bg);\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.04em;\n padding: 3px 8px;\n}\n\n.clepit-openapi-method[data-method=\"GET\"] { background: var(--clepit-success); }\n.clepit-openapi-method[data-method=\"POST\"],\n.clepit-openapi-method[data-method=\"PUT\"],\n.clepit-openapi-method[data-method=\"PATCH\"] { background: var(--clepit-primary); }\n.clepit-openapi-method[data-method=\"DELETE\"] { background: var(--clepit-error); }\n\n.clepit-openapi-path {\n color: var(--clepit-text);\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 14px;\n}\n\n.clepit-openapi-host {\n color: var(--clepit-text-subtle);\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 12px;\n margin-left: auto;\n}\n\n.clepit-openapi-summary {\n color: var(--clepit-text);\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.clepit-openapi-description {\n color: var(--clepit-text-muted);\n margin: 0;\n}\n\n.clepit-openapi-section-title {\n color: var(--clepit-text-subtle);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n margin: 4px 0 0;\n text-transform: uppercase;\n}\n\n/* A table has no scroll surface of its own \u2014 a cell the house style cannot\n * break (a long host URL) would otherwise force the table, and every ancestor\n * up to the page itself, wider than the viewport. */\n.clepit-openapi-table-scroll {\n max-width: 100%;\n overflow-x: auto;\n border: 1px solid var(--clepit-border);\n border-radius: 8px;\n box-shadow: 0 1px 2px rgba(0,0,0,0.04);\n}\n\n.clepit-openapi-table {\n border-collapse: collapse;\n font-size: 14px;\n width: 100%;\n}\n\n.clepit-openapi-table th {\n background: var(--clepit-surface);\n border-bottom: 1px solid var(--clepit-border);\n color: var(--clepit-text-subtle);\n font-weight: 600;\n padding: 6px 8px;\n text-align: left;\n}\n\n/* House style: no horizontal dividers between rows. Zebra striping is what\n * separates them instead. */\n.clepit-openapi-table td {\n color: var(--clepit-text);\n padding: 7px 8px;\n vertical-align: top;\n}\n\n.clepit-openapi-table tr:nth-child(even) td {\n background: var(--clepit-surface);\n}\n\n.clepit-openapi-name {\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n overflow-wrap: anywhere;\n}\n\n.clepit-openapi-type {\n color: var(--clepit-text-muted);\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n}\n\n.clepit-openapi-required {\n color: var(--clepit-error);\n font-size: 12px;\n}\n\n.clepit-openapi-badge {\n background: var(--clepit-primary-bg);\n border-radius: 4px;\n color: var(--clepit-primary);\n font-size: 12px;\n padding: 2px 8px;\n}\n\n.clepit-openapi-status {\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-weight: 600;\n}\n\n.clepit-openapi-status[data-kind=\"success\"] { color: var(--clepit-success); }\n.clepit-openapi-status[data-kind=\"client\"] { color: var(--clepit-warning); }\n.clepit-openapi-status[data-kind=\"server\"] { color: var(--clepit-error); }\n\n/* One response at a time behind a status tab strip \u2014 approved 2026-08-06\n * (direction 1B, \"Tabbed\"). */\n.clepit-openapi-responses {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.clepit-openapi-response-tabs {\n border-bottom: 1px solid var(--clepit-border);\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n margin-bottom: 4px;\n}\n\n.clepit-openapi-response-tab {\n background: none;\n border: 0;\n border-bottom: 2px solid transparent;\n color: var(--clepit-text-muted);\n cursor: pointer;\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 12px;\n margin-bottom: -1px;\n padding: 6px 0;\n}\n\n.clepit-openapi-response-tab[aria-selected=\"true\"] {\n border-bottom-color: var(--clepit-primary);\n color: var(--clepit-text);\n font-weight: 600;\n}\n\n.clepit-openapi-response-tab:focus-visible {\n outline: 2px solid var(--clepit-primary);\n outline-offset: 2px;\n}\n\n.clepit-openapi-response-description {\n color: var(--clepit-text-muted);\n margin: 0;\n}\n\n/* Tabs hide three quarters of the contract from a printed page, so print gets\n * every response expanded and the strip removed. */\n@media print {\n .clepit-openapi-response-tabs { display: none; }\n .clepit-openapi-response { display: block !important; }\n .clepit-openapi-response + .clepit-openapi-response { margin-top: 10px; }\n}\n\n.clepit-openapi-servers {\n color: var(--clepit-text-muted);\n font-size: 14px;\n margin: 0;\n}\n";
3
+ export declare const inputStylesKey = "clepit-openapi-input-styles";
4
+ export declare const inputStyle = "\n.clepit-openapi-input {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.clepit-openapi__source {\n background: var(--clepit-code-bg);\n border: 1px solid var(--clepit-code-border);\n border-radius: 6px;\n color: var(--clepit-code-text);\n font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;\n font-size: 13px;\n max-height: 240px;\n overflow: auto;\n padding: 12px;\n white-space: pre-wrap;\n}\n\n.clepit-openapi__source[data-placeholder]:empty::before {\n color: var(--clepit-text-subtle);\n content: attr(data-placeholder);\n font-style: italic;\n pointer-events: none;\n}\n";
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { OpenApiInput } from './input';
2
+ import { OpenApiOutput } from './output';
3
+ import { ToolType } from '../../../types';
4
+ export declare const OpenApiTool: {
5
+ icon: string;
6
+ readonly input: typeof OpenApiInput;
7
+ label: string;
8
+ readonly output: typeof OpenApiOutput;
9
+ shortcut: string;
10
+ testId: string;
11
+ type: ToolType;
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { InputConfig, OpenApiData } from '../../../types';
2
+ export declare class OpenApiInput {
3
+ static placeholder: string;
4
+ private static dataMap;
5
+ static render(_containerId: string, data?: OpenApiData, _config?: InputConfig<'openapi'>): HTMLElement;
6
+ static save(element: HTMLElement): OpenApiData;
7
+ static isEmpty(blockElement: HTMLElement): boolean;
8
+ static isEmptyData(data: OpenApiData): boolean;
9
+ static destroy(_containerId: string): void;
10
+ }
11
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { Backing, ClepitElement } from '../../../core/element';
2
+ import { SchemaNode } from './schema';
3
+ import { BlockClassNames, BlockStyles, OpenApiData, OutputConfig } from '../../../types';
4
+ /** A request payload reads as the JSON a caller has to send, not as a list of
5
+ * field names. Types stand in for values, and an optional key carries `?` so the
6
+ * shape stays lossless about what may be omitted. */
7
+ export declare const toJsonShape: (node: SchemaNode, depth?: number) => unknown;
8
+ export declare class OpenApiOutput {
9
+ /** The whole reference as markup, with no browser involved. Every code sample
10
+ * inside it draws through the same layer, so a published API reference and
11
+ * the editor show the same document. */
12
+ static draw(data: OpenApiData, backing?: Backing): ClepitElement | null;
13
+ static render(data: OpenApiData, _config?: OutputConfig, styles?: BlockStyles['openapi'], classNames?: BlockClassNames['openapi']): HTMLElement;
14
+ /**
15
+ * The response tabs become switchable.
16
+ *
17
+ * The drawing already opens on the first response, so a page that never runs
18
+ * this is readable rather than blank; this only adds the ability to move
19
+ * between them.
20
+ */
21
+ private static attach;
22
+ private static validate;
23
+ }
24
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1,17 @@
1
+ export type SchemaNode = {
2
+ children: SchemaNode[];
3
+ cyclic: boolean;
4
+ description?: string;
5
+ enum?: string[];
6
+ format?: string;
7
+ name?: string;
8
+ nullable: boolean;
9
+ ref?: string;
10
+ required: boolean;
11
+ type: string;
12
+ };
13
+ /** Resolves `$ref`s against `components.schemas` and flattens composition into
14
+ * one renderable tree. Cycles terminate — a self-referencing schema renders a
15
+ * reference to itself rather than recursing. */
16
+ export declare const toSchemaTree: (schema: unknown, schemas: Record<string, unknown>) => SchemaNode;
17
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { OpenApiOperation } from './spec';
2
+ import { CodeLanguage, CodeVariant } from '../../../types';
3
+ export declare const SNIPPET_LANGUAGES: CodeLanguage[];
4
+ export declare const buildSnippets: (operation: OpenApiOperation, server: string, languages: CodeLanguage[]) => CodeVariant[];
5
+ //# sourceMappingURL=snippets.d.ts.map