@bendyline/squisq 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/{ContentContainer-DNx460y8.d.ts → ContentContainer-BXUlIf18.d.ts} +6 -2
- package/dist/{Doc-BsMkmzH8.d.ts → Doc-BBVGq1_9.d.ts} +94 -15
- package/dist/{ImageEditDoc-DvoeHMP9.d.ts → ImageEditDoc-FuyGtt6o.d.ts} +1 -1
- package/dist/{chunk-KZNXZ5SM.js → chunk-6ATE2PSM.js} +18 -7
- package/dist/chunk-6ATE2PSM.js.map +1 -0
- package/dist/{chunk-7MQGNR76.js → chunk-A4O7GIWE.js} +2 -27
- package/dist/chunk-A4O7GIWE.js.map +1 -0
- package/dist/chunk-ET53IIEP.js +1 -0
- package/dist/chunk-ET53IIEP.js.map +1 -0
- package/dist/{chunk-OKJOQXK4.js → chunk-HWVFJAAH.js} +38 -2
- package/dist/chunk-HWVFJAAH.js.map +1 -0
- package/dist/{chunk-2TMAWB4Y.js → chunk-IMSCRLLV.js} +1 -1
- package/dist/chunk-IMSCRLLV.js.map +1 -0
- package/dist/{chunk-4AKUQPEE.js → chunk-KKNUBQ6Y.js} +1 -1
- package/dist/chunk-KKNUBQ6Y.js.map +1 -0
- package/dist/{chunk-TVSGLUID.js → chunk-LDQ2HJIX.js} +3 -3
- package/dist/{chunk-4ZFRZBU2.js → chunk-LH7I6SH7.js} +777 -151
- package/dist/chunk-LH7I6SH7.js.map +1 -0
- package/dist/{chunk-K32VJONL.js → chunk-T5UK6YOB.js} +41 -2
- package/dist/chunk-T5UK6YOB.js.map +1 -0
- package/dist/{chunk-OH43RPTP.js → chunk-TEEEILMP.js} +12 -2
- package/dist/chunk-TEEEILMP.js.map +1 -0
- package/dist/{chunk-FR2RBTKO.js → chunk-TQWLI6S2.js} +93 -27
- package/dist/chunk-TQWLI6S2.js.map +1 -0
- package/dist/{chunk-LRCV7N7F.js → chunk-UY7KGQ5R.js} +2 -2
- package/dist/{chunk-3E5F2XMR.js → chunk-VWUFZ6ZG.js} +29 -2
- package/dist/chunk-VWUFZ6ZG.js.map +1 -0
- package/dist/doc/index.d.ts +4 -4
- package/dist/doc/index.js +16 -7
- package/dist/generate/index.d.ts +2 -80
- package/dist/generate/index.js +2 -7
- package/dist/imageEdit/index.d.ts +4 -4
- package/dist/index.d.ts +8 -8
- package/dist/index.js +32 -23
- package/dist/jsonForm/index.d.ts +42 -1
- package/dist/jsonForm/index.js +9 -1
- package/dist/markdown/index.d.ts +18 -2
- package/dist/markdown/index.js +5 -3
- package/dist/recommend/index.js +2 -2
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.js +3 -5
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +1 -1
- package/dist/story/index.d.ts +125 -11
- package/dist/story/index.js +16 -7
- package/dist/{themeLibrary-DQQKuRMx.d.ts → themeLibrary-CehcJhzz.d.ts} +1 -1
- package/dist/timing/index.js +3 -5
- package/dist/transform/index.d.ts +2 -2
- package/dist/transform/index.js +3 -3
- package/dist/versions/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/__tests__/contentExtractor.test.ts +60 -0
- package/src/__tests__/coverBlock.test.ts +46 -1
- package/src/__tests__/customTemplateSample.test.ts +63 -2
- package/src/__tests__/customTemplatesFrontmatter.test.ts +31 -0
- package/src/__tests__/customThemesFrontmatter.test.ts +27 -0
- package/src/__tests__/inputDescriptors.test.ts +162 -0
- package/src/__tests__/jsonForm.tokens.test.ts +84 -0
- package/src/__tests__/markdown.test.ts +64 -0
- package/src/__tests__/markdownSanitize.test.ts +15 -0
- package/src/__tests__/markdownToDoc.test.ts +168 -0
- package/src/__tests__/mediaAnnotations.test.ts +27 -0
- package/src/__tests__/structuredData.test.ts +73 -3
- package/src/__tests__/templateMetadata.test.ts +11 -1
- package/src/__tests__/templates.test.ts +112 -0
- package/src/__tests__/validateDoc.test.ts +160 -0
- package/src/doc/annotationBlocks.ts +117 -0
- package/src/doc/customTemplatesFrontmatter.ts +7 -1
- package/src/doc/customThemesFrontmatter.ts +6 -1
- package/src/doc/docToMarkdown.ts +31 -1
- package/src/doc/getLayers.ts +11 -2
- package/src/doc/index.ts +12 -0
- package/src/doc/markdownToDoc.ts +80 -3
- package/src/doc/mediaAnnotations.ts +15 -33
- package/src/doc/standaloneAnnotation.ts +58 -0
- package/src/doc/structuredData.ts +92 -21
- package/src/doc/templates/__tests__/customTemplate.test.ts +21 -2
- package/src/doc/templates/comparisonBar.ts +8 -1
- package/src/doc/templates/coverBlock.ts +29 -2
- package/src/doc/templates/customTemplate.ts +10 -4
- package/src/doc/templates/factCard.ts +4 -2
- package/src/doc/templates/imageWithCaption.ts +10 -8
- package/src/doc/templates/index.ts +12 -2
- package/src/doc/templates/inputDescriptors.ts +432 -0
- package/src/doc/templates/photoGrid.ts +16 -39
- package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +267 -1
- package/src/doc/templates/tokens/resolveTokens.ts +0 -0
- package/src/doc/templates/videoWithCaption.ts +15 -14
- package/src/doc/utils/nearest.ts +59 -0
- package/src/doc/validate.ts +153 -54
- package/src/generate/contentExtractor.ts +148 -35
- package/src/generate/index.ts +0 -3
- package/src/jsonForm/index.ts +2 -0
- package/src/jsonForm/tokens.ts +78 -0
- package/src/markdown/annotationCoercion.ts +1 -1
- package/src/markdown/attrTokens.ts +19 -0
- package/src/markdown/index.ts +2 -1
- package/src/markdown/sanitize.ts +22 -2
- package/src/markdown/stringify.ts +12 -3
- package/src/markdown/utils.ts +62 -1
- package/src/schemas/CustomTemplates.ts +56 -4
- package/src/schemas/Doc.ts +39 -41
- package/src/schemas/themeCompile.ts +1 -1
- package/src/storage/ContentContainer.ts +6 -2
- package/src/transform/types.ts +1 -1
- package/dist/chunk-2TMAWB4Y.js.map +0 -1
- package/dist/chunk-3E5F2XMR.js.map +0 -1
- package/dist/chunk-4AKUQPEE.js.map +0 -1
- package/dist/chunk-4X3JQXNM.js +0 -35
- package/dist/chunk-4X3JQXNM.js.map +0 -1
- package/dist/chunk-4ZFRZBU2.js.map +0 -1
- package/dist/chunk-7MQGNR76.js.map +0 -1
- package/dist/chunk-FBKP5CAO.js +0 -145
- package/dist/chunk-FBKP5CAO.js.map +0 -1
- package/dist/chunk-FR2RBTKO.js.map +0 -1
- package/dist/chunk-K32VJONL.js.map +0 -1
- package/dist/chunk-KZNXZ5SM.js.map +0 -1
- package/dist/chunk-OH43RPTP.js.map +0 -1
- package/dist/chunk-OKJOQXK4.js.map +0 -1
- package/src/__tests__/slideshowGenerator.test.ts +0 -128
- package/src/generate/slideshowGenerator.ts +0 -280
- /package/dist/{chunk-TVSGLUID.js.map → chunk-LDQ2HJIX.js.map} +0 -0
- /package/dist/{chunk-LRCV7N7F.js.map → chunk-UY7KGQ5R.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import "./chunk-ZLQKNOZQ.js";
|
|
2
|
-
import
|
|
3
|
-
generateSlideshow
|
|
4
|
-
} from "./chunk-FBKP5CAO.js";
|
|
2
|
+
import "./chunk-ET53IIEP.js";
|
|
5
3
|
import {
|
|
6
4
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
7
5
|
analyzeBlocks,
|
|
@@ -12,12 +10,12 @@ import {
|
|
|
12
10
|
registerTransformStyle,
|
|
13
11
|
resolveTransformStyle,
|
|
14
12
|
unregisterTransformStyle
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LDQ2HJIX.js";
|
|
16
14
|
import {
|
|
17
15
|
extractContent,
|
|
18
16
|
mapElementToBlock,
|
|
19
17
|
stripMarkdown
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TQWLI6S2.js";
|
|
21
19
|
import {
|
|
22
20
|
DocumentVersionManager,
|
|
23
21
|
VERSIONS_PREFIX,
|
|
@@ -33,6 +31,7 @@ import {
|
|
|
33
31
|
} from "./chunk-VLJJHDAC.js";
|
|
34
32
|
import {
|
|
35
33
|
arrayItemKind,
|
|
34
|
+
buildJsonFormTokens,
|
|
36
35
|
chooseControl,
|
|
37
36
|
evaluateWhen,
|
|
38
37
|
getByPointer,
|
|
@@ -40,10 +39,11 @@ import {
|
|
|
40
39
|
pointerSegments,
|
|
41
40
|
primaryType,
|
|
42
41
|
resolveFlag,
|
|
42
|
+
resolveJsonFormTheme,
|
|
43
43
|
resolveRef,
|
|
44
44
|
setByPointer,
|
|
45
45
|
toPointer
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-T5UK6YOB.js";
|
|
47
47
|
import {
|
|
48
48
|
IMAGE_EDIT_ASSETS_PREFIX,
|
|
49
49
|
IMAGE_EDIT_DEFAULT_BASENAME,
|
|
@@ -95,9 +95,8 @@ import {
|
|
|
95
95
|
getSegmentAtTime,
|
|
96
96
|
parseTheme,
|
|
97
97
|
resolveMediaSchedule,
|
|
98
|
-
serializeTheme
|
|
99
|
-
|
|
100
|
-
} from "./chunk-7MQGNR76.js";
|
|
98
|
+
serializeTheme
|
|
99
|
+
} from "./chunk-A4O7GIWE.js";
|
|
101
100
|
import {
|
|
102
101
|
calculateBearing,
|
|
103
102
|
decodeGeohash,
|
|
@@ -111,14 +110,17 @@ import {
|
|
|
111
110
|
haversineDistance
|
|
112
111
|
} from "./chunk-Q3ROPT5H.js";
|
|
113
112
|
import {
|
|
113
|
+
BASE_INPUT_DESCRIPTORS,
|
|
114
114
|
CONTAINER_TEMPLATES,
|
|
115
115
|
DEFAULT_LAYOUT,
|
|
116
116
|
SHAPE_NAMES,
|
|
117
117
|
TEMPLATE_ALIASES,
|
|
118
|
+
TEMPLATE_INPUT_DESCRIPTORS,
|
|
118
119
|
TEMPLATE_METADATA,
|
|
119
120
|
adjustY,
|
|
120
121
|
applyRenderStyleToLayers,
|
|
121
122
|
buildRegistry,
|
|
123
|
+
coerceTemplateParams,
|
|
122
124
|
comparisonBar,
|
|
123
125
|
computeDiagramLayout,
|
|
124
126
|
computeDrawingLayout,
|
|
@@ -174,6 +176,7 @@ import {
|
|
|
174
176
|
isShapeName,
|
|
175
177
|
layoutBlock,
|
|
176
178
|
leftFeature,
|
|
179
|
+
lintTemplateParams,
|
|
177
180
|
listBlock,
|
|
178
181
|
mapBlock,
|
|
179
182
|
markdownToDoc,
|
|
@@ -185,6 +188,7 @@ import {
|
|
|
185
188
|
quoteBlock,
|
|
186
189
|
readCustomTemplatesFromFrontmatter,
|
|
187
190
|
readCustomThemesFromFrontmatter,
|
|
191
|
+
replaceDataFence,
|
|
188
192
|
resolveAudioMapping,
|
|
189
193
|
resolveColorScheme,
|
|
190
194
|
resolvePersistentLayers,
|
|
@@ -212,11 +216,11 @@ import {
|
|
|
212
216
|
wrapWithPersistentLayers,
|
|
213
217
|
writeCustomTemplatesToFrontmatter,
|
|
214
218
|
writeCustomThemesToFrontmatter
|
|
215
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-LH7I6SH7.js";
|
|
216
220
|
import {
|
|
217
221
|
profileBlockContents,
|
|
218
222
|
recommendTemplatesForBlock
|
|
219
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-UY7KGQ5R.js";
|
|
220
224
|
import "./chunk-V543AI2F.js";
|
|
221
225
|
import {
|
|
222
226
|
SeededRandom,
|
|
@@ -267,7 +271,7 @@ import {
|
|
|
267
271
|
unregisterTheme,
|
|
268
272
|
validateTheme,
|
|
269
273
|
withAlpha
|
|
270
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-KKNUBQ6Y.js";
|
|
271
275
|
import {
|
|
272
276
|
DEFAULT_DOC_FONT,
|
|
273
277
|
DEFAULT_TITLE_FONT,
|
|
@@ -294,12 +298,12 @@ import {
|
|
|
294
298
|
createMediaProviderFromContainer,
|
|
295
299
|
findDocumentPath,
|
|
296
300
|
scopeContainer
|
|
297
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-IMSCRLLV.js";
|
|
298
302
|
import {
|
|
299
303
|
sanitizeHtmlNodes,
|
|
300
304
|
sanitizeUrl,
|
|
301
305
|
stringifyMarkdown
|
|
302
|
-
} from "./chunk-
|
|
306
|
+
} from "./chunk-6ATE2PSM.js";
|
|
303
307
|
import {
|
|
304
308
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
305
309
|
KNOWN_BLOCK_META_KEYS,
|
|
@@ -316,12 +320,13 @@ import {
|
|
|
316
320
|
toMdast,
|
|
317
321
|
tokenizeAttrTokens,
|
|
318
322
|
unquoteAttrValue
|
|
319
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-TEEEILMP.js";
|
|
320
324
|
import {
|
|
321
325
|
countNodes,
|
|
322
326
|
createDocument,
|
|
323
327
|
extractPlainText,
|
|
324
328
|
findNodesByType,
|
|
329
|
+
formatBlockScalar,
|
|
325
330
|
getChildren,
|
|
326
331
|
inferDocumentTitle,
|
|
327
332
|
parseFrontmatter,
|
|
@@ -331,7 +336,7 @@ import {
|
|
|
331
336
|
setFrontmatterValues,
|
|
332
337
|
stringifyHtmlNodes,
|
|
333
338
|
walkMarkdownTree
|
|
334
|
-
} from "./chunk-
|
|
339
|
+
} from "./chunk-HWVFJAAH.js";
|
|
335
340
|
import {
|
|
336
341
|
ICONS,
|
|
337
342
|
canonicalIconToken,
|
|
@@ -351,20 +356,19 @@ import {
|
|
|
351
356
|
resolveTransitionDuration
|
|
352
357
|
} from "./chunk-QE7TWGVT.js";
|
|
353
358
|
import "./chunk-DNJKBAI7.js";
|
|
354
|
-
import {
|
|
355
|
-
estimateNarrationTime,
|
|
356
|
-
estimateReadingTime
|
|
357
|
-
} from "./chunk-4X3JQXNM.js";
|
|
358
359
|
import {
|
|
359
360
|
DEFAULT_WORDS_PER_SECOND,
|
|
360
361
|
calculatePrefixDuration,
|
|
361
362
|
countSpokenWords,
|
|
362
363
|
estimateNarrationDuration,
|
|
364
|
+
estimateNarrationTime,
|
|
365
|
+
estimateReadingTime,
|
|
363
366
|
estimateSpokenWordCount,
|
|
364
367
|
estimateTimeFromText
|
|
365
|
-
} from "./chunk-
|
|
368
|
+
} from "./chunk-VWUFZ6ZG.js";
|
|
366
369
|
export {
|
|
367
370
|
AVAILABLE_FONT_STACKS,
|
|
371
|
+
BASE_INPUT_DESCRIPTORS,
|
|
368
372
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
369
373
|
CONTAINER_TEMPLATES,
|
|
370
374
|
DARK_SURFACE,
|
|
@@ -398,6 +402,7 @@ export {
|
|
|
398
402
|
ScopedContentContainer,
|
|
399
403
|
SeededRandom,
|
|
400
404
|
TEMPLATE_ALIASES,
|
|
405
|
+
TEMPLATE_INPUT_DESCRIPTORS,
|
|
401
406
|
TEMPLATE_METADATA,
|
|
402
407
|
THEMES,
|
|
403
408
|
THEME_SCHEMA_VERSION,
|
|
@@ -416,6 +421,7 @@ export {
|
|
|
416
421
|
assertTheme,
|
|
417
422
|
buildGoogleFontsUrl,
|
|
418
423
|
buildImageEditVersionPath,
|
|
424
|
+
buildJsonFormTokens,
|
|
419
425
|
buildRegistry,
|
|
420
426
|
buildSvgString,
|
|
421
427
|
buildVersionPath,
|
|
@@ -429,6 +435,7 @@ export {
|
|
|
429
435
|
clipPoint,
|
|
430
436
|
coalesceImageEditVersions,
|
|
431
437
|
coalesceVersions,
|
|
438
|
+
coerceTemplateParams,
|
|
432
439
|
comparisonBar,
|
|
433
440
|
compileTheme,
|
|
434
441
|
computeDiagramLayout,
|
|
@@ -489,10 +496,10 @@ export {
|
|
|
489
496
|
flattenBlocks,
|
|
490
497
|
flattenRenderableBlocks,
|
|
491
498
|
fontStack,
|
|
499
|
+
formatBlockScalar,
|
|
492
500
|
formatVersionTimestamp,
|
|
493
501
|
fromMdast,
|
|
494
502
|
fullBleedQuote,
|
|
495
|
-
generateSlideshow,
|
|
496
503
|
geohashOverlapsBounds,
|
|
497
504
|
geohashToHierarchicalPath,
|
|
498
505
|
getAccentLayout,
|
|
@@ -554,6 +561,7 @@ export {
|
|
|
554
561
|
scaledFontSize as layoutScaledFontSize,
|
|
555
562
|
leftFeature,
|
|
556
563
|
lineStyleDasharray,
|
|
564
|
+
lintTemplateParams,
|
|
557
565
|
listBlock,
|
|
558
566
|
listImageEditVersions,
|
|
559
567
|
listVersions,
|
|
@@ -607,12 +615,14 @@ export {
|
|
|
607
615
|
relativeLuminance,
|
|
608
616
|
removeLayer,
|
|
609
617
|
reorderLayer,
|
|
618
|
+
replaceDataFence,
|
|
610
619
|
resolveAudioMapping,
|
|
611
620
|
resolveBlockTransition,
|
|
612
621
|
resolveColorScheme,
|
|
613
622
|
resolveFlag,
|
|
614
623
|
resolveFontFamily,
|
|
615
624
|
resolveIcon,
|
|
625
|
+
resolveJsonFormTheme,
|
|
616
626
|
resolveMediaSchedule,
|
|
617
627
|
resolvePersistentLayers,
|
|
618
628
|
resolveRef,
|
|
@@ -665,7 +675,6 @@ export {
|
|
|
665
675
|
unregisterTheme,
|
|
666
676
|
unregisterTransformStyle,
|
|
667
677
|
updateLayer,
|
|
668
|
-
validateDoc,
|
|
669
678
|
validateMarkdownDoc,
|
|
670
679
|
validateMarkdownSource,
|
|
671
680
|
validateTheme,
|
package/dist/jsonForm/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { az as Theme, ap as SurfaceScheme } from '../Doc-BBVGq1_9.js';
|
|
2
|
+
import '../types-DlAZ7MW4.js';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* JSON Form types — Squisq's hint vocabulary layered on JSON Schema.
|
|
3
6
|
*
|
|
@@ -188,4 +191,42 @@ interface InferSchemaOptions {
|
|
|
188
191
|
}
|
|
189
192
|
declare function inferSchema(sample: unknown, options?: InferSchemaOptions): SquisqAnnotatedSchema;
|
|
190
193
|
|
|
191
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Pure CSS-custom-property builder shared by `<JsonView>` (read-only, in
|
|
196
|
+
* `@bendyline/squisq-react`) and `<JsonEditor>` (editable, in
|
|
197
|
+
* `@bendyline/squisq-editor-react`).
|
|
198
|
+
*
|
|
199
|
+
* Both components derive an identical token bag from a Theme + resolved
|
|
200
|
+
* Surface; they differ only in the CSS-var prefix (`--squisq-json` vs
|
|
201
|
+
* `--squisq-jsonform`) so the viewer and editor can coexist on one page.
|
|
202
|
+
* This function is the single source of that derivation. It is pure and
|
|
203
|
+
* framework-free: it performs no `window` / `matchMedia` access — the
|
|
204
|
+
* surface must already be resolved to a concrete `SurfaceScheme` (or left
|
|
205
|
+
* `undefined` to skip surface application) by the calling React hook.
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
interface BuildJsonFormTokensOptions {
|
|
209
|
+
/**
|
|
210
|
+
* CSS-var prefix WITHOUT the trailing dash, e.g. `--squisq-json` or
|
|
211
|
+
* `--squisq-jsonform`. Each token key is `${prefix}-${name}`.
|
|
212
|
+
*/
|
|
213
|
+
prefix: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Build the CSS custom-property map for a JSON form/view surface.
|
|
217
|
+
*
|
|
218
|
+
* @param theme The theme to render with (falls back to `DEFAULT_THEME`).
|
|
219
|
+
* @param surface Already-resolved concrete surface, or `undefined` to leave
|
|
220
|
+
* the theme un-surfaced. (The `'auto'` → concrete resolution
|
|
221
|
+
* is the React hook's job, so this stays pure.)
|
|
222
|
+
* @param options `{ prefix }` — the CSS-var namespace.
|
|
223
|
+
*/
|
|
224
|
+
declare function buildJsonFormTokens(theme: Theme | undefined, surface: SurfaceScheme | undefined, options: BuildJsonFormTokensOptions): Record<string, string>;
|
|
225
|
+
/**
|
|
226
|
+
* Resolve the effective theme after surface application — the companion to
|
|
227
|
+
* `buildJsonFormTokens` for callers that also need the `Theme` object (both
|
|
228
|
+
* hooks return it alongside the style bag).
|
|
229
|
+
*/
|
|
230
|
+
declare function resolveJsonFormTheme(theme: Theme | undefined, surface: SurfaceScheme | undefined): Theme;
|
|
231
|
+
|
|
232
|
+
export { type BuildJsonFormTokensOptions, type ControlKind, type InferSchemaOptions, type JsonFormValidationError, type JsonFormValidator, type SquisqAnnotatedSchema, type SquisqHints, type SquisqWhen, arrayItemKind, buildJsonFormTokens, chooseControl, evaluateWhen, getByPointer, inferSchema, pointerSegments, primaryType, resolveFlag, resolveJsonFormTheme, resolveRef, setByPointer, toPointer };
|
package/dist/jsonForm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
arrayItemKind,
|
|
3
|
+
buildJsonFormTokens,
|
|
3
4
|
chooseControl,
|
|
4
5
|
evaluateWhen,
|
|
5
6
|
getByPointer,
|
|
@@ -7,12 +8,18 @@ import {
|
|
|
7
8
|
pointerSegments,
|
|
8
9
|
primaryType,
|
|
9
10
|
resolveFlag,
|
|
11
|
+
resolveJsonFormTheme,
|
|
10
12
|
resolveRef,
|
|
11
13
|
setByPointer,
|
|
12
14
|
toPointer
|
|
13
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-T5UK6YOB.js";
|
|
16
|
+
import "../chunk-A4O7GIWE.js";
|
|
17
|
+
import "../chunk-KKNUBQ6Y.js";
|
|
18
|
+
import "../chunk-DLXZMS5K.js";
|
|
19
|
+
import "../chunk-QE7TWGVT.js";
|
|
14
20
|
export {
|
|
15
21
|
arrayItemKind,
|
|
22
|
+
buildJsonFormTokens,
|
|
16
23
|
chooseControl,
|
|
17
24
|
evaluateWhen,
|
|
18
25
|
getByPointer,
|
|
@@ -20,6 +27,7 @@ export {
|
|
|
20
27
|
pointerSegments,
|
|
21
28
|
primaryType,
|
|
22
29
|
resolveFlag,
|
|
30
|
+
resolveJsonFormTheme,
|
|
23
31
|
resolveRef,
|
|
24
32
|
setByPointer,
|
|
25
33
|
toPointer
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -339,6 +339,14 @@ declare function stringifyHtmlNodes(nodes: HtmlNode[]): string;
|
|
|
339
339
|
|
|
340
340
|
type HtmlPolicy = 'strip' | 'sanitize' | 'trusted';
|
|
341
341
|
type UrlKind = 'link' | 'media';
|
|
342
|
+
interface SanitizeUrlOptions {
|
|
343
|
+
/**
|
|
344
|
+
* Extra lowercase schemes allowed for `kind: 'link'` — the host-app escape
|
|
345
|
+
* hatch for custom link protocols it intercepts itself (e.g. an app-internal
|
|
346
|
+
* navigation scheme). Executable schemes are refused regardless.
|
|
347
|
+
*/
|
|
348
|
+
extraLinkSchemes?: readonly string[];
|
|
349
|
+
}
|
|
342
350
|
/**
|
|
343
351
|
* Sanitize a URL for a rendered link or media attribute.
|
|
344
352
|
*
|
|
@@ -347,7 +355,7 @@ type UrlKind = 'link' | 'media';
|
|
|
347
355
|
* `blob:` and image/audio/video `data:` URLs because Squisq uses both for
|
|
348
356
|
* browser-local media previews and self-contained exports.
|
|
349
357
|
*/
|
|
350
|
-
declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind): string | null;
|
|
358
|
+
declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind, options?: SanitizeUrlOptions): string | null;
|
|
351
359
|
/**
|
|
352
360
|
* Return a sanitized copy of an HtmlNode tree. The original parsed tree is left
|
|
353
361
|
* untouched so markdown stringify can still preserve source fidelity.
|
|
@@ -426,6 +434,14 @@ declare function countNodes(node: MarkdownNode): number;
|
|
|
426
434
|
* @returns A record of string keys to parsed values, or null
|
|
427
435
|
*/
|
|
428
436
|
declare function parseFrontmatter(yaml: string): Record<string, unknown> | null;
|
|
437
|
+
/**
|
|
438
|
+
* Format a multi-line string as a YAML literal block scalar body, i.e.
|
|
439
|
+
* `|-` followed by each source line indented two spaces. Paired with
|
|
440
|
+
* {@link parseFrontmatter}'s block-scalar reader so multi-line frontmatter
|
|
441
|
+
* values (e.g. pretty-printed JSON payloads) round-trip. Blank lines stay
|
|
442
|
+
* blank (no trailing whitespace) so the output diffs cleanly.
|
|
443
|
+
*/
|
|
444
|
+
declare function formatBlockScalar(value: string): string;
|
|
429
445
|
/**
|
|
430
446
|
* Update a markdown source string's YAML frontmatter block, applying the
|
|
431
447
|
* given key/value updates. A `null` or `undefined` value removes the key.
|
|
@@ -483,4 +499,4 @@ declare function readFrontmatterThemeId(frontmatter: Record<string, unknown> | u
|
|
|
483
499
|
*/
|
|
484
500
|
declare function plainTextFromInlineHtml(html: string): string;
|
|
485
501
|
|
|
486
|
-
export { BLOCK_META_KEY_DESCRIPTORS, type BlockMetaKeyDescriptor, HeadingAttributes, HtmlNode, type HtmlPolicy, KNOWN_BLOCK_META_KEYS, type KnownBlockMetaKey, MarkdownDocument, MarkdownNode, ParseOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, countNodes, createDocument, extractPlainText, findNodesByType, fromMdast, getChildren, inferDocumentTitle, matchTrailingPandocAttr, matchTrailingTemplateAnnotation, needsQuoting, parseFrontmatter, parseHtmlToNodes, parseMarkdown, parsePandocAttrTokens, parseTimeSeconds, plainTextFromInlineHtml, quoteAttrValue, readFrontmatterThemeId, sanitizeHtmlNodes, sanitizeUrl, serializePandocAttributes, setFrontmatterValues, splitKeyValueToken, stringifyHtmlNodes, stringifyMarkdown, toMdast, tokenizeAttrTokens, unquoteAttrValue, walkMarkdownTree };
|
|
502
|
+
export { BLOCK_META_KEY_DESCRIPTORS, type BlockMetaKeyDescriptor, HeadingAttributes, HtmlNode, type HtmlPolicy, KNOWN_BLOCK_META_KEYS, type KnownBlockMetaKey, MarkdownDocument, MarkdownNode, ParseOptions, type SanitizeUrlOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, countNodes, createDocument, extractPlainText, findNodesByType, formatBlockScalar, fromMdast, getChildren, inferDocumentTitle, matchTrailingPandocAttr, matchTrailingTemplateAnnotation, needsQuoting, parseFrontmatter, parseHtmlToNodes, parseMarkdown, parsePandocAttrTokens, parseTimeSeconds, plainTextFromInlineHtml, quoteAttrValue, readFrontmatterThemeId, sanitizeHtmlNodes, sanitizeUrl, serializePandocAttributes, setFrontmatterValues, splitKeyValueToken, stringifyHtmlNodes, stringifyMarkdown, toMdast, tokenizeAttrTokens, unquoteAttrValue, walkMarkdownTree };
|
package/dist/markdown/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
sanitizeHtmlNodes,
|
|
3
3
|
sanitizeUrl,
|
|
4
4
|
stringifyMarkdown
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-6ATE2PSM.js";
|
|
6
6
|
import {
|
|
7
7
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
8
8
|
KNOWN_BLOCK_META_KEYS,
|
|
@@ -19,12 +19,13 @@ import {
|
|
|
19
19
|
toMdast,
|
|
20
20
|
tokenizeAttrTokens,
|
|
21
21
|
unquoteAttrValue
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-TEEEILMP.js";
|
|
23
23
|
import {
|
|
24
24
|
countNodes,
|
|
25
25
|
createDocument,
|
|
26
26
|
extractPlainText,
|
|
27
27
|
findNodesByType,
|
|
28
|
+
formatBlockScalar,
|
|
28
29
|
getChildren,
|
|
29
30
|
inferDocumentTitle,
|
|
30
31
|
parseFrontmatter,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
setFrontmatterValues,
|
|
35
36
|
stringifyHtmlNodes,
|
|
36
37
|
walkMarkdownTree
|
|
37
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-HWVFJAAH.js";
|
|
38
39
|
import "../chunk-DBS6RIFL.js";
|
|
39
40
|
import "../chunk-QE7TWGVT.js";
|
|
40
41
|
export {
|
|
@@ -44,6 +45,7 @@ export {
|
|
|
44
45
|
createDocument,
|
|
45
46
|
extractPlainText,
|
|
46
47
|
findNodesByType,
|
|
48
|
+
formatBlockScalar,
|
|
47
49
|
fromMdast,
|
|
48
50
|
getChildren,
|
|
49
51
|
inferDocumentTitle,
|
package/dist/recommend/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import "../chunk-ZLQKNOZQ.js";
|
|
|
2
2
|
import {
|
|
3
3
|
profileBlockContents,
|
|
4
4
|
recommendTemplatesForBlock
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-UY7KGQ5R.js";
|
|
6
|
+
import "../chunk-HWVFJAAH.js";
|
|
7
7
|
export {
|
|
8
8
|
profileBlockContents,
|
|
9
9
|
recommendTemplatesForBlock
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.js';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AudioBookmark, f as AudioSegment, g as AudioTimingData, h as AudioTrack, B as Block, i as BlockConnection, j as BorderStyle, C as CaptionPhrase, k as CaptionTrack, l as CaptionWord, m as ColorScheme, n as ComparisonBarInput, o as CornerBrandingConfig, p as CustomTemplateDefinition, D as DARK_SURFACE,
|
|
2
|
+
import { az as Theme, v as DeepPartial, aD as ThemeSeedColors, aA as ThemeColorPalette, K as FontFamilyKind, J as FontFamily } from '../Doc-BBVGq1_9.js';
|
|
3
|
+
export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AudioBookmark, f as AudioSegment, g as AudioTimingData, h as AudioTrack, B as Block, i as BlockConnection, j as BorderStyle, C as CaptionPhrase, k as CaptionTrack, l as CaptionWord, m as ColorScheme, n as ComparisonBarInput, o as CornerBrandingConfig, p as CustomTemplateDefinition, q as CustomTemplateLayer, D as DARK_SURFACE, r as DEFAULT_DOC_FONT, s as DEFAULT_TITLE_FONT, t as DataTableInput, u as DateEventInput, w as DefinitionCardInput, x as DiagramBlockInput, y as Doc, z as DocBlock, E as DocDiagnostic, F as DrawingBlockInput, G as FRONTMATTER_CUSTOM_TEMPLATES_KEY, H as FRONTMATTER_CUSTOM_THEMES_KEY, I as FactCardInput, L as FullBleedQuoteInput, M as GradientBackgroundConfig, N as ImageBackgroundConfig, O as ImageLayer, P as ImageTreatment, Q as ImageWithCaptionInput, R as LIGHT_SURFACE, S as Layer, T as LayerRepeat, U as LayoutHints, V as LeftFeatureInput, W as LinearGradient, X as ListBlockInput, Y as MapBlockInput, Z as MapLayer, _ as MapMarker, $ as MapTileStyle, a0 as MarkerStyle, a1 as MediaClip, a2 as PathLayer, a3 as PatternBackgroundConfig, a4 as PersistentLayer, a5 as PersistentLayerConfig, a6 as PersistentLayerTemplate, a7 as PersistentLayerTemplateConfig, a8 as PersistentLayerTemplateType, a9 as PhotoGridInput, aa as Position, ab as ProgressIndicatorConfig, ac as PullQuoteInput, ad as QuoteBlockInput, ae as RawLayersInput, af as RenderStyle, ag as RightFeatureInput, ah as ScheduledClip, ai as SectionHeaderInput, aj as ShapeFilter, ak as ShapeLayer, al as ShapePattern, am as SolidBackgroundConfig, an as StartBlockConfig, ao as StatHighlightInput, ap as SurfaceScheme, aq as THEME_SCHEMA_VERSION, ar as TableLayer, as as TableLayerStyle, at as TemplateBlock, au as TemplateContext, av as TemplateFunction, aw as TemplateRegistry, ax as TextLayer, ay as TextStyle, aB as ThemeColorScheme, aC as ThemeSchemaVersion, aE as ThemeStyle, aF as ThemeTypography, aG as TitleBlockInput, aH as TitleCaptionConfig, aI as TwoColumnInput, aJ as VIEWPORT_PRESETS, aK as VideoLayer, aL as VideoPullQuoteInput, aM as VideoWithCaptionInput, aN as ViewportConfig, aO as ViewportOrientation, aP as ViewportPreset, aQ as VignetteConfig, aR as applySurface, aS as calculateDuration, aT as calculateFontScale, aU as createTemplateContext, aV as createTheme, aW as getAspectRatioString, aX as getBlockAtTime, aY as getCaptionAtTime, aZ as getDocPlaybackDuration, a_ as getLayoutHints, a$ as getRegisteredThemes, b0 as getSafeTextBounds, b1 as getSegmentAtTime, b2 as getTwoColumnPositions, b3 as getViewport, b4 as getViewportOrientation, b5 as isPersistentLayerTemplate, b6 as isTemplateBlock, b7 as layoutScaledFontSize, b8 as lookupRegisteredTheme, b9 as registerTheme, ba as resolveMediaSchedule, bb as scaledFontSize, bc as unregisterTheme } from '../Doc-BBVGq1_9.js';
|
|
4
4
|
export { D as DEFAULT_TRANSITION_DURATION_SECONDS, X as TRANSITION_DIRECTIONS, Y as TRANSITION_TYPES, Z as Transition, _ as TransitionDirection, $ as TransitionType, a0 as isTransitionType, a1 as normalizeTransitionDirection, a2 as normalizeTransitionType, a3 as resolveBlockTransition, a4 as resolveTransitionDuration } from '../types-DlAZ7MW4.js';
|
|
5
|
-
export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-
|
|
5
|
+
export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-CehcJhzz.js';
|
|
6
6
|
export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
|
|
7
|
-
export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-
|
|
7
|
+
export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-FuyGtt6o.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Theme Validator
|
package/dist/schemas/index.js
CHANGED
|
@@ -9,9 +9,8 @@ import {
|
|
|
9
9
|
getSegmentAtTime,
|
|
10
10
|
parseTheme,
|
|
11
11
|
resolveMediaSchedule,
|
|
12
|
-
serializeTheme
|
|
13
|
-
|
|
14
|
-
} from "../chunk-7MQGNR76.js";
|
|
12
|
+
serializeTheme
|
|
13
|
+
} from "../chunk-A4O7GIWE.js";
|
|
15
14
|
import {
|
|
16
15
|
AVAILABLE_FONT_STACKS,
|
|
17
16
|
DARK_SURFACE,
|
|
@@ -48,7 +47,7 @@ import {
|
|
|
48
47
|
unregisterTheme,
|
|
49
48
|
validateTheme,
|
|
50
49
|
withAlpha
|
|
51
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-KKNUBQ6Y.js";
|
|
52
51
|
import {
|
|
53
52
|
DEFAULT_DOC_FONT,
|
|
54
53
|
DEFAULT_TITLE_FONT,
|
|
@@ -144,7 +143,6 @@ export {
|
|
|
144
143
|
scaledFontSize2 as scaledFontSize,
|
|
145
144
|
serializeTheme,
|
|
146
145
|
unregisterTheme,
|
|
147
|
-
validateDoc,
|
|
148
146
|
validateTheme,
|
|
149
147
|
withAlpha
|
|
150
148
|
};
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-
|
|
2
|
-
export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-
|
|
1
|
+
import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-BXUlIf18.js';
|
|
2
|
+
export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-BXUlIf18.js';
|
|
3
3
|
import { a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
|
|
4
4
|
|
|
5
5
|
/**
|