@bendyline/squisq 1.5.2 → 2.0.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 +63 -10
- package/dist/{Doc-BBVGq1_9.d.ts → Doc-ylqWKDc_.d.ts} +248 -37
- package/dist/{ImageEditDoc-FuyGtt6o.d.ts → ImageEditDoc-D828IXJ1.d.ts} +1 -1
- package/dist/annotationCoercion-Dr_DY9Hx.d.ts +86 -0
- package/dist/{chunk-T5UK6YOB.js → chunk-2PWOO4ZE.js} +60 -17
- package/dist/chunk-2PWOO4ZE.js.map +1 -0
- package/dist/{chunk-VWUFZ6ZG.js → chunk-3E5F2XMR.js} +2 -29
- package/dist/chunk-3E5F2XMR.js.map +1 -0
- package/dist/chunk-4X3JQXNM.js +35 -0
- package/dist/chunk-4X3JQXNM.js.map +1 -0
- package/dist/{chunk-P3K7NLHF.js → chunk-5DKBFXPY.js} +31 -121
- package/dist/chunk-5DKBFXPY.js.map +1 -0
- package/dist/{chunk-DLXZMS5K.js → chunk-5J4HKRJF.js} +51 -3
- package/dist/chunk-5J4HKRJF.js.map +1 -0
- package/dist/chunk-5UYI3RJB.js +2503 -0
- package/dist/chunk-5UYI3RJB.js.map +1 -0
- package/dist/{chunk-BEQODJWV.js → chunk-66QO7XFB.js} +11 -291
- package/dist/chunk-66QO7XFB.js.map +1 -0
- package/dist/{chunk-HWVFJAAH.js → chunk-AMIR72JP.js} +28 -10
- package/dist/chunk-AMIR72JP.js.map +1 -0
- package/dist/chunk-CY2R2VPR.js +884 -0
- package/dist/chunk-CY2R2VPR.js.map +1 -0
- package/dist/chunk-FVJUUTEM.js +74 -0
- package/dist/chunk-FVJUUTEM.js.map +1 -0
- package/dist/{chunk-Q3ROPT5H.js → chunk-GZY66SDN.js} +1 -1
- package/dist/{chunk-Q3ROPT5H.js.map → chunk-GZY66SDN.js.map} +1 -1
- package/dist/chunk-JOQYPRDZ.js +127 -0
- package/dist/chunk-JOQYPRDZ.js.map +1 -0
- package/dist/{chunk-A4O7GIWE.js → chunk-MMPBOUK7.js} +10 -73
- package/dist/chunk-MMPBOUK7.js.map +1 -0
- package/dist/{chunk-LDQ2HJIX.js → chunk-PXLVXTLW.js} +252 -54
- package/dist/chunk-PXLVXTLW.js.map +1 -0
- package/dist/{chunk-TQWLI6S2.js → chunk-Q7LROV2H.js} +4 -2
- package/dist/{chunk-TQWLI6S2.js.map → chunk-Q7LROV2H.js.map} +1 -1
- package/dist/{chunk-GPLTCSXO.js → chunk-R2GC6RLD.js} +7 -7
- package/dist/chunk-R2GC6RLD.js.map +1 -0
- package/dist/chunk-R2YZTCLO.js +292 -0
- package/dist/chunk-R2YZTCLO.js.map +1 -0
- package/dist/chunk-S7A5D7ZJ.js +174 -0
- package/dist/chunk-S7A5D7ZJ.js.map +1 -0
- package/dist/chunk-TFJVXUHH.js +2358 -0
- package/dist/chunk-TFJVXUHH.js.map +1 -0
- package/dist/{chunk-LTN6I7QW.js → chunk-TUWMK62B.js} +55 -4
- package/dist/chunk-TUWMK62B.js.map +1 -0
- package/dist/{chunk-IMSCRLLV.js → chunk-VR7UPJ7C.js} +35 -25
- package/dist/chunk-VR7UPJ7C.js.map +1 -0
- package/dist/{chunk-KKNUBQ6Y.js → chunk-W4O2TX5I.js} +157 -92
- package/dist/chunk-W4O2TX5I.js.map +1 -0
- package/dist/{chunk-5TYS5V3G.js → chunk-X6DUONGT.js} +4204 -3560
- package/dist/chunk-X6DUONGT.js.map +1 -0
- package/dist/doc/index.d.ts +2334 -5
- package/dist/doc/index.js +127 -33
- package/dist/generate/index.d.ts +7 -2
- package/dist/generate/index.js +1 -1
- package/dist/imageEdit/index.d.ts +9 -6
- package/dist/imageEdit/index.js +3 -3
- package/dist/index.d.ts +12 -10
- package/dist/index.js +246 -80
- package/dist/jsonForm/index.d.ts +7 -3
- package/dist/jsonForm/index.js +9 -4
- package/dist/markdown/index.d.ts +6 -70
- package/dist/markdown/index.js +13 -9
- package/dist/narration/index.d.ts +618 -0
- package/dist/narration/index.js +82 -0
- package/dist/recommend/index.d.ts +15 -1
- package/dist/recommend/index.js +2 -2
- package/dist/schemas/index.d.ts +28 -6
- package/dist/schemas/index.js +15 -13
- package/dist/spatial/index.d.ts +0 -1
- package/dist/spatial/index.js +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/{themeLibrary-CehcJhzz.d.ts → themeLibrary-RjVgLpUi.d.ts} +10 -11
- package/dist/timing/index.js +5 -3
- package/dist/transform/index.d.ts +35 -24
- package/dist/transform/index.js +9 -10
- package/dist/{types-DlAZ7MW4.d.ts → types-BwMPl2CB.d.ts} +1 -1
- package/dist/{types-D98li1gV.d.ts → types-C4kiRn_k.d.ts} +3 -1
- package/dist/versions/index.d.ts +2 -1
- package/dist/versions/index.js +2 -2
- package/package.json +6 -6
- package/src/__tests__/applyNarrationTiming.test.ts +190 -0
- package/src/__tests__/applyRenderStyle.test.ts +3 -3
- package/src/__tests__/asciiDiagramBattle.test.ts +246 -0
- package/src/__tests__/asciiDiagramDetect.test.ts +162 -0
- package/src/__tests__/asciiDiagramMapping.test.ts +38 -0
- package/src/__tests__/asciiDiagramParse.test.ts +233 -0
- package/src/__tests__/asciiDiagramPipeline.test.ts +273 -0
- package/src/__tests__/asciiDiagramRender.test.ts +162 -0
- package/src/__tests__/asciiDiagramRepair.test.ts +84 -0
- package/src/__tests__/asciiTimelineDetect.test.ts +157 -0
- package/src/__tests__/asciiTimelineParse.test.ts +205 -0
- package/src/__tests__/asciiTimelinePipeline.test.ts +349 -0
- package/src/__tests__/asciiTimelineRender.test.ts +376 -0
- package/src/__tests__/attrTokens.test.ts +5 -0
- package/src/__tests__/contentContainer.test.ts +43 -0
- package/src/__tests__/customTemplatesFrontmatter.test.ts +0 -15
- package/src/__tests__/customThemesFrontmatter.test.ts +1 -0
- package/src/__tests__/dataTable.test.ts +25 -15
- package/src/__tests__/diagramBlock.test.ts +3 -3
- package/src/__tests__/diagramText.test.ts +26 -0
- package/src/__tests__/docToMarkdownMedia.test.ts +83 -0
- package/src/__tests__/drawingBlock.test.ts +3 -3
- package/src/__tests__/fixtures/asciiDiagramBattle.ts +512 -0
- package/src/__tests__/fixtures/asciiDiagrams.ts +287 -0
- package/src/__tests__/fixtures/asciiTimelines.ts +35 -0
- package/src/__tests__/fixtures/treeviewFixtures.ts +243 -0
- package/src/__tests__/getLayers.test.ts +32 -18
- package/src/__tests__/getLayersFallback.test.ts +8 -8
- package/src/__tests__/imageEditVersions.test.ts +2 -0
- package/src/__tests__/jsonForm.pointer.test.ts +47 -1
- package/src/__tests__/layoutBlock.test.ts +3 -3
- package/src/__tests__/majorApiTypes.test.ts +18 -0
- package/src/__tests__/markdown.test.ts +54 -4
- package/src/__tests__/markdownSanitize.test.ts +7 -5
- package/src/__tests__/matchFontFamily.test.ts +114 -0
- package/src/__tests__/materializeBlockLayers.test.ts +135 -0
- package/src/__tests__/materializeTestUtils.ts +17 -0
- package/src/__tests__/narrationAlign.test.ts +150 -0
- package/src/__tests__/narrationFeatures.test.ts +71 -0
- package/src/__tests__/narrationNuclei.test.ts +45 -0
- package/src/__tests__/narrationPacing.test.ts +189 -0
- package/src/__tests__/narrationScript.test.ts +149 -0
- package/src/__tests__/narrationSessionRepro.test.ts +62 -0
- package/src/__tests__/narrationSidecar.test.ts +88 -0
- package/src/__tests__/narrationSyllables.test.ts +65 -0
- package/src/__tests__/narrationTestSignals.ts +167 -0
- package/src/__tests__/narrationVad.test.ts +66 -0
- package/src/__tests__/resolveDocTheme.test.ts +16 -2
- package/src/__tests__/rootExports.test.ts +18 -0
- package/src/__tests__/scopedContentContainer.test.ts +20 -0
- package/src/__tests__/shapeGeometry.test.ts +12 -0
- package/src/__tests__/templateAnnotationParse.test.ts +10 -0
- package/src/__tests__/templateInputs.test.ts +69 -0
- package/src/__tests__/templateMetadata.test.ts +2 -1
- package/src/__tests__/templates.test.ts +143 -17
- package/src/__tests__/themeCompile.test.ts +49 -22
- package/src/__tests__/transformProvenance.test.ts +160 -0
- package/src/__tests__/transformV2.test.ts +40 -14
- package/src/__tests__/treeviewBattle.test.ts +76 -0
- package/src/__tests__/treeviewDetect.test.ts +168 -0
- package/src/__tests__/treeviewParse.test.ts +118 -0
- package/src/__tests__/treeviewPipeline.test.ts +183 -0
- package/src/__tests__/treeviewRender.test.ts +91 -0
- package/src/__tests__/versions.test.ts +44 -0
- package/src/doc/applyNarrationTiming.ts +244 -0
- package/src/doc/asciiDiagram/chars.ts +210 -0
- package/src/doc/asciiDiagram/detect.ts +175 -0
- package/src/doc/asciiDiagram/index.ts +38 -0
- package/src/doc/asciiDiagram/mapping.ts +225 -0
- package/src/doc/asciiDiagram/parse.ts +1095 -0
- package/src/doc/asciiDiagram/render.ts +963 -0
- package/src/doc/asciiDiagram/repair.ts +400 -0
- package/src/doc/asciiDiagram/types.ts +65 -0
- package/src/doc/asciiTimeline/detect.ts +138 -0
- package/src/doc/asciiTimeline/index.ts +26 -0
- package/src/doc/asciiTimeline/mapping.ts +43 -0
- package/src/doc/asciiTimeline/parse.ts +870 -0
- package/src/doc/asciiTimeline/render.ts +427 -0
- package/src/doc/asciiTimeline/types.ts +73 -0
- package/src/doc/asciiTimeline/wrappedFlow.ts +427 -0
- package/src/doc/audioMapping.ts +60 -46
- package/src/doc/customTemplatesFrontmatter.ts +0 -41
- package/src/doc/docToMarkdown.ts +70 -2
- package/src/doc/index.ts +76 -4
- package/src/doc/markdownToDoc.ts +138 -2
- package/src/doc/materializeBlockLayers.ts +304 -0
- package/src/doc/mediaAnnotations.ts +20 -0
- package/src/doc/resolveDocTheme.ts +8 -7
- package/src/doc/templateInputs.ts +185 -2
- package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +22 -8
- package/src/doc/templates/__tests__/listBlock.test.ts +64 -0
- package/src/doc/templates/diagramBlock.ts +237 -38
- package/src/doc/templates/fallbackBlock.ts +1 -1
- package/src/doc/templates/index.ts +134 -279
- package/src/doc/templates/inputDescriptors.ts +20 -1
- package/src/doc/templates/listBlock.ts +88 -30
- package/src/doc/templates/metadata.ts +10 -0
- package/src/doc/templates/persistentLayers.ts +12 -126
- package/src/doc/templates/registry.ts +88 -0
- package/src/doc/templates/templateNames.ts +22 -0
- package/src/doc/templates/timelineBlock.ts +613 -0
- package/src/doc/templates/treeBlock.ts +131 -0
- package/src/doc/treeview/chars.ts +72 -0
- package/src/doc/treeview/detect.ts +145 -0
- package/src/doc/treeview/index.ts +30 -0
- package/src/doc/treeview/mapping.ts +95 -0
- package/src/doc/treeview/parse.ts +201 -0
- package/src/doc/treeview/render.ts +41 -0
- package/src/doc/treeview/types.ts +43 -0
- package/src/doc/utils/applyRenderStyle.ts +2 -9
- package/src/doc/utils/diagramText.ts +78 -0
- package/src/doc/utils/shapeGeometry.ts +67 -5
- package/src/doc/validate.ts +1 -1
- package/src/generate/templateMapper.ts +7 -0
- package/src/imageEdit/export.ts +6 -5
- package/src/imageEdit/versionPaths.ts +13 -26
- package/src/imageEdit/versions.ts +21 -100
- package/src/index.ts +1 -0
- package/src/internal/immutable.ts +58 -0
- package/src/jsonForm/index.ts +9 -1
- package/src/jsonForm/pointer.ts +68 -23
- package/src/markdown/attrTokens.ts +7 -5
- package/src/markdown/index.ts +1 -0
- package/src/markdown/stringify.ts +4 -9
- package/src/markdown/utils.ts +36 -14
- package/src/narration/align.ts +514 -0
- package/src/narration/features.ts +231 -0
- package/src/narration/index.ts +86 -0
- package/src/narration/nuclei.ts +118 -0
- package/src/narration/pacing.ts +211 -0
- package/src/narration/script.ts +239 -0
- package/src/narration/session.ts +100 -0
- package/src/narration/sidecar.ts +187 -0
- package/src/narration/syllables.ts +85 -0
- package/src/narration/trace.ts +50 -0
- package/src/narration/types.ts +299 -0
- package/src/narration/vad.ts +131 -0
- package/src/recommend/numberHighlight.ts +25 -0
- package/src/recommend/templates.ts +108 -12
- package/src/schemas/BlockTemplates.ts +156 -7
- package/src/schemas/Doc.ts +72 -9
- package/src/schemas/Media.ts +12 -2
- package/src/schemas/Theme.ts +45 -25
- package/src/schemas/Viewport.ts +2 -2
- package/src/schemas/fontStacks.ts +79 -0
- package/src/schemas/themeCompile.ts +15 -0
- package/src/schemas/themeConstants.ts +2 -0
- package/src/schemas/themeLibrary.ts +25 -19
- package/src/schemas/themeValidator.ts +1 -1
- package/src/schemas/themes/gezellig.json +1 -1
- package/src/spatial/Geohash.ts +0 -3
- package/src/storage/ContentContainer.ts +17 -9
- package/src/storage/ScopedContentContainer.ts +45 -15
- package/src/transform/applyTransform.ts +5 -5
- package/src/transform/index.ts +3 -1
- package/src/transform/registry.ts +169 -49
- package/src/transform/templateSelector.ts +21 -2
- package/src/transform/timingAllocator.ts +152 -21
- package/src/transform/types.ts +14 -1
- package/src/versions/gitignore.ts +34 -0
- package/src/versions/index.ts +2 -0
- package/src/versions/operations.ts +18 -104
- package/src/versions/paths.ts +13 -28
- package/src/versions/snapshotStore.ts +202 -0
- package/src/versions/types.ts +3 -1
- package/dist/chunk-5TYS5V3G.js.map +0 -1
- package/dist/chunk-A4O7GIWE.js.map +0 -1
- package/dist/chunk-BEQODJWV.js.map +0 -1
- package/dist/chunk-DLXZMS5K.js.map +0 -1
- package/dist/chunk-GPLTCSXO.js.map +0 -1
- package/dist/chunk-HWVFJAAH.js.map +0 -1
- package/dist/chunk-IMSCRLLV.js.map +0 -1
- package/dist/chunk-JELIRVDP.js +0 -24
- package/dist/chunk-JELIRVDP.js.map +0 -1
- package/dist/chunk-KKNUBQ6Y.js.map +0 -1
- package/dist/chunk-LDQ2HJIX.js.map +0 -1
- package/dist/chunk-LTN6I7QW.js.map +0 -1
- package/dist/chunk-P3K7NLHF.js.map +0 -1
- package/dist/chunk-T5UK6YOB.js.map +0 -1
- package/dist/chunk-UY7KGQ5R.js +0 -192
- package/dist/chunk-UY7KGQ5R.js.map +0 -1
- package/dist/chunk-VLJJHDAC.js +0 -218
- package/dist/chunk-VLJJHDAC.js.map +0 -1
- package/dist/chunk-VWUFZ6ZG.js.map +0 -1
- package/dist/story/index.d.ts +0 -1801
- package/dist/story/index.js +0 -279
- package/src/doc/getLayers.ts +0 -195
- /package/dist/{story → narration}/index.js.map +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_ALIGN_CONFIG,
|
|
3
|
+
DEFAULT_FEATURE_CONFIG,
|
|
4
|
+
DEFAULT_NUCLEI_CONFIG,
|
|
5
|
+
DEFAULT_PACING_CONFIG,
|
|
6
|
+
DEFAULT_VAD_CONFIG,
|
|
7
|
+
alignNarration,
|
|
8
|
+
bandpassRun,
|
|
9
|
+
createBandpass,
|
|
10
|
+
createFeatureState,
|
|
11
|
+
createNarrationSession,
|
|
12
|
+
createNucleiState,
|
|
13
|
+
createPacingState,
|
|
14
|
+
createVadState,
|
|
15
|
+
detectSyllableOnsets,
|
|
16
|
+
downsampleTrace,
|
|
17
|
+
extractFrameFeatures,
|
|
18
|
+
featureStep,
|
|
19
|
+
narrationSessionStep,
|
|
20
|
+
nucleiStep,
|
|
21
|
+
pacingStep,
|
|
22
|
+
reanchorPacing,
|
|
23
|
+
reanchorSession,
|
|
24
|
+
traceWordPosAt,
|
|
25
|
+
vadStep
|
|
26
|
+
} from "../chunk-CY2R2VPR.js";
|
|
27
|
+
import {
|
|
28
|
+
buildNarrationScript,
|
|
29
|
+
buildNarrationTimingJson,
|
|
30
|
+
estimateSyllables,
|
|
31
|
+
expectedSyllablesAt,
|
|
32
|
+
parseNarrationTimingJson,
|
|
33
|
+
wordIndexAtChar,
|
|
34
|
+
wordIndexAtTime,
|
|
35
|
+
wordPosAtExpectedSyllables
|
|
36
|
+
} from "../chunk-X6DUONGT.js";
|
|
37
|
+
import "../chunk-TUWMK62B.js";
|
|
38
|
+
import "../chunk-5UYI3RJB.js";
|
|
39
|
+
import "../chunk-W4O2TX5I.js";
|
|
40
|
+
import "../chunk-5J4HKRJF.js";
|
|
41
|
+
import "../chunk-R2YZTCLO.js";
|
|
42
|
+
import "../chunk-AMIR72JP.js";
|
|
43
|
+
import "../chunk-QE7TWGVT.js";
|
|
44
|
+
import "../chunk-4X3JQXNM.js";
|
|
45
|
+
import "../chunk-3E5F2XMR.js";
|
|
46
|
+
import "../chunk-V543AI2F.js";
|
|
47
|
+
import "../chunk-FVTQSNR7.js";
|
|
48
|
+
export {
|
|
49
|
+
DEFAULT_ALIGN_CONFIG,
|
|
50
|
+
DEFAULT_FEATURE_CONFIG,
|
|
51
|
+
DEFAULT_NUCLEI_CONFIG,
|
|
52
|
+
DEFAULT_PACING_CONFIG,
|
|
53
|
+
DEFAULT_VAD_CONFIG,
|
|
54
|
+
alignNarration,
|
|
55
|
+
bandpassRun,
|
|
56
|
+
buildNarrationScript,
|
|
57
|
+
buildNarrationTimingJson,
|
|
58
|
+
createBandpass,
|
|
59
|
+
createFeatureState,
|
|
60
|
+
createNarrationSession,
|
|
61
|
+
createNucleiState,
|
|
62
|
+
createPacingState,
|
|
63
|
+
createVadState,
|
|
64
|
+
detectSyllableOnsets,
|
|
65
|
+
downsampleTrace,
|
|
66
|
+
estimateSyllables,
|
|
67
|
+
expectedSyllablesAt,
|
|
68
|
+
extractFrameFeatures,
|
|
69
|
+
featureStep,
|
|
70
|
+
narrationSessionStep,
|
|
71
|
+
nucleiStep,
|
|
72
|
+
pacingStep,
|
|
73
|
+
parseNarrationTimingJson,
|
|
74
|
+
reanchorPacing,
|
|
75
|
+
reanchorSession,
|
|
76
|
+
traceWordPosAt,
|
|
77
|
+
vadStep,
|
|
78
|
+
wordIndexAtChar,
|
|
79
|
+
wordIndexAtTime,
|
|
80
|
+
wordPosAtExpectedSyllables
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MarkdownBlockNode } from '../types-
|
|
1
|
+
import { M as MarkdownBlockNode } from '../types-BwMPl2CB.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Block template recommendations.
|
|
@@ -20,6 +20,20 @@ interface BlockContentProfile {
|
|
|
20
20
|
hasDate: boolean;
|
|
21
21
|
hasNumberHighlight: boolean;
|
|
22
22
|
wordCount: number;
|
|
23
|
+
/**
|
|
24
|
+
* True when the body is dominated by exactly one code fence whose content
|
|
25
|
+
* is an ASCII box-and-line diagram (see `doc/asciiDiagram/detect.ts`).
|
|
26
|
+
* Optional so externally-constructed profiles keep compiling.
|
|
27
|
+
*/
|
|
28
|
+
hasAsciiDiagram?: boolean;
|
|
29
|
+
/** True when a dominant code fence is an authored marker+axis timeline. */
|
|
30
|
+
hasTimeline?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* True when the body is dominated by exactly one code fence whose content
|
|
33
|
+
* is an ASCII file-tree / outline (see `doc/treeview/detect.ts`). Mutually
|
|
34
|
+
* exclusive with `hasAsciiDiagram`.
|
|
35
|
+
*/
|
|
36
|
+
hasTree?: boolean;
|
|
23
37
|
}
|
|
24
38
|
interface RecommendationResult {
|
|
25
39
|
recommended: string[];
|
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-5UYI3RJB.js";
|
|
6
|
+
import "../chunk-AMIR72JP.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, 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
|
|
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-
|
|
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-
|
|
2
|
+
import { aC as Theme, aE as ThemeColorScheme, v as DeepPartial, aH as ThemeSeedColors, aD as ThemeColorPalette, N as FontFamilyKind, M as FontFamily } from '../Doc-ylqWKDc_.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 DiagramEdgeAnchor, z as DiagramTemplateEdge, E as DiagramTemplateNode, F as Doc, G as DocBlock, H as DocDiagnostic, I as DrawingBlockInput, J as FRONTMATTER_CUSTOM_TEMPLATES_KEY, K as FRONTMATTER_CUSTOM_THEMES_KEY, L as FactCardInput, O as FullBleedQuoteInput, P as GradientBackgroundConfig, Q as ImageBackgroundConfig, R as ImageLayer, S as ImageTreatment, T as ImageWithCaptionInput, U as LIGHT_SURFACE, V as Layer, W as LayerRepeat, X as LayoutHints, Y as LeftFeatureInput, Z as LinearGradient, _ as ListBlockInput, $ as MapBlockInput, a0 as MapLayer, a1 as MapMarker, a2 as MapTileStyle, a3 as MarkerStyle, a4 as MediaClip, a5 as PathLayer, a6 as PatternBackgroundConfig, a7 as PersistentLayer, a8 as PersistentLayerConfig, a9 as PersistentLayerTemplate, aa as PersistentLayerTemplateConfig, ab as PersistentLayerTemplateType, ac as PhotoGridInput, ad as Position, ae as ProgressIndicatorConfig, af as PullQuoteInput, ag as QuoteBlockInput, ah as RawLayersInput, ai as RenderStyle, aj as RightFeatureInput, ak as ScheduledClip, al as SectionHeaderInput, am as ShapeFilter, an as ShapeLayer, ao as ShapePattern, ap as SolidBackgroundConfig, aq as StartBlockConfig, ar as StatHighlightInput, as as SurfaceScheme, at as THEME_SCHEMA_VERSION, au as TableLayer, av as TableLayerStyle, aw as TemplateBlock, ax as TemplateContext, ay as TemplateFunction, az as TemplateRegistry, aA as TextLayer, aB as TextStyle, aF as ThemeRegistry, aG as ThemeSchemaVersion, aI as ThemeStyle, aJ as ThemeTypography, aK as TimelineBlockInput, aL as TimelineTemplateEvent, aM as TimelineTemplateLink, aN as TimelineTemplateTrack, aO as TitleBlockInput, aP as TitleCaptionConfig, aQ as TreeBlockInput, aR as TreeLayer, aS as TreeLayerItem, aT as TreeLayerStyle, aU as TreeTemplateItem, aV as TwoColumnInput, aW as VIEWPORT_PRESETS, aX as VideoLayer, aY as VideoPullQuoteInput, aZ as VideoWithCaptionInput, a_ as ViewportConfig, a$ as ViewportOrientation, b0 as ViewportPreset, b1 as VignetteConfig, b2 as applySurface, b3 as calculateDuration, b4 as calculateFontScale, b5 as createTemplateContext, b6 as createTheme, b7 as createThemeRegistry, b8 as getAspectRatioString, b9 as getBlockAtTime, ba as getCaptionAtTime, bb as getDocPlaybackDuration, bc as getLayoutHints, bd as getSafeTextBounds, be as getSegmentAtTime, bf as getTwoColumnPositions, bg as getViewport, bh as getViewportOrientation, bi as isPersistentLayerTemplate, bj as isTemplateBlock, bk as layoutScaledFontSize, bl as resolveMediaSchedule, bm as scaledFontSize } from '../Doc-ylqWKDc_.js';
|
|
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-BwMPl2CB.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-RjVgLpUi.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-D828IXJ1.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Theme Validator
|
|
@@ -55,6 +55,14 @@ declare const STARTER_THEME: Theme;
|
|
|
55
55
|
declare function deriveColorPalette(seeds: ThemeSeedColors, partialColors?: Partial<ThemeColorPalette>, opts?: {
|
|
56
56
|
contrast?: 'subtle' | 'balanced' | 'high';
|
|
57
57
|
}): ThemeColorPalette;
|
|
58
|
+
/**
|
|
59
|
+
* Expand one accent color into a full `{bg, text, accent}` color scheme via
|
|
60
|
+
* the OKLCh scale — dark saturated bg, light readable text, the picked accent.
|
|
61
|
+
* Falls back to a neutral scheme when the input isn't a valid hex. Shared by
|
|
62
|
+
* the editor's accent list and file-import theme inference so both derive
|
|
63
|
+
* identical schemes from the same accent.
|
|
64
|
+
*/
|
|
65
|
+
declare function accentToColorScheme(accent: string): ThemeColorScheme;
|
|
58
66
|
/** Map a contrast preset to numeric spread used by `deriveColorPalette`. */
|
|
59
67
|
type ContrastPreset = 'subtle' | 'balanced' | 'high';
|
|
60
68
|
interface CompileOptions {
|
|
@@ -141,6 +149,20 @@ declare function fontStack(id: string): FontFamily;
|
|
|
141
149
|
declare function buildGoogleFontsUrl(families: Array<FontFamily | undefined>): string | null;
|
|
142
150
|
/** Default fallback families exposed for tools that need them. */
|
|
143
151
|
declare const FONT_FALLBACKS: Record<FontFamilyKind, string>;
|
|
152
|
+
/**
|
|
153
|
+
* Guess the structured fallback bucket for an arbitrary typeface name.
|
|
154
|
+
* Deliberately never guesses `system-ui` — a wrong serif/sans guess is
|
|
155
|
+
* recoverable in the customizer; `system-ui` erases the signal entirely.
|
|
156
|
+
*/
|
|
157
|
+
declare function guessFontFallback(name: string): 'serif' | 'sans-serif' | 'monospace' | 'system-ui';
|
|
158
|
+
/**
|
|
159
|
+
* Map an arbitrary typeface name (e.g. from an imported office document's
|
|
160
|
+
* fontScheme) to a `FontFamily`: a curated `{ stackId }` when the name
|
|
161
|
+
* matches a known stack, else `{ custom }` preserving the original name
|
|
162
|
+
* (original casing, quotes stripped) with a heuristic fallback bucket.
|
|
163
|
+
* Empty/blank names resolve to the system sans stack.
|
|
164
|
+
*/
|
|
165
|
+
declare function matchFontFamily(name: string): FontFamily;
|
|
144
166
|
|
|
145
167
|
/**
|
|
146
168
|
* Color Utilities
|
|
@@ -205,4 +227,4 @@ declare function deriveScale(seedHex: string, spread?: number): {
|
|
|
205
227
|
darker2: string;
|
|
206
228
|
};
|
|
207
229
|
|
|
208
|
-
export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeSeedColors, type ValidationError, type ValidationResult, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, hexHueDegrees, isHex, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
|
|
230
|
+
export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
STARTER_THEME,
|
|
3
|
+
accentToColorScheme,
|
|
3
4
|
calculateDuration,
|
|
4
5
|
compileTheme,
|
|
5
6
|
deriveColorPalette,
|
|
6
7
|
getBlockAtTime,
|
|
7
8
|
getCaptionAtTime,
|
|
8
|
-
getDocPlaybackDuration,
|
|
9
9
|
getSegmentAtTime,
|
|
10
10
|
parseTheme,
|
|
11
|
-
resolveMediaSchedule,
|
|
12
11
|
serializeTheme
|
|
13
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-MMPBOUK7.js";
|
|
13
|
+
import {
|
|
14
|
+
getDocPlaybackDuration,
|
|
15
|
+
resolveMediaSchedule
|
|
16
|
+
} from "../chunk-FVJUUTEM.js";
|
|
14
17
|
import {
|
|
15
18
|
AVAILABLE_FONT_STACKS,
|
|
16
19
|
DARK_SURFACE,
|
|
@@ -27,27 +30,26 @@ import {
|
|
|
27
30
|
buildGoogleFontsUrl,
|
|
28
31
|
contrastRatio,
|
|
29
32
|
createTheme,
|
|
33
|
+
createThemeRegistry,
|
|
30
34
|
deriveScale,
|
|
31
35
|
fontStack,
|
|
32
36
|
getAvailableThemes,
|
|
33
37
|
getFontStack,
|
|
34
|
-
getRegisteredThemes,
|
|
35
38
|
getThemeSummaries,
|
|
39
|
+
guessFontFallback,
|
|
36
40
|
hexHueDegrees,
|
|
37
41
|
isHex,
|
|
38
|
-
|
|
42
|
+
matchFontFamily,
|
|
39
43
|
oklchDarken,
|
|
40
44
|
oklchLighten,
|
|
41
45
|
oklchSetChroma,
|
|
42
46
|
pickContrastingText,
|
|
43
|
-
registerTheme,
|
|
44
47
|
relativeLuminance,
|
|
45
48
|
resolveFontFamily,
|
|
46
49
|
resolveTheme,
|
|
47
|
-
unregisterTheme,
|
|
48
50
|
validateTheme,
|
|
49
51
|
withAlpha
|
|
50
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-W4O2TX5I.js";
|
|
51
53
|
import {
|
|
52
54
|
DEFAULT_DOC_FONT,
|
|
53
55
|
DEFAULT_TITLE_FONT,
|
|
@@ -64,7 +66,7 @@ import {
|
|
|
64
66
|
isTemplateBlock,
|
|
65
67
|
scaledFontSize,
|
|
66
68
|
scaledFontSize2
|
|
67
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-5J4HKRJF.js";
|
|
68
70
|
import {
|
|
69
71
|
DEFAULT_TRANSITION_DURATION_SECONDS,
|
|
70
72
|
TRANSITION_DIRECTIONS,
|
|
@@ -93,6 +95,7 @@ export {
|
|
|
93
95
|
TRANSITION_DIRECTIONS,
|
|
94
96
|
TRANSITION_TYPES,
|
|
95
97
|
VIEWPORT_PRESETS,
|
|
98
|
+
accentToColorScheme,
|
|
96
99
|
applySurface,
|
|
97
100
|
assertTheme,
|
|
98
101
|
buildGoogleFontsUrl,
|
|
@@ -102,6 +105,7 @@ export {
|
|
|
102
105
|
contrastRatio,
|
|
103
106
|
createTemplateContext,
|
|
104
107
|
createTheme,
|
|
108
|
+
createThemeRegistry,
|
|
105
109
|
deriveColorPalette,
|
|
106
110
|
deriveScale,
|
|
107
111
|
fontStack,
|
|
@@ -112,20 +116,20 @@ export {
|
|
|
112
116
|
getDocPlaybackDuration,
|
|
113
117
|
getFontStack,
|
|
114
118
|
getLayoutHints,
|
|
115
|
-
getRegisteredThemes,
|
|
116
119
|
getSafeTextBounds,
|
|
117
120
|
getSegmentAtTime,
|
|
118
121
|
getThemeSummaries,
|
|
119
122
|
getTwoColumnPositions,
|
|
120
123
|
getViewport,
|
|
121
124
|
getViewportOrientation,
|
|
125
|
+
guessFontFallback,
|
|
122
126
|
hexHueDegrees,
|
|
123
127
|
isHex,
|
|
124
128
|
isPersistentLayerTemplate,
|
|
125
129
|
isTemplateBlock,
|
|
126
130
|
isTransitionType,
|
|
127
131
|
scaledFontSize as layoutScaledFontSize,
|
|
128
|
-
|
|
132
|
+
matchFontFamily,
|
|
129
133
|
normalizeTransitionDirection,
|
|
130
134
|
normalizeTransitionType,
|
|
131
135
|
oklchDarken,
|
|
@@ -133,7 +137,6 @@ export {
|
|
|
133
137
|
oklchSetChroma,
|
|
134
138
|
parseTheme,
|
|
135
139
|
pickContrastingText,
|
|
136
|
-
registerTheme,
|
|
137
140
|
relativeLuminance,
|
|
138
141
|
resolveBlockTransition,
|
|
139
142
|
resolveFontFamily,
|
|
@@ -142,7 +145,6 @@ export {
|
|
|
142
145
|
resolveTransitionDuration,
|
|
143
146
|
scaledFontSize2 as scaledFontSize,
|
|
144
147
|
serializeTheme,
|
|
145
|
-
unregisterTheme,
|
|
146
148
|
validateTheme,
|
|
147
149
|
withAlpha
|
|
148
150
|
};
|
package/dist/spatial/index.d.ts
CHANGED
package/dist/spatial/index.js
CHANGED
package/dist/storage/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aC as Theme, aF as ThemeRegistry } from './Doc-ylqWKDc_.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Built-in Theme Library
|
|
@@ -11,27 +11,26 @@ import { az as Theme } from './Doc-BBVGq1_9.js';
|
|
|
11
11
|
* ```ts
|
|
12
12
|
* import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
|
|
13
13
|
*
|
|
14
|
-
* const theme = resolveTheme('minimalist'); // by id
|
|
14
|
+
* const theme = resolveTheme('minimalist'); // built-in lookup by id
|
|
15
15
|
* const theme = THEMES.documentary; // direct access to a built-in
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/** All built-in themes, keyed by id. */
|
|
20
|
-
declare const THEMES: Record<string, Theme
|
|
20
|
+
declare const THEMES: Readonly<Record<string, Theme>>;
|
|
21
21
|
/** The default theme id. */
|
|
22
22
|
declare const DEFAULT_THEME_ID = "standard";
|
|
23
23
|
/** The default theme (standard — safe system fonts, no external dependencies). */
|
|
24
24
|
declare const DEFAULT_THEME: Theme;
|
|
25
25
|
/**
|
|
26
|
-
* Resolve a theme by id.
|
|
27
|
-
* take precedence over built-ins;
|
|
28
|
-
* the default theme is returned for unknown ids.
|
|
26
|
+
* Resolve a theme by id. When a caller-owned registry is supplied its themes
|
|
27
|
+
* take precedence over built-ins; unknown ids fall back to the default.
|
|
29
28
|
*/
|
|
30
|
-
declare function resolveTheme(id: string | undefined): Theme;
|
|
31
|
-
/** Get
|
|
32
|
-
declare function getAvailableThemes(): string[];
|
|
33
|
-
/** Get
|
|
34
|
-
declare function getThemeSummaries(): Array<{
|
|
29
|
+
declare function resolveTheme(id: string | undefined, registry?: ThemeRegistry): Theme;
|
|
30
|
+
/** Get built-in ids plus ids from an optional caller-owned registry. */
|
|
31
|
+
declare function getAvailableThemes(registry?: ThemeRegistry): string[];
|
|
32
|
+
/** Get summaries for built-ins plus an optional caller-owned registry. */
|
|
33
|
+
declare function getThemeSummaries(registry?: ThemeRegistry): Array<{
|
|
35
34
|
id: string;
|
|
36
35
|
name: string;
|
|
37
36
|
description?: string;
|
package/dist/timing/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import "../chunk-DNJKBAI7.js";
|
|
2
|
+
import {
|
|
3
|
+
estimateNarrationTime,
|
|
4
|
+
estimateReadingTime
|
|
5
|
+
} from "../chunk-4X3JQXNM.js";
|
|
2
6
|
import {
|
|
3
7
|
DEFAULT_WORDS_PER_SECOND,
|
|
4
8
|
calculatePrefixDuration,
|
|
5
9
|
countSpokenWords,
|
|
6
10
|
estimateNarrationDuration,
|
|
7
|
-
estimateNarrationTime,
|
|
8
|
-
estimateReadingTime,
|
|
9
11
|
estimateSpokenWordCount,
|
|
10
12
|
estimateTimeFromText
|
|
11
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-3E5F2XMR.js";
|
|
12
14
|
export {
|
|
13
15
|
DEFAULT_WORDS_PER_SECOND,
|
|
14
16
|
calculatePrefixDuration,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as ColorScheme,
|
|
1
|
+
import { m as ColorScheme, F as Doc, B as Block } from '../Doc-ylqWKDc_.js';
|
|
2
2
|
import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-BwMPl2CB.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Transform Types
|
|
@@ -10,7 +10,7 @@ import '../types-DlAZ7MW4.js';
|
|
|
10
10
|
* presentation. Transforms are read-only on the input and deterministic.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
/** Identifier for a registered transform style. */
|
|
13
|
+
/** Identifier for a built-in or caller-registered transform style. */
|
|
14
14
|
type TransformStyleId = string;
|
|
15
15
|
/** Summary info for UI dropdowns (mirrors getThemeSummaries pattern). */
|
|
16
16
|
interface TransformStyleSummary {
|
|
@@ -80,6 +80,15 @@ interface TransformStyleConfig {
|
|
|
80
80
|
slidesPerMinute?: number;
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
+
/** Built-in id or a call-scoped declarative style definition. */
|
|
84
|
+
type TransformStyleInput = TransformStyleId | TransformStyleConfig;
|
|
85
|
+
/** Explicit caller-owned registry for custom transform styles. */
|
|
86
|
+
interface TransformStyleRegistry {
|
|
87
|
+
register(style: TransformStyleConfig): void;
|
|
88
|
+
unregister(id: string): boolean;
|
|
89
|
+
get(id: string): TransformStyleConfig | undefined;
|
|
90
|
+
list(): TransformStyleConfig[];
|
|
91
|
+
}
|
|
83
92
|
/** Image metadata for image interleaving. */
|
|
84
93
|
interface TransformImage {
|
|
85
94
|
/** Image source path or URL. */
|
|
@@ -101,6 +110,8 @@ interface TransformOptions {
|
|
|
101
110
|
themeId?: string;
|
|
102
111
|
/** Override specific style config values. */
|
|
103
112
|
overrides?: Partial<TransformStyleConfig>;
|
|
113
|
+
/** Caller-owned registry used when `style` is an id. */
|
|
114
|
+
registry?: TransformStyleRegistry;
|
|
104
115
|
}
|
|
105
116
|
/** Result of applying a transform. */
|
|
106
117
|
interface TransformResult {
|
|
@@ -129,40 +140,40 @@ interface TransformResult {
|
|
|
129
140
|
* optimized for visual presentation.
|
|
130
141
|
*
|
|
131
142
|
* @param doc - The source Doc (not mutated).
|
|
132
|
-
* @param
|
|
133
|
-
* @param options - Optional seed, images, theme override.
|
|
143
|
+
* @param style - Built-in/registry id or a call-scoped declarative style.
|
|
144
|
+
* @param options - Optional seed, images, theme override, and explicit registry.
|
|
134
145
|
* @returns TransformResult with the new Doc and stats.
|
|
135
146
|
*/
|
|
136
|
-
declare function applyTransform(doc: Doc,
|
|
147
|
+
declare function applyTransform(doc: Doc, style: TransformStyleInput, options?: TransformOptions): TransformResult;
|
|
137
148
|
|
|
138
149
|
/**
|
|
139
150
|
* Transform Style Registry
|
|
140
151
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* `registerTheme` — registered styles take precedence over built-ins,
|
|
144
|
-
* unknown ids fall back to the default.
|
|
152
|
+
* Immutable built-in lookup plus explicit caller-owned custom registries.
|
|
153
|
+
* There is deliberately no process-global mutable registry.
|
|
145
154
|
*/
|
|
146
155
|
|
|
147
156
|
/** Default style used when no id is provided. */
|
|
148
157
|
declare const DEFAULT_TRANSFORM_STYLE_ID = "documentary";
|
|
149
158
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
159
|
+
* Create a caller-owned registry. Custom styles are validated, cloned, and
|
|
160
|
+
* deeply frozen at registration time. Built-in resolution remains in the
|
|
161
|
+
* top-level helpers, separate from the registry's caller-owned state.
|
|
153
162
|
*/
|
|
154
|
-
declare function
|
|
155
|
-
/** Remove a previously registered custom style. */
|
|
156
|
-
declare function unregisterTransformStyle(id: string): void;
|
|
163
|
+
declare function createTransformStyleRegistry(initialStyles?: readonly TransformStyleConfig[]): TransformStyleRegistry;
|
|
157
164
|
/**
|
|
158
|
-
* Resolve a
|
|
159
|
-
*
|
|
165
|
+
* Resolve a built-in id, explicit-registry id, or call-scoped style config.
|
|
166
|
+
* Unknown ids fall back to the default style.
|
|
160
167
|
*/
|
|
161
|
-
declare function resolveTransformStyle(
|
|
162
|
-
/** Get
|
|
163
|
-
declare function getTransformStyleIds(): string[];
|
|
164
|
-
/** Get
|
|
165
|
-
declare function getTransformStyleSummaries():
|
|
168
|
+
declare function resolveTransformStyle(style: TransformStyleInput, registry?: TransformStyleRegistry): TransformStyleConfig;
|
|
169
|
+
/** Get built-in ids plus ids from an optional caller-owned registry. */
|
|
170
|
+
declare function getTransformStyleIds(registry?: TransformStyleRegistry): string[];
|
|
171
|
+
/** Get summaries for built-ins plus an optional caller-owned registry. */
|
|
172
|
+
declare function getTransformStyleSummaries(registry?: TransformStyleRegistry): {
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
description: string;
|
|
176
|
+
}[];
|
|
166
177
|
|
|
167
178
|
/**
|
|
168
179
|
* Block Analyzer
|
|
@@ -210,4 +221,4 @@ declare function extractDocImages(blocks: Block[]): TransformImage[];
|
|
|
210
221
|
*/
|
|
211
222
|
declare function analyzeBlocks(blocks: Block[], options?: ExtractionOptions): AnalyzedBlock[];
|
|
212
223
|
|
|
213
|
-
export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleSummary, analyzeBlocks, applyTransform, extractDocImages, getTransformStyleIds, getTransformStyleSummaries,
|
|
224
|
+
export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, analyzeBlocks, applyTransform, createTransformStyleRegistry, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, resolveTransformStyle };
|
package/dist/transform/index.js
CHANGED
|
@@ -2,26 +2,25 @@ import {
|
|
|
2
2
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
3
3
|
analyzeBlocks,
|
|
4
4
|
applyTransform,
|
|
5
|
+
createTransformStyleRegistry,
|
|
5
6
|
extractDocImages,
|
|
6
7
|
getTransformStyleIds,
|
|
7
8
|
getTransformStyleSummaries,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
resolveTransformStyle
|
|
10
|
+
} from "../chunk-PXLVXTLW.js";
|
|
11
|
+
import "../chunk-Q7LROV2H.js";
|
|
12
|
+
import "../chunk-5J4HKRJF.js";
|
|
13
|
+
import "../chunk-AMIR72JP.js";
|
|
14
|
+
import "../chunk-3E5F2XMR.js";
|
|
13
15
|
import "../chunk-FVTQSNR7.js";
|
|
14
|
-
import "../chunk-DLXZMS5K.js";
|
|
15
|
-
import "../chunk-HWVFJAAH.js";
|
|
16
16
|
export {
|
|
17
17
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
18
18
|
analyzeBlocks,
|
|
19
19
|
applyTransform,
|
|
20
|
+
createTransformStyleRegistry,
|
|
20
21
|
extractDocImages,
|
|
21
22
|
getTransformStyleIds,
|
|
22
23
|
getTransformStyleSummaries,
|
|
23
|
-
|
|
24
|
-
resolveTransformStyle,
|
|
25
|
-
unregisterTransformStyle
|
|
24
|
+
resolveTransformStyle
|
|
26
25
|
};
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -642,4 +642,4 @@ interface StringifyOptions {
|
|
|
642
642
|
setext?: boolean;
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
-
export { type TransitionType as $, type MarkdownLinkDefinition as A, type MarkdownLinkReference as B, type MarkdownList as C, DEFAULT_TRANSITION_DURATION_SECONDS as D, type MarkdownListItem as E, type MarkdownMathBlock as F, type MarkdownMention as G, type HeadingAttributes as H, type MarkdownNode as I, type MarkdownParagraph as J, type MarkdownPoint as K, type MarkdownSourcePosition as L, type MarkdownBlockNode as M, type MarkdownStrikethrough as N, type MarkdownStrong as O, type MarkdownTable as P, type MarkdownTableCell as Q, type MarkdownTableRow as R, type MarkdownText as S, type MarkdownTextDirective as T, type MarkdownThematicBreak as U, type ParseOptions as V, type StringifyOptions as W, TRANSITION_DIRECTIONS as X, TRANSITION_TYPES as Y, type Transition as Z, type TransitionDirection as _, type HeadingTemplateAnnotation as a, isTransitionType as a0, normalizeTransitionDirection as a1, normalizeTransitionType as a2, resolveBlockTransition as a3, resolveTransitionDuration as a4, type HtmlComment as b, type HtmlElement as c, type HtmlNode as d, type HtmlText as e, type MarkdownBlockquote as f, type MarkdownBreak as g, type MarkdownCodeBlock as h, type MarkdownContainerDirective as i, type MarkdownDefinitionDescription as j, type MarkdownDefinitionList as k, type MarkdownDefinitionTerm as l, type MarkdownDocument as m, type MarkdownEmphasis as n, type MarkdownFootnoteDefinition as o, type MarkdownFootnoteReference as p, type MarkdownHeading as q, type MarkdownHtmlBlock as r, type MarkdownImage as s, type MarkdownImageReference as t, type MarkdownInlineCode as u, type MarkdownInlineHtml as v, type MarkdownInlineMath as w, type MarkdownInlineNode as x, type MarkdownLeafDirective as y, type MarkdownLink as z };
|
|
645
|
+
export { type TransitionType as $, type MarkdownLinkDefinition as A, type MarkdownLinkReference as B, type MarkdownList as C, DEFAULT_TRANSITION_DURATION_SECONDS as D, type MarkdownListItem as E, type MarkdownMathBlock as F, type MarkdownMention as G, type HeadingAttributes as H, type MarkdownNode as I, type MarkdownParagraph as J, type MarkdownPoint as K, type MarkdownSourcePosition as L, type MarkdownBlockNode as M, type MarkdownStrikethrough as N, type MarkdownStrong as O, type MarkdownTable as P, type MarkdownTableCell as Q, type MarkdownTableRow as R, type MarkdownText as S, type MarkdownTextDirective as T, type MarkdownThematicBreak as U, type ParseOptions as V, type StringifyOptions as W, TRANSITION_DIRECTIONS as X, TRANSITION_TYPES as Y, type Transition as Z, type TransitionDirection as _, type HeadingTemplateAnnotation as a, isTransitionType as a0, normalizeTransitionDirection as a1, normalizeTransitionType as a2, resolveBlockTransition as a3, resolveTransitionDuration as a4, type BlockConnection as a5, type HtmlComment as b, type HtmlElement as c, type HtmlNode as d, type HtmlText as e, type MarkdownBlockquote as f, type MarkdownBreak as g, type MarkdownCodeBlock as h, type MarkdownContainerDirective as i, type MarkdownDefinitionDescription as j, type MarkdownDefinitionList as k, type MarkdownDefinitionTerm as l, type MarkdownDocument as m, type MarkdownEmphasis as n, type MarkdownFootnoteDefinition as o, type MarkdownFootnoteReference as p, type MarkdownHeading as q, type MarkdownHtmlBlock as r, type MarkdownImage as s, type MarkdownImageReference as t, type MarkdownInlineCode as u, type MarkdownInlineHtml as v, type MarkdownInlineMath as w, type MarkdownInlineNode as x, type MarkdownLeafDirective as y, type MarkdownLink as z };
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
* the document inside the same {@link ContentContainer}. They live under
|
|
6
6
|
* `.versions/<docBasename>.<sortableTimestamp>.md`. The container is the
|
|
7
7
|
* unit of persistence — when the host serializes the container to a ZIP,
|
|
8
|
-
* a real folder, or anywhere else, the version snapshots ride along.
|
|
8
|
+
* a real folder, or anywhere else, the version snapshots ride along. When
|
|
9
|
+
* snapshots are retained, a container-root `.gitignore` rule excludes the
|
|
10
|
+
* `.versions/` folder from Git.
|
|
9
11
|
*/
|
|
10
12
|
/**
|
|
11
13
|
* A single version snapshot record.
|
package/dist/versions/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CoalesceOptions, V as Version, P as PrunePolicy, R as RevertOptions, S as SaveVersionOptions, a as SaveVersionResult } from '../types-
|
|
1
|
+
import { C as CoalesceOptions, V as Version, P as PrunePolicy, R as RevertOptions, S as SaveVersionOptions, a as SaveVersionResult } from '../types-C4kiRn_k.js';
|
|
2
2
|
import { C as ContentContainer } from '../ContentContainer-BXUlIf18.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -103,6 +103,7 @@ declare const VERSION_TIMESTAMP_PATTERN: RegExp;
|
|
|
103
103
|
* The optional numeric suffix (`-2`, `-3`, ...) is appended only when two
|
|
104
104
|
* snapshots collide on the same UTC second.
|
|
105
105
|
*/
|
|
106
|
+
|
|
106
107
|
/** Subfolder (inside the ContentContainer) that holds version snapshots. */
|
|
107
108
|
declare const VERSIONS_PREFIX = ".versions/";
|
|
108
109
|
/**
|
package/dist/versions/index.js
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
readVersion,
|
|
11
11
|
revertToVersion,
|
|
12
12
|
saveVersion
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-JOQYPRDZ.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION_TIMESTAMP_PATTERN,
|
|
16
16
|
formatVersionTimestamp,
|
|
17
17
|
parseVersionTimestamp
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-S7A5D7ZJ.js";
|
|
19
19
|
export {
|
|
20
20
|
DocumentVersionManager,
|
|
21
21
|
VERSIONS_PREFIX,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/squisq",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -46,11 +46,6 @@
|
|
|
46
46
|
"import": "./dist/spatial/index.js",
|
|
47
47
|
"default": "./dist/spatial/index.js"
|
|
48
48
|
},
|
|
49
|
-
"./story": {
|
|
50
|
-
"types": "./dist/story/index.d.ts",
|
|
51
|
-
"import": "./dist/story/index.js",
|
|
52
|
-
"default": "./dist/story/index.js"
|
|
53
|
-
},
|
|
54
49
|
"./doc": {
|
|
55
50
|
"types": "./dist/doc/index.d.ts",
|
|
56
51
|
"import": "./dist/doc/index.js",
|
|
@@ -115,6 +110,11 @@
|
|
|
115
110
|
"types": "./dist/recommend/index.d.ts",
|
|
116
111
|
"import": "./dist/recommend/index.js",
|
|
117
112
|
"default": "./dist/recommend/index.js"
|
|
113
|
+
},
|
|
114
|
+
"./narration": {
|
|
115
|
+
"types": "./dist/narration/index.d.ts",
|
|
116
|
+
"import": "./dist/narration/index.js",
|
|
117
|
+
"default": "./dist/narration/index.js"
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|