@bendyline/squisq 1.4.1 → 1.5.0
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/dist/{Doc-BeSeH2iX.d.ts → Doc-BsMkmzH8.d.ts} +838 -268
- package/dist/{ImageEditDoc-BTIvw0oq.d.ts → ImageEditDoc-DvoeHMP9.d.ts} +11 -4
- package/dist/{chunk-ZTX4PFFT.js → chunk-2OIBZYKP.js} +75 -2
- package/dist/chunk-2OIBZYKP.js.map +1 -0
- package/dist/chunk-2UQOHYE2.js +45 -0
- package/dist/chunk-2UQOHYE2.js.map +1 -0
- package/dist/{chunk-B4EEON3N.js → chunk-4AKUQPEE.js} +536 -103
- package/dist/chunk-4AKUQPEE.js.map +1 -0
- package/dist/chunk-4ZFRZBU2.js +6582 -0
- package/dist/chunk-4ZFRZBU2.js.map +1 -0
- package/dist/{chunk-57CVQCFX.js → chunk-7MQGNR76.js} +79 -3
- package/dist/chunk-7MQGNR76.js.map +1 -0
- package/dist/{chunk-5WFRKURX.js → chunk-DLXZMS5K.js} +4 -2
- package/dist/chunk-DLXZMS5K.js.map +1 -0
- package/dist/{chunk-MYIH7FWD.js → chunk-FBKP5CAO.js} +1 -1
- package/dist/chunk-FBKP5CAO.js.map +1 -0
- package/dist/chunk-KZNXZ5SM.js +333 -0
- package/dist/chunk-KZNXZ5SM.js.map +1 -0
- package/dist/{chunk-WMOI7FN3.js → chunk-LRCV7N7F.js} +12 -2
- package/dist/{chunk-WMOI7FN3.js.map → chunk-LRCV7N7F.js.map} +1 -1
- package/dist/{chunk-3K5OG6KI.js → chunk-OH43RPTP.js} +403 -187
- package/dist/chunk-OH43RPTP.js.map +1 -0
- package/dist/{chunk-H3AXU4MJ.js → chunk-OKJOQXK4.js} +149 -2
- package/dist/chunk-OKJOQXK4.js.map +1 -0
- package/dist/chunk-PGGGKYWG.js +1 -0
- package/dist/chunk-PGGGKYWG.js.map +1 -0
- package/dist/{chunk-7UDSRZKG.js → chunk-Q3ROPT5H.js} +35 -14
- package/dist/chunk-Q3ROPT5H.js.map +1 -0
- package/dist/chunk-QE7TWGVT.js +178 -0
- package/dist/chunk-QE7TWGVT.js.map +1 -0
- package/dist/chunk-RUDYOTA6.js +345 -0
- package/dist/chunk-RUDYOTA6.js.map +1 -0
- package/dist/chunk-TVSGLUID.js +596 -0
- package/dist/chunk-TVSGLUID.js.map +1 -0
- package/dist/chunk-ZLQKNOZQ.js +1 -0
- package/dist/chunk-ZLQKNOZQ.js.map +1 -0
- package/dist/doc/index.d.ts +4 -4
- package/dist/doc/index.js +124 -6
- package/dist/generate/index.d.ts +9 -2
- package/dist/generate/index.js +1 -1
- package/dist/icons/index.d.ts +3 -26
- package/dist/icons/index.js +13 -0
- package/dist/icons/inlineIconMarker.d.ts +1 -0
- package/dist/icons/inlineIconMarker.js +15 -0
- package/dist/icons/inlineIconMarker.js.map +1 -0
- package/dist/imageEdit/index.d.ts +11 -5
- package/dist/imageEdit/index.js +4 -1
- package/dist/index.d.ts +11 -8
- package/dist/index.js +243 -24
- package/dist/inlineIconMarker-CiE8Hlvz.d.ts +59 -0
- package/dist/markdown/index.d.ts +212 -3
- package/dist/markdown/index.js +40 -7
- package/dist/recommend/index.d.ts +1 -1
- package/dist/recommend/index.js +3 -2
- package/dist/schemas/index.d.ts +28 -8
- package/dist/schemas/index.js +35 -5
- package/dist/spatial/index.d.ts +9 -4
- package/dist/spatial/index.js +1 -1
- package/dist/story/index.d.ts +906 -40
- package/dist/story/index.js +124 -6
- package/dist/{themeLibrary-BHjJ0Qx6.d.ts → themeLibrary-DQQKuRMx.d.ts} +1 -1
- package/dist/transform/index.d.ts +48 -10
- package/dist/transform/index.js +17 -481
- package/dist/transform/index.js.map +1 -1
- package/dist/{types-BdZkdJ3z.d.ts → types-DlAZ7MW4.d.ts} +115 -1
- package/package.json +6 -1
- package/src/__tests__/animationUtils.test.ts +40 -0
- package/src/__tests__/annotationCoercion.test.ts +243 -0
- package/src/__tests__/applyRenderStyle.test.ts +146 -0
- package/src/__tests__/atmosphereLayers.test.ts +108 -0
- package/src/__tests__/attrTokens.test.ts +162 -0
- package/src/__tests__/customTemplateSample.test.ts +83 -0
- package/src/__tests__/customTemplatesFrontmatter.test.ts +205 -0
- package/src/__tests__/customThemesFrontmatter.test.ts +118 -0
- package/src/__tests__/diagramBlock.test.ts +122 -0
- package/src/__tests__/diagramLayout.test.ts +134 -0
- package/src/__tests__/drawing.test.ts +109 -0
- package/src/__tests__/drawingBlock.test.ts +124 -0
- package/src/__tests__/drawingLayout.test.ts +171 -0
- package/src/__tests__/geohash.test.ts +6 -5
- package/src/__tests__/getLayers.test.ts +6 -2
- package/src/__tests__/getLayersFallback.test.ts +103 -0
- package/src/__tests__/imageEditExportSvg.test.ts +70 -0
- package/src/__tests__/imageEditVersions.test.ts +72 -0
- package/src/__tests__/inlineIconMarker.test.ts +36 -0
- package/src/__tests__/layoutBlock.test.ts +83 -0
- package/src/__tests__/layoutLayout.test.ts +169 -0
- package/src/__tests__/markdown.test.ts +23 -0
- package/src/__tests__/markdownSanitize.test.ts +64 -0
- package/src/__tests__/markdownToDoc.test.ts +223 -2
- package/src/__tests__/mediaAnnotations.test.ts +64 -0
- package/src/__tests__/mediaSchedule.test.ts +118 -0
- package/src/__tests__/pandocAttrParse.test.ts +187 -0
- package/src/__tests__/resolveDocTheme.test.ts +55 -0
- package/src/__tests__/rootExports.test.ts +43 -0
- package/src/__tests__/shapeGeometry.test.ts +89 -0
- package/src/__tests__/shapeVocabulary.test.ts +133 -0
- package/src/__tests__/structuredData.test.ts +179 -0
- package/src/__tests__/templateAnnotationParse.test.ts +108 -0
- package/src/__tests__/templateMetadata.test.ts +21 -0
- package/src/__tests__/templates.test.ts +145 -4
- package/src/__tests__/themeCompile.test.ts +42 -0
- package/src/__tests__/themeValidator.test.ts +6 -0
- package/src/__tests__/transformV2.test.ts +137 -0
- package/src/__tests__/transitionNormalize.test.ts +61 -0
- package/src/__tests__/validateDoc.test.ts +100 -0
- package/src/doc/customTemplatesFrontmatter.ts +308 -0
- package/src/doc/customThemesFrontmatter.ts +90 -0
- package/src/doc/docToMarkdown.ts +73 -4
- package/src/doc/getLayers.ts +40 -17
- package/src/doc/index.ts +35 -1
- package/src/doc/markdownToDoc.ts +333 -12
- package/src/doc/mediaAnnotations.ts +118 -0
- package/src/doc/resolveDocTheme.ts +55 -0
- package/src/doc/structuredData.ts +230 -0
- package/src/doc/templateInputs.ts +240 -0
- package/src/doc/templates/__tests__/customTemplate.test.ts +151 -0
- package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +110 -0
- package/src/doc/templates/accentImage.ts +30 -6
- package/src/doc/templates/captionUtils.ts +23 -0
- package/src/doc/templates/comparisonBar.ts +26 -18
- package/src/doc/templates/coverBlock.ts +7 -4
- package/src/doc/templates/customTemplate.ts +45 -0
- package/src/doc/templates/dataTable.ts +37 -19
- package/src/doc/templates/dateEvent.ts +41 -20
- package/src/doc/templates/definitionCard.ts +26 -18
- package/src/doc/templates/diagramBlock.ts +204 -0
- package/src/doc/templates/diagramLayout.ts +159 -0
- package/src/doc/templates/drawingBlock.ts +325 -0
- package/src/doc/templates/drawingLayout.ts +539 -0
- package/src/doc/templates/factCard.ts +51 -25
- package/src/doc/templates/fallbackBlock.ts +123 -0
- package/src/doc/templates/featureBlock.ts +20 -13
- package/src/doc/templates/fullBleedQuote.ts +18 -8
- package/src/doc/templates/imageWithCaption.ts +22 -9
- package/src/doc/templates/index.ts +215 -46
- package/src/doc/templates/layoutBlock.ts +43 -0
- package/src/doc/templates/layoutLayout.ts +243 -0
- package/src/doc/templates/listBlock.ts +56 -30
- package/src/doc/templates/mapBlock.ts +15 -12
- package/src/doc/templates/metadata.ts +120 -0
- package/src/doc/templates/persistentLayers.ts +129 -11
- package/src/doc/templates/photoGrid.ts +23 -12
- package/src/doc/templates/pullQuote.ts +30 -12
- package/src/doc/templates/quoteBlock.ts +54 -29
- package/src/doc/templates/sectionHeader.ts +25 -11
- package/src/doc/templates/statHighlight.ts +39 -22
- package/src/doc/templates/titleBlock.ts +59 -21
- package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +221 -0
- package/src/doc/templates/tokens/resolveTokens.ts +0 -0
- package/src/doc/templates/twoColumn.ts +48 -30
- package/src/doc/templates/videoPullQuote.ts +22 -12
- package/src/doc/templates/videoWithCaption.ts +13 -8
- package/src/doc/utils/animationUtils.ts +267 -3
- package/src/doc/utils/applyRenderStyle.ts +113 -0
- package/src/doc/utils/imageTreatment.ts +70 -0
- package/src/doc/utils/shapeGeometry.ts +464 -0
- package/src/doc/utils/themeUtils.ts +75 -1
- package/src/doc/validate.ts +476 -0
- package/src/generate/slideshowGenerator.ts +7 -0
- package/src/icons/index.ts +8 -0
- package/src/icons/inlineIconMarker.ts +73 -0
- package/src/imageEdit/export.ts +85 -2
- package/src/imageEdit/index.ts +1 -0
- package/src/imageEdit/persistence.ts +51 -0
- package/src/index.ts +2 -0
- package/src/markdown/annotationCoercion.ts +295 -0
- package/src/markdown/attrTokens.ts +222 -0
- package/src/markdown/convert.ts +229 -26
- package/src/markdown/index.ts +36 -0
- package/src/markdown/sanitize.ts +298 -0
- package/src/markdown/stringify.ts +84 -3
- package/src/markdown/types.ts +66 -0
- package/src/markdown/utils.ts +49 -1
- package/src/recommend/templates.ts +24 -0
- package/src/schemas/BlockTemplates.ts +133 -4
- package/src/schemas/CustomTemplates.ts +74 -0
- package/src/schemas/Doc.ts +353 -29
- package/src/schemas/ImageEditDoc.ts +11 -4
- package/src/schemas/Media.ts +169 -0
- package/src/schemas/Theme.ts +23 -1
- package/src/schemas/Transitions.ts +224 -0
- package/src/schemas/colorUtils.ts +33 -0
- package/src/schemas/fontStacks.ts +5 -2
- package/src/schemas/index.ts +3 -0
- package/src/schemas/themeCompile.ts +23 -4
- package/src/schemas/themeValidator.ts +49 -11
- package/src/schemas/themes/cinematic.json +69 -12
- package/src/schemas/themes/documentary.json +58 -11
- package/src/schemas/themes/gezellig.json +60 -11
- package/src/schemas/themes/magazine.json +54 -9
- package/src/schemas/themes/morning-light.json +52 -9
- package/src/schemas/themes/standard-dark.json +48 -13
- package/src/schemas/themes/standard.json +44 -12
- package/src/schemas/themes/tech-dark.json +65 -12
- package/src/spatial/Geohash.ts +52 -21
- package/src/transform/applyTransform.ts +43 -4
- package/src/transform/index.ts +1 -0
- package/src/transform/registry.ts +44 -13
- package/src/transform/styles/dataDriven.ts +2 -1
- package/src/transform/styles/documentary.ts +2 -1
- package/src/transform/styles/magazine.ts +3 -1
- package/src/transform/styles/minimal.ts +2 -1
- package/src/transform/styles/narrative.ts +3 -1
- package/src/transform/templateSelector.ts +87 -11
- package/src/transform/types.ts +35 -2
- package/dist/chunk-3K5OG6KI.js.map +0 -1
- package/dist/chunk-57CVQCFX.js.map +0 -1
- package/dist/chunk-5WFRKURX.js.map +0 -1
- package/dist/chunk-7UDSRZKG.js.map +0 -1
- package/dist/chunk-B4EEON3N.js.map +0 -1
- package/dist/chunk-H3AXU4MJ.js.map +0 -1
- package/dist/chunk-KSWJR66U.js +0 -3706
- package/dist/chunk-KSWJR66U.js.map +0 -1
- package/dist/chunk-MYIH7FWD.js.map +0 -1
- package/dist/chunk-ZTX4PFFT.js.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iconData.ts — GENERATED FILE
|
|
3
|
+
*
|
|
4
|
+
* FontAwesome Free icon catalog. Run `node scripts/generate-icon-data.mjs`
|
|
5
|
+
* to regenerate after bumping @fortawesome/fontawesome-free.
|
|
6
|
+
*
|
|
7
|
+
* Entry count: 2141
|
|
8
|
+
* Generated: 2026-05-14T03:38:13.863Z
|
|
9
|
+
*/
|
|
10
|
+
type IconFamily = 'brands' | 'solid' | 'regular';
|
|
11
|
+
interface IconEntry {
|
|
12
|
+
/** Icon name without the `fa-` prefix (e.g. `github`). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Family bucket — drives the `fa-brands` / `fa-solid` / `fa-regular` class. */
|
|
15
|
+
family: IconFamily;
|
|
16
|
+
/** Human display label (used by the picker tooltip). */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Lowercase, space-joined search keywords. */
|
|
19
|
+
keywords: string;
|
|
20
|
+
/** FontAwesome Private-Use-Area codepoint as a hex string (e.g. `'f09b'`).
|
|
21
|
+
* Use `String.fromCodePoint(parseInt(unicode, 16))` to get the rendered
|
|
22
|
+
* glyph when the FA font is loaded. */
|
|
23
|
+
unicode: string;
|
|
24
|
+
}
|
|
25
|
+
declare const ICONS: IconEntry[];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Inline-icon markers for template text.
|
|
29
|
+
*
|
|
30
|
+
* Slide templates flatten rich markdown body content into strings before
|
|
31
|
+
* rendering. Inline icons need to survive that flattening step, so we encode
|
|
32
|
+
* them as sentinel-delimited text markers and let `TextLayer` turn them back
|
|
33
|
+
* into FontAwesome glyphs when rendering.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** Encode a resolved icon (family + name) as an embeddable text marker. */
|
|
37
|
+
declare function iconMarker(family: IconFamily, name: string): string;
|
|
38
|
+
/** True when a string contains at least one encoded icon marker. */
|
|
39
|
+
declare function hasIconMarker(value: string): boolean;
|
|
40
|
+
/** Remove every icon marker, leaving a clean plain-text projection. */
|
|
41
|
+
declare function stripIconMarkers(value: string): string;
|
|
42
|
+
/** A run of a marker-bearing string: literal text or a resolved icon. */
|
|
43
|
+
type IconTextRun = {
|
|
44
|
+
type: 'text';
|
|
45
|
+
text: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'icon';
|
|
48
|
+
family: IconFamily;
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Split a string into ordered text/icon runs. Text between markers is
|
|
53
|
+
* preserved verbatim, including whitespace; each marker becomes an icon run.
|
|
54
|
+
*/
|
|
55
|
+
declare function splitIconMarkers(value: string): IconTextRun[];
|
|
56
|
+
/** FontAwesome CSS class for a resolved icon, e.g. `fa-solid fa-rocket`. */
|
|
57
|
+
declare function iconClass(family: IconFamily, name: string): string;
|
|
58
|
+
|
|
59
|
+
export { ICONS as I, type IconEntry as a, type IconFamily as b, type IconTextRun as c, iconMarker as d, stripIconMarkers as e, hasIconMarker as h, iconClass as i, splitIconMarkers as s };
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { V as ParseOptions, m as MarkdownDocument, W as StringifyOptions, H as HeadingAttributes, d as HtmlNode, I as MarkdownNode } from '../types-DlAZ7MW4.js';
|
|
2
|
+
export { a as HeadingTemplateAnnotation, b as HtmlComment, c as HtmlElement, e as HtmlText, M as MarkdownBlockNode, f as MarkdownBlockquote, g as MarkdownBreak, h as MarkdownCodeBlock, i as MarkdownContainerDirective, j as MarkdownDefinitionDescription, k as MarkdownDefinitionList, l as MarkdownDefinitionTerm, n as MarkdownEmphasis, o as MarkdownFootnoteDefinition, p as MarkdownFootnoteReference, q as MarkdownHeading, r as MarkdownHtmlBlock, s as MarkdownImage, t as MarkdownImageReference, u as MarkdownInlineCode, v as MarkdownInlineHtml, w as MarkdownInlineMath, x as MarkdownInlineNode, y as MarkdownLeafDirective, z as MarkdownLink, A as MarkdownLinkDefinition, B as MarkdownLinkReference, C as MarkdownList, E as MarkdownListItem, F as MarkdownMathBlock, G as MarkdownMention, J as MarkdownParagraph, K as MarkdownPoint, L as MarkdownSourcePosition, N as MarkdownStrikethrough, O as MarkdownStrong, P as MarkdownTable, Q as MarkdownTableCell, R as MarkdownTableRow, S as MarkdownText, T as MarkdownTextDirective, U as MarkdownThematicBreak } from '../types-DlAZ7MW4.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Markdown → JSON Parser
|
|
@@ -112,6 +112,29 @@ interface MdastNode {
|
|
|
112
112
|
attributes?: Record<string, string>;
|
|
113
113
|
data?: Record<string, unknown>;
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Parse the inner content of a Pandoc-style `{…}` block. Tokens are
|
|
117
|
+
* whitespace-separated, with quoted runs (single or double) treated as
|
|
118
|
+
* single tokens — tokenization is shared with the `{[…]}` template
|
|
119
|
+
* annotation parser via {@link tokenizeAttrTokens}.
|
|
120
|
+
*
|
|
121
|
+
* - `#id` → `attributes.id`
|
|
122
|
+
* - `.class` → push onto `attributes.classes`
|
|
123
|
+
* - `key=value` or `key="quoted value"` → `attributes.params[key] = value`
|
|
124
|
+
*
|
|
125
|
+
* Empty `{}` yields `{}` (preserved as an annotation marker for round-tripping).
|
|
126
|
+
* Duplicate ids and keys: last wins, silent.
|
|
127
|
+
*/
|
|
128
|
+
declare function parsePandocAttrTokens(inner: string): HeadingAttributes;
|
|
129
|
+
/**
|
|
130
|
+
* Serialize a HeadingAttributes object back to a Pandoc `{#id .class key=value}` string.
|
|
131
|
+
* Returns null when the attributes object is entirely empty (nothing to emit).
|
|
132
|
+
*
|
|
133
|
+
* Canonical key order: `#id`, then `.classes` (in original order), then
|
|
134
|
+
* params in their original insertion order. Values are quoted via the
|
|
135
|
+
* shared {@link quoteAttrValue} rule (same as `{[…]}` serialization).
|
|
136
|
+
*/
|
|
137
|
+
declare function serializePandocAttributes(attrs: HeadingAttributes): string | null;
|
|
115
138
|
/**
|
|
116
139
|
* Convert an mdast Root node to a MarkdownDocument.
|
|
117
140
|
*
|
|
@@ -130,6 +153,164 @@ declare function fromMdast(root: MdastNode, options?: {
|
|
|
130
153
|
*/
|
|
131
154
|
declare function toMdast(doc: MarkdownDocument): MdastNode;
|
|
132
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Shared key=value attribute machinery for the two heading annotation forms:
|
|
158
|
+
* the squisq-native `{[templateName key=value …]}` template annotation and
|
|
159
|
+
* the Pandoc-style `{#id .class key=value}` attribute block.
|
|
160
|
+
*
|
|
161
|
+
* Both forms share one interior grammar — whitespace-separated tokens whose
|
|
162
|
+
* values may be quoted (double or single) to include spaces, brackets, or
|
|
163
|
+
* quote characters. This module is the single implementation of that
|
|
164
|
+
* grammar: one tokenizer, one value un/escaper, one quoting rule. The
|
|
165
|
+
* trailing-annotation recognizers live here too so the editor bridge
|
|
166
|
+
* (packages/editor-react/src/tiptapBridge.ts) stays in sync by importing
|
|
167
|
+
* them rather than copying regexes.
|
|
168
|
+
*
|
|
169
|
+
* Value syntax:
|
|
170
|
+
* - Unquoted: no whitespace, quotes, or `[ ] { }` (those would collide with
|
|
171
|
+
* the surrounding annotation delimiters), e.g. `columns=3`, `name=O'Brien`
|
|
172
|
+
* (a quote *inside* an unquoted value is literal).
|
|
173
|
+
* - Quoted: `key="value with spaces"` or `key='…'`. Inside a quoted run,
|
|
174
|
+
* `\` escapes the active quote character and itself; any other `\` is
|
|
175
|
+
* literal. Quoted values may contain `]` and `}`.
|
|
176
|
+
* - Serialization emits double quotes, switching to single quotes when the
|
|
177
|
+
* value contains a double quote (markdown character-escape resolution
|
|
178
|
+
* makes backslash-escaped quotes fragile in `.md` source, so picking the
|
|
179
|
+
* other quote character is preferred over escaping). A value containing
|
|
180
|
+
* BOTH quote characters falls back to double quotes with `\"` escapes —
|
|
181
|
+
* that survives the API path but is best avoided in markdown source.
|
|
182
|
+
*/
|
|
183
|
+
/** Result of matching a trailing annotation against a text run. */
|
|
184
|
+
interface TrailingAnnotationMatch {
|
|
185
|
+
/** Interior of the brace block (between `{[`/`{` and `]}`/`}`), untrimmed. */
|
|
186
|
+
inner: string;
|
|
187
|
+
/** Offset of the match start (including leading whitespace) in the input. */
|
|
188
|
+
index: number;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Match a trailing `{[templateName key=value …]}` annotation. Quote-aware
|
|
192
|
+
* (values may contain `]` when quoted), with a legacy fallback so inputs
|
|
193
|
+
* the old `[^\]]+` grammar accepted still match.
|
|
194
|
+
*/
|
|
195
|
+
declare function matchTrailingTemplateAnnotation(text: string): TrailingAnnotationMatch | null;
|
|
196
|
+
/**
|
|
197
|
+
* Match a trailing Pandoc `{#id .class key=value}` block. Quote-aware
|
|
198
|
+
* (values may contain `}` when quoted), with a legacy fallback.
|
|
199
|
+
*/
|
|
200
|
+
declare function matchTrailingPandocAttr(text: string): TrailingAnnotationMatch | null;
|
|
201
|
+
/**
|
|
202
|
+
* Quote-aware whitespace tokenizer for the interior of either annotation
|
|
203
|
+
* form.
|
|
204
|
+
*
|
|
205
|
+
* A quote run starts only at the beginning of a token or immediately after
|
|
206
|
+
* `=` — a quote elsewhere (e.g. `name=O'Brien`) is a literal character.
|
|
207
|
+
* Inside a run, `\` escapes the active quote character and itself; the
|
|
208
|
+
* escape pair is preserved in the returned token (callers strip and
|
|
209
|
+
* unescape via {@link splitKeyValueToken} / {@link unquoteAttrValue}).
|
|
210
|
+
* An unbalanced opening quote is tolerated: the run extends to the end of
|
|
211
|
+
* the input.
|
|
212
|
+
*/
|
|
213
|
+
declare function tokenizeAttrTokens(input: string): string[];
|
|
214
|
+
/**
|
|
215
|
+
* Strip surrounding quotes from a raw token value and unescape the active
|
|
216
|
+
* quote character and backslash. Values not wrapped in matching quotes are
|
|
217
|
+
* returned verbatim (including any interior quotes or backslashes).
|
|
218
|
+
*/
|
|
219
|
+
declare function unquoteAttrValue(raw: string): string;
|
|
220
|
+
/**
|
|
221
|
+
* Split a `key=value` token into its parts, unquoting/unescaping the value.
|
|
222
|
+
* Returns null for tokens with no `=` past the first character (bare words,
|
|
223
|
+
* `#id`, `.class`, or a leading `=`).
|
|
224
|
+
*/
|
|
225
|
+
declare function splitKeyValueToken(token: string): {
|
|
226
|
+
key: string;
|
|
227
|
+
value: string;
|
|
228
|
+
} | null;
|
|
229
|
+
/**
|
|
230
|
+
* Whether a value must be quoted to survive tokenization and the outer
|
|
231
|
+
* annotation regexes: any whitespace, quote character, bracket, or brace —
|
|
232
|
+
* or an empty value, which would otherwise serialize as a bare `key=`.
|
|
233
|
+
*/
|
|
234
|
+
declare function needsQuoting(value: string): boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Serialize an attribute value, quoting when {@link needsQuoting} says the
|
|
237
|
+
* bare form would not round-trip.
|
|
238
|
+
*
|
|
239
|
+
* Double quotes are canonical; a value containing a double quote (but no
|
|
240
|
+
* single quote) is single-quoted instead, because markdown resolves
|
|
241
|
+
* backslash escapes in text runs before our parser sees them — switching
|
|
242
|
+
* the quote character round-trips through `.md` source where `\"` would
|
|
243
|
+
* not. Backslashes and the active quote character are escaped.
|
|
244
|
+
*/
|
|
245
|
+
declare function quoteAttrValue(value: string): string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Heading-attribute value coercion.
|
|
249
|
+
*
|
|
250
|
+
* The Pandoc-style heading attribute block `{#id .class key=value}` parses
|
|
251
|
+
* to a flat `Record<string, string>` of `key → raw value`. This module
|
|
252
|
+
* coerces a known subset of keys to typed values (numbers, time-in-seconds,
|
|
253
|
+
* `BlockConnection[]`) so downstream consumers don't have to re-parse them.
|
|
254
|
+
*
|
|
255
|
+
* Unknown keys are returned in `metadata` as raw strings. Malformed known-key
|
|
256
|
+
* values are dropped from the typed result and reported via `warnings` (the
|
|
257
|
+
* raw string is preserved in `params` upstream for lossless round-tripping —
|
|
258
|
+
* coercion failures do not corrupt the source).
|
|
259
|
+
*/
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Registry of known block-meta keys and their coercion strategies.
|
|
263
|
+
*
|
|
264
|
+
* Adding a new typed key: add an entry here, add the typed field to
|
|
265
|
+
* `HeadingAttributes.blockMeta` in `types.ts`, and apply the coerced value
|
|
266
|
+
* in `markdownToDoc.ts`.
|
|
267
|
+
*/
|
|
268
|
+
declare const KNOWN_BLOCK_META_KEYS: {
|
|
269
|
+
readonly x: "number";
|
|
270
|
+
readonly y: "number";
|
|
271
|
+
readonly startTime: "time";
|
|
272
|
+
readonly duration: "time";
|
|
273
|
+
readonly connectsTo: "connectionList";
|
|
274
|
+
readonly transition: "transition";
|
|
275
|
+
readonly transitionDuration: "time";
|
|
276
|
+
readonly transitionDirection: "transitionDirection";
|
|
277
|
+
};
|
|
278
|
+
type KnownBlockMetaKey = keyof typeof KNOWN_BLOCK_META_KEYS;
|
|
279
|
+
/**
|
|
280
|
+
* Editor-facing description of a known block-meta key: what it does, and
|
|
281
|
+
* either its closed set of valid values or a free-form format hint. This is
|
|
282
|
+
* the single source the markdown editor's `{[name key=value]}` attribute
|
|
283
|
+
* autocomplete reads from, so the suggestion list stays in lockstep with
|
|
284
|
+
* `KNOWN_BLOCK_META_KEYS` and the transition vocabulary rather than drifting
|
|
285
|
+
* in a hand-maintained copy. `values`/`valueHint` are mutually exclusive: a
|
|
286
|
+
* key has a closed enum (`values`) or a format hint (`valueHint`), not both.
|
|
287
|
+
*/
|
|
288
|
+
interface BlockMetaKeyDescriptor {
|
|
289
|
+
key: KnownBlockMetaKey;
|
|
290
|
+
/** One-line description, shown as the completion item's detail. */
|
|
291
|
+
description: string;
|
|
292
|
+
/** Closed set of valid values, for keys backed by an enum. */
|
|
293
|
+
values?: readonly string[];
|
|
294
|
+
/** Format hint shown when the value is free-form (no closed set). */
|
|
295
|
+
valueHint?: string;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Ordered descriptors for every key in `KNOWN_BLOCK_META_KEYS`. Order is the
|
|
299
|
+
* suggestion display order: the transition family first (the most common
|
|
300
|
+
* authoring case), then timeline timing, then diagram geometry/links.
|
|
301
|
+
*/
|
|
302
|
+
declare const BLOCK_META_KEY_DESCRIPTORS: readonly BlockMetaKeyDescriptor[];
|
|
303
|
+
/**
|
|
304
|
+
* Parse a time value to seconds. Accepts:
|
|
305
|
+
* - bare number: `5` → 5, `5.5` → 5.5
|
|
306
|
+
* - `mm:ss`: `01:30` → 90
|
|
307
|
+
* - `mm:ss.ms`: `01:30.500` → 90.5
|
|
308
|
+
* - `1500ms` → 1.5
|
|
309
|
+
*
|
|
310
|
+
* Returns null on malformed input.
|
|
311
|
+
*/
|
|
312
|
+
declare function parseTimeSeconds(raw: string): number | null;
|
|
313
|
+
|
|
133
314
|
/**
|
|
134
315
|
* HTML ↔ HtmlNode Conversion
|
|
135
316
|
*
|
|
@@ -156,6 +337,23 @@ declare function parseHtmlToNodes(html: string): HtmlNode[];
|
|
|
156
337
|
*/
|
|
157
338
|
declare function stringifyHtmlNodes(nodes: HtmlNode[]): string;
|
|
158
339
|
|
|
340
|
+
type HtmlPolicy = 'strip' | 'sanitize' | 'trusted';
|
|
341
|
+
type UrlKind = 'link' | 'media';
|
|
342
|
+
/**
|
|
343
|
+
* Sanitize a URL for a rendered link or media attribute.
|
|
344
|
+
*
|
|
345
|
+
* Relative URLs are allowed. Absolute URLs are restricted to schemes that
|
|
346
|
+
* cannot execute script in a document context. Media URLs additionally allow
|
|
347
|
+
* `blob:` and image/audio/video `data:` URLs because Squisq uses both for
|
|
348
|
+
* browser-local media previews and self-contained exports.
|
|
349
|
+
*/
|
|
350
|
+
declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind): string | null;
|
|
351
|
+
/**
|
|
352
|
+
* Return a sanitized copy of an HtmlNode tree. The original parsed tree is left
|
|
353
|
+
* untouched so markdown stringify can still preserve source fidelity.
|
|
354
|
+
*/
|
|
355
|
+
declare function sanitizeHtmlNodes(nodes: HtmlNode[]): HtmlNode[];
|
|
356
|
+
|
|
159
357
|
/**
|
|
160
358
|
* Markdown Tree Utilities
|
|
161
359
|
*
|
|
@@ -273,5 +471,16 @@ declare function inferDocumentTitle(doc: MarkdownDocument): string | undefined;
|
|
|
273
471
|
* spelling later is a one-file change.
|
|
274
472
|
*/
|
|
275
473
|
declare function readFrontmatterThemeId(frontmatter: Record<string, unknown> | undefined): string | undefined;
|
|
474
|
+
/**
|
|
475
|
+
* Project an inline-HTML string (as stored on `TextLayer.content.html`) down
|
|
476
|
+
* to plain text — the value mirrored into `content.text` for plain consumers
|
|
477
|
+
* (PDF/markdown export, search, accessibility) and the SVG `<text>` fallback.
|
|
478
|
+
*
|
|
479
|
+
* `<br>` and block-level tags (`p`, `div`, `h1`–`h6`, `li`, `blockquote`,
|
|
480
|
+
* `pre`) become line breaks so multi-line rich content reads sensibly. Entity
|
|
481
|
+
* decoding is handled by {@link parseHtmlToNodes} (parse5-backed), so this is
|
|
482
|
+
* more correct than a regex tag-stripper.
|
|
483
|
+
*/
|
|
484
|
+
declare function plainTextFromInlineHtml(html: string): string;
|
|
276
485
|
|
|
277
|
-
export { HtmlNode, MarkdownDocument, MarkdownNode, ParseOptions, StringifyOptions, countNodes, createDocument, extractPlainText, findNodesByType, fromMdast, getChildren, inferDocumentTitle, parseFrontmatter, parseHtmlToNodes, parseMarkdown, readFrontmatterThemeId, setFrontmatterValues, stringifyHtmlNodes, stringifyMarkdown, toMdast, walkMarkdownTree };
|
|
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 };
|
package/dist/markdown/index.js
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
+
sanitizeHtmlNodes,
|
|
3
|
+
sanitizeUrl,
|
|
4
|
+
stringifyMarkdown
|
|
5
|
+
} from "../chunk-KZNXZ5SM.js";
|
|
6
|
+
import {
|
|
7
|
+
BLOCK_META_KEY_DESCRIPTORS,
|
|
8
|
+
KNOWN_BLOCK_META_KEYS,
|
|
2
9
|
fromMdast,
|
|
3
|
-
|
|
10
|
+
matchTrailingPandocAttr,
|
|
11
|
+
matchTrailingTemplateAnnotation,
|
|
12
|
+
needsQuoting,
|
|
4
13
|
parseMarkdown,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
parsePandocAttrTokens,
|
|
15
|
+
parseTimeSeconds,
|
|
16
|
+
quoteAttrValue,
|
|
17
|
+
serializePandocAttributes,
|
|
18
|
+
splitKeyValueToken,
|
|
19
|
+
toMdast,
|
|
20
|
+
tokenizeAttrTokens,
|
|
21
|
+
unquoteAttrValue
|
|
22
|
+
} from "../chunk-OH43RPTP.js";
|
|
10
23
|
import {
|
|
11
24
|
countNodes,
|
|
12
25
|
createDocument,
|
|
@@ -15,11 +28,18 @@ import {
|
|
|
15
28
|
getChildren,
|
|
16
29
|
inferDocumentTitle,
|
|
17
30
|
parseFrontmatter,
|
|
31
|
+
parseHtmlToNodes,
|
|
32
|
+
plainTextFromInlineHtml,
|
|
18
33
|
readFrontmatterThemeId,
|
|
19
34
|
setFrontmatterValues,
|
|
35
|
+
stringifyHtmlNodes,
|
|
20
36
|
walkMarkdownTree
|
|
21
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-OKJOQXK4.js";
|
|
38
|
+
import "../chunk-DBS6RIFL.js";
|
|
39
|
+
import "../chunk-QE7TWGVT.js";
|
|
22
40
|
export {
|
|
41
|
+
BLOCK_META_KEY_DESCRIPTORS,
|
|
42
|
+
KNOWN_BLOCK_META_KEYS,
|
|
23
43
|
countNodes,
|
|
24
44
|
createDocument,
|
|
25
45
|
extractPlainText,
|
|
@@ -27,14 +47,27 @@ export {
|
|
|
27
47
|
fromMdast,
|
|
28
48
|
getChildren,
|
|
29
49
|
inferDocumentTitle,
|
|
50
|
+
matchTrailingPandocAttr,
|
|
51
|
+
matchTrailingTemplateAnnotation,
|
|
52
|
+
needsQuoting,
|
|
30
53
|
parseFrontmatter,
|
|
31
54
|
parseHtmlToNodes,
|
|
32
55
|
parseMarkdown,
|
|
56
|
+
parsePandocAttrTokens,
|
|
57
|
+
parseTimeSeconds,
|
|
58
|
+
plainTextFromInlineHtml,
|
|
59
|
+
quoteAttrValue,
|
|
33
60
|
readFrontmatterThemeId,
|
|
61
|
+
sanitizeHtmlNodes,
|
|
62
|
+
sanitizeUrl,
|
|
63
|
+
serializePandocAttributes,
|
|
34
64
|
setFrontmatterValues,
|
|
65
|
+
splitKeyValueToken,
|
|
35
66
|
stringifyHtmlNodes,
|
|
36
67
|
stringifyMarkdown,
|
|
37
68
|
toMdast,
|
|
69
|
+
tokenizeAttrTokens,
|
|
70
|
+
unquoteAttrValue,
|
|
38
71
|
walkMarkdownTree
|
|
39
72
|
};
|
|
40
73
|
//# sourceMappingURL=index.js.map
|
package/dist/recommend/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import "../chunk-ZLQKNOZQ.js";
|
|
1
2
|
import {
|
|
2
3
|
profileBlockContents,
|
|
3
4
|
recommendTemplatesForBlock
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-LRCV7N7F.js";
|
|
6
|
+
import "../chunk-OKJOQXK4.js";
|
|
6
7
|
export {
|
|
7
8
|
profileBlockContents,
|
|
8
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
|
|
4
|
-
export { D as
|
|
2
|
+
import { ax as Theme, u as DeepPartial, aB as ThemeSeedColors, ay as ThemeColorPalette, J as FontFamilyKind, I as FontFamily } from '../Doc-BsMkmzH8.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, D as DARK_SURFACE, q as DEFAULT_DOC_FONT, r as DEFAULT_TITLE_FONT, s as DataTableInput, t as DateEventInput, v as DefinitionCardInput, w as DiagramBlockInput, x as Doc, y as DocBlock, z as DocDiagnostic, E as DrawingBlockInput, F as FRONTMATTER_CUSTOM_TEMPLATES_KEY, G as FRONTMATTER_CUSTOM_THEMES_KEY, H as FactCardInput, K as FullBleedQuoteInput, L as GradientBackgroundConfig, M as ImageBackgroundConfig, N as ImageLayer, O as ImageTreatment, P as ImageWithCaptionInput, Q as LIGHT_SURFACE, R as Layer, S as LayoutHints, T as LeftFeatureInput, U as LinearGradient, V as ListBlockInput, W as MapBlockInput, X as MapLayer, Y as MapMarker, Z as MapTileStyle, _ as MarkerStyle, $ as MediaClip, a0 as PathLayer, a1 as PatternBackgroundConfig, a2 as PersistentLayer, a3 as PersistentLayerConfig, a4 as PersistentLayerTemplate, a5 as PersistentLayerTemplateConfig, a6 as PersistentLayerTemplateType, a7 as PhotoGridInput, a8 as Position, a9 as ProgressIndicatorConfig, aa as PullQuoteInput, ab as QuoteBlockInput, ac as RawLayersInput, ad as RenderStyle, ae as RightFeatureInput, af as ScheduledClip, ag as SectionHeaderInput, ah as ShapeFilter, ai as ShapeLayer, aj as ShapePattern, ak as SolidBackgroundConfig, al as StartBlockConfig, am as StatHighlightInput, an as SurfaceScheme, ao as THEME_SCHEMA_VERSION, ap as TableLayer, aq as TableLayerStyle, ar as TemplateBlock, as as TemplateContext, at as TemplateFunction, au as TemplateRegistry, av as TextLayer, aw as TextStyle, az as ThemeColorScheme, aA as ThemeSchemaVersion, aC as ThemeStyle, aD as ThemeTypography, aE as TitleBlockInput, aF as TitleCaptionConfig, aG as TwoColumnInput, aH as VIEWPORT_PRESETS, aI as VideoLayer, aJ as VideoPullQuoteInput, aK as VideoWithCaptionInput, aL as ViewportConfig, aM as ViewportOrientation, aN as ViewportPreset, aO as VignetteConfig, aP as applySurface, aQ as calculateDuration, aR as calculateFontScale, aS as createTemplateContext, aT as createTheme, aU as getAspectRatioString, aV as getBlockAtTime, aW as getCaptionAtTime, aX as getDocPlaybackDuration, aY as getLayoutHints, aZ as getRegisteredThemes, a_ as getSafeTextBounds, a$ as getSegmentAtTime, b0 as getTwoColumnPositions, b1 as getViewport, b2 as getViewportOrientation, b3 as isPersistentLayerTemplate, b4 as isTemplateBlock, b5 as layoutScaledFontSize, b6 as lookupRegisteredTheme, b7 as registerTheme, b8 as resolveMediaSchedule, b9 as scaledFontSize, ba as unregisterTheme, bb as validateDoc } from '../Doc-BsMkmzH8.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-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-DQQKuRMx.js';
|
|
5
6
|
export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
|
|
6
|
-
export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-
|
|
7
|
-
import '../types-BdZkdJ3z.js';
|
|
7
|
+
export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-DvoeHMP9.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Theme Validator
|
|
@@ -60,11 +60,19 @@ type ContrastPreset = 'subtle' | 'balanced' | 'high';
|
|
|
60
60
|
interface CompileOptions {
|
|
61
61
|
/** Contrast level for OKLCh derivation (default 'balanced'). */
|
|
62
62
|
contrast?: ContrastPreset;
|
|
63
|
+
/**
|
|
64
|
+
* Base theme to inherit from. When provided, the partial is deep-merged
|
|
65
|
+
* over this theme instead of the neutral `STARTER_THEME`, so the compiled
|
|
66
|
+
* theme inherits the base's render style, color schemes, typography, and
|
|
67
|
+
* persistent layers — and only the fields the user changed are overridden.
|
|
68
|
+
* The base's id is recorded on the result as `basedOn`.
|
|
69
|
+
*/
|
|
70
|
+
base?: Theme;
|
|
63
71
|
}
|
|
64
72
|
/**
|
|
65
73
|
* Compile a partial Theme into a complete one. Fills missing fields from
|
|
66
|
-
*
|
|
67
|
-
* present), and validates the result.
|
|
74
|
+
* the base (`opts.base` when given, else `STARTER_THEME`), derives missing
|
|
75
|
+
* color slots from `seedColors` (when present), and validates the result.
|
|
68
76
|
*/
|
|
69
77
|
declare function compileTheme(partial: DeepPartial<Theme>, opts?: CompileOptions): Theme;
|
|
70
78
|
/**
|
|
@@ -164,6 +172,18 @@ declare function oklchSetChroma(hex: string, multiplier: number): string;
|
|
|
164
172
|
* WCAG relative luminance of a hex color, returned as 0..1.
|
|
165
173
|
*/
|
|
166
174
|
declare function relativeLuminance(hex: string): number;
|
|
175
|
+
/**
|
|
176
|
+
* Hue of a hex color in HSL degrees (0..360). Returns 0 for pure grays
|
|
177
|
+
* and on parse failure. Used by the duotone image treatment to aim its
|
|
178
|
+
* `hue-rotate()` at the theme's tint color.
|
|
179
|
+
*/
|
|
180
|
+
declare function hexHueDegrees(hex: string): number;
|
|
181
|
+
/**
|
|
182
|
+
* Convert a hex color + alpha (0..1) to an `rgba()` string.
|
|
183
|
+
* Falls back to the input on parse failure (e.g. a value that is
|
|
184
|
+
* already an rgba()/gradient string).
|
|
185
|
+
*/
|
|
186
|
+
declare function withAlpha(hex: string, alpha: number): string;
|
|
167
187
|
/**
|
|
168
188
|
* WCAG contrast ratio between two hex colors. Returns 1..21.
|
|
169
189
|
*/
|
|
@@ -185,4 +205,4 @@ declare function deriveScale(seedHex: string, spread?: number): {
|
|
|
185
205
|
darker2: string;
|
|
186
206
|
};
|
|
187
207
|
|
|
188
|
-
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, isHex, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme };
|
|
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 };
|
package/dist/schemas/index.js
CHANGED
|
@@ -5,17 +5,21 @@ import {
|
|
|
5
5
|
deriveColorPalette,
|
|
6
6
|
getBlockAtTime,
|
|
7
7
|
getCaptionAtTime,
|
|
8
|
+
getDocPlaybackDuration,
|
|
8
9
|
getSegmentAtTime,
|
|
9
10
|
parseTheme,
|
|
11
|
+
resolveMediaSchedule,
|
|
10
12
|
serializeTheme,
|
|
11
13
|
validateDoc
|
|
12
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-7MQGNR76.js";
|
|
13
15
|
import {
|
|
14
16
|
AVAILABLE_FONT_STACKS,
|
|
15
17
|
DARK_SURFACE,
|
|
16
18
|
DEFAULT_THEME,
|
|
17
19
|
DEFAULT_THEME_ID,
|
|
18
20
|
FONT_FALLBACKS,
|
|
21
|
+
FRONTMATTER_CUSTOM_TEMPLATES_KEY,
|
|
22
|
+
FRONTMATTER_CUSTOM_THEMES_KEY,
|
|
19
23
|
LIGHT_SURFACE,
|
|
20
24
|
THEMES,
|
|
21
25
|
THEME_SCHEMA_VERSION,
|
|
@@ -30,6 +34,7 @@ import {
|
|
|
30
34
|
getFontStack,
|
|
31
35
|
getRegisteredThemes,
|
|
32
36
|
getThemeSummaries,
|
|
37
|
+
hexHueDegrees,
|
|
33
38
|
isHex,
|
|
34
39
|
lookupRegisteredTheme,
|
|
35
40
|
oklchDarken,
|
|
@@ -41,8 +46,9 @@ import {
|
|
|
41
46
|
resolveFontFamily,
|
|
42
47
|
resolveTheme,
|
|
43
48
|
unregisterTheme,
|
|
44
|
-
validateTheme
|
|
45
|
-
|
|
49
|
+
validateTheme,
|
|
50
|
+
withAlpha
|
|
51
|
+
} from "../chunk-4AKUQPEE.js";
|
|
46
52
|
import {
|
|
47
53
|
DEFAULT_DOC_FONT,
|
|
48
54
|
DEFAULT_TITLE_FONT,
|
|
@@ -59,7 +65,17 @@ import {
|
|
|
59
65
|
isTemplateBlock,
|
|
60
66
|
scaledFontSize,
|
|
61
67
|
scaledFontSize2
|
|
62
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-DLXZMS5K.js";
|
|
69
|
+
import {
|
|
70
|
+
DEFAULT_TRANSITION_DURATION_SECONDS,
|
|
71
|
+
TRANSITION_DIRECTIONS,
|
|
72
|
+
TRANSITION_TYPES,
|
|
73
|
+
isTransitionType,
|
|
74
|
+
normalizeTransitionDirection,
|
|
75
|
+
normalizeTransitionType,
|
|
76
|
+
resolveBlockTransition,
|
|
77
|
+
resolveTransitionDuration
|
|
78
|
+
} from "../chunk-QE7TWGVT.js";
|
|
63
79
|
export {
|
|
64
80
|
AVAILABLE_FONT_STACKS,
|
|
65
81
|
DARK_SURFACE,
|
|
@@ -67,11 +83,16 @@ export {
|
|
|
67
83
|
DEFAULT_THEME,
|
|
68
84
|
DEFAULT_THEME_ID,
|
|
69
85
|
DEFAULT_TITLE_FONT,
|
|
86
|
+
DEFAULT_TRANSITION_DURATION_SECONDS,
|
|
70
87
|
FONT_FALLBACKS,
|
|
88
|
+
FRONTMATTER_CUSTOM_TEMPLATES_KEY,
|
|
89
|
+
FRONTMATTER_CUSTOM_THEMES_KEY,
|
|
71
90
|
LIGHT_SURFACE,
|
|
72
91
|
STARTER_THEME,
|
|
73
92
|
THEMES,
|
|
74
93
|
THEME_SCHEMA_VERSION,
|
|
94
|
+
TRANSITION_DIRECTIONS,
|
|
95
|
+
TRANSITION_TYPES,
|
|
75
96
|
VIEWPORT_PRESETS,
|
|
76
97
|
applySurface,
|
|
77
98
|
assertTheme,
|
|
@@ -89,6 +110,7 @@ export {
|
|
|
89
110
|
getAvailableThemes,
|
|
90
111
|
getBlockAtTime,
|
|
91
112
|
getCaptionAtTime,
|
|
113
|
+
getDocPlaybackDuration,
|
|
92
114
|
getFontStack,
|
|
93
115
|
getLayoutHints,
|
|
94
116
|
getRegisteredThemes,
|
|
@@ -98,11 +120,15 @@ export {
|
|
|
98
120
|
getTwoColumnPositions,
|
|
99
121
|
getViewport,
|
|
100
122
|
getViewportOrientation,
|
|
123
|
+
hexHueDegrees,
|
|
101
124
|
isHex,
|
|
102
125
|
isPersistentLayerTemplate,
|
|
103
126
|
isTemplateBlock,
|
|
127
|
+
isTransitionType,
|
|
104
128
|
scaledFontSize as layoutScaledFontSize,
|
|
105
129
|
lookupRegisteredTheme,
|
|
130
|
+
normalizeTransitionDirection,
|
|
131
|
+
normalizeTransitionType,
|
|
106
132
|
oklchDarken,
|
|
107
133
|
oklchLighten,
|
|
108
134
|
oklchSetChroma,
|
|
@@ -110,12 +136,16 @@ export {
|
|
|
110
136
|
pickContrastingText,
|
|
111
137
|
registerTheme,
|
|
112
138
|
relativeLuminance,
|
|
139
|
+
resolveBlockTransition,
|
|
113
140
|
resolveFontFamily,
|
|
141
|
+
resolveMediaSchedule,
|
|
114
142
|
resolveTheme,
|
|
143
|
+
resolveTransitionDuration,
|
|
115
144
|
scaledFontSize2 as scaledFontSize,
|
|
116
145
|
serializeTheme,
|
|
117
146
|
unregisterTheme,
|
|
118
147
|
validateDoc,
|
|
119
|
-
validateTheme
|
|
148
|
+
validateTheme,
|
|
149
|
+
withAlpha
|
|
120
150
|
};
|
|
121
151
|
//# sourceMappingURL=index.js.map
|
package/dist/spatial/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ declare function calculateBearing(from: Coordinates, to: Coordinates): number;
|
|
|
39
39
|
* - 5 chars: ~5km x 5km
|
|
40
40
|
* - 6 chars: ~1.2km x 0.6km
|
|
41
41
|
*/
|
|
42
|
+
|
|
42
43
|
/**
|
|
43
44
|
* Encode latitude/longitude to a geohash string.
|
|
44
45
|
* Uses the standard ngeohash library.
|
|
@@ -91,10 +92,14 @@ declare function getGeohashPrefix(geohash: string, precision: number): string;
|
|
|
91
92
|
*/
|
|
92
93
|
declare function geohashToHierarchicalPath(geohash4: string): string;
|
|
93
94
|
/**
|
|
94
|
-
* Compute all geohash cells along the path between two geohash cells.
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
95
|
+
* Compute all geohash cells along the great-circle path between two geohash cells.
|
|
96
|
+
* Samples points along the spherical arc from `from` to `to`, encoding each to a
|
|
97
|
+
* geohash at the given precision, and returns the deduplicated list of intermediate
|
|
98
|
+
* cells (excluding `from` and `to`).
|
|
99
|
+
*
|
|
100
|
+
* Uses spherical linear interpolation (SLERP) via 3D unit vectors, which correctly
|
|
101
|
+
* handles antimeridian crossings and polar paths — both of which flat lat/lng
|
|
102
|
+
* interpolation gets wrong.
|
|
98
103
|
*/
|
|
99
104
|
declare function getGeohashPath(from: string, to: string, precision?: number): string[];
|
|
100
105
|
/**
|