@teleporthq/teleport-shared 0.43.61 → 0.43.62
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/__tests__/utils/rich-text-embeds-runtime-module.ts +124 -0
- package/__tests__/utils/rich-text-embeds.ts +254 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/utils/rich-text-embeds-codegen.d.ts +9 -0
- package/dist/cjs/utils/rich-text-embeds-codegen.d.ts.map +1 -0
- package/dist/cjs/utils/rich-text-embeds-codegen.js +139 -0
- package/dist/cjs/utils/rich-text-embeds-codegen.js.map +1 -0
- package/dist/cjs/utils/rich-text-embeds.d.ts +251 -0
- package/dist/cjs/utils/rich-text-embeds.d.ts.map +1 -0
- package/dist/cjs/utils/rich-text-embeds.js +852 -0
- package/dist/cjs/utils/rich-text-embeds.js.map +1 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/utils/rich-text-embeds-codegen.d.ts +9 -0
- package/dist/esm/utils/rich-text-embeds-codegen.d.ts.map +1 -0
- package/dist/esm/utils/rich-text-embeds-codegen.js +134 -0
- package/dist/esm/utils/rich-text-embeds-codegen.js.map +1 -0
- package/dist/esm/utils/rich-text-embeds.d.ts +251 -0
- package/dist/esm/utils/rich-text-embeds.d.ts.map +1 -0
- package/dist/esm/utils/rich-text-embeds.js +822 -0
- package/dist/esm/utils/rich-text-embeds.js.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +4 -0
- package/src/utils/rich-text-embeds-codegen.ts +216 -0
- package/src/utils/rich-text-embeds.ts +966 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateEmbedRuntimeModuleSource = exports.serializeEmbedProvidersForRuntime = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Code-generation helpers for the rich-text embed contract.
|
|
6
|
+
*
|
|
7
|
+
* Kept apart from `rich-text-embeds.ts` on purpose: that module is imported by
|
|
8
|
+
* the studio editor and the canvas renderer, which are BROWSER bundles, and the
|
|
9
|
+
* function registry below holds a live reference to every helper so that none
|
|
10
|
+
* of them can be tree-shaken. Only the project generator imports this file.
|
|
11
|
+
*/
|
|
12
|
+
var rich_text_embeds_1 = require("./rich-text-embeds");
|
|
13
|
+
/**
|
|
14
|
+
* The provider registry as a JavaScript literal, so the component the Next
|
|
15
|
+
* generator writes is built from THIS array rather than a hand-copied one.
|
|
16
|
+
* Regexes are re-created from their source and flags because `JSON.stringify`
|
|
17
|
+
* flattens a `RegExp` to `{}`.
|
|
18
|
+
*/
|
|
19
|
+
function serializeEmbedProvidersForRuntime() {
|
|
20
|
+
var entries = rich_text_embeds_1.EMBED_PROVIDERS.map(function (provider) {
|
|
21
|
+
var patterns = provider.patterns
|
|
22
|
+
.map(function (pattern) {
|
|
23
|
+
return "new RegExp(".concat(JSON.stringify(pattern.source), ", ").concat(JSON.stringify(pattern.flags), ")");
|
|
24
|
+
})
|
|
25
|
+
.join(', ');
|
|
26
|
+
return ("{ id: ".concat(JSON.stringify(provider.id), ", label: ").concat(JSON.stringify(provider.label), ", ") +
|
|
27
|
+
"patterns: [".concat(patterns, "], template: ").concat(JSON.stringify(provider.template), ", ") +
|
|
28
|
+
"ratio: ".concat(provider.ratio === null ? 'null' : String(provider.ratio), " }"));
|
|
29
|
+
});
|
|
30
|
+
return "[\n ".concat(entries.join(',\n '), "\n]");
|
|
31
|
+
}
|
|
32
|
+
exports.serializeEmbedProvidersForRuntime = serializeEmbedProvidersForRuntime;
|
|
33
|
+
/* ── The generated runtime module ───────────────────────────────────────────
|
|
34
|
+
*
|
|
35
|
+
* The exported project needs these same helpers at runtime: its rich-text
|
|
36
|
+
* editor builds embeds with them and its activator mounts them. Rather than
|
|
37
|
+
* hand-copying the logic into a code-generator template — where it would drift
|
|
38
|
+
* from this file the first time a provider is added — the module is EMITTED
|
|
39
|
+
* from the very functions above: the constants are serialized, the functions
|
|
40
|
+
* are printed with `Function.prototype.toString`, and the result is written to
|
|
41
|
+
* the generated project as `components/embed-runtime.js`.
|
|
42
|
+
*
|
|
43
|
+
* Two rules keep that safe, and `__tests__/utils/rich-text-embeds.ts` pins both:
|
|
44
|
+
* - every emitted function may only reference other emitted functions and the
|
|
45
|
+
* constants below, never a module-private helper or an import;
|
|
46
|
+
* - the emitted module must parse and behave identically to this one.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Every function the generated editor and activator reach — the ones they
|
|
50
|
+
* import, plus everything those call in turn. Deliberately not the whole of
|
|
51
|
+
* `rich-text-embeds`: the editor overlay helpers belong to the studio, and an
|
|
52
|
+
* export nothing calls is dead weight in every generated project.
|
|
53
|
+
*/
|
|
54
|
+
var RUNTIME_EXPORTS = [
|
|
55
|
+
rich_text_embeds_1.isSafeEmbedUrl,
|
|
56
|
+
rich_text_embeds_1.resolveEmbedProvider,
|
|
57
|
+
rich_text_embeds_1.applyEmbedTemplate,
|
|
58
|
+
rich_text_embeds_1.buildEmbedHtmlFromUrl,
|
|
59
|
+
rich_text_embeds_1.resolveEmbedMode,
|
|
60
|
+
rich_text_embeds_1.clampEmbedWidth,
|
|
61
|
+
rich_text_embeds_1.normalizeEmbedAlign,
|
|
62
|
+
rich_text_embeds_1.escapeEmbedAttribute,
|
|
63
|
+
rich_text_embeds_1.escapeEmbedText,
|
|
64
|
+
rich_text_embeds_1.encodeEmbedCode,
|
|
65
|
+
rich_text_embeds_1.decodeEmbedCode,
|
|
66
|
+
rich_text_embeds_1.createEmbedValue,
|
|
67
|
+
rich_text_embeds_1.embedBlockStyle,
|
|
68
|
+
rich_text_embeds_1.embedFrameStyle,
|
|
69
|
+
rich_text_embeds_1.buildEmbedElementHtml,
|
|
70
|
+
rich_text_embeds_1.buildEmbedFrameChildren,
|
|
71
|
+
rich_text_embeds_1.findEmbedFrame,
|
|
72
|
+
rich_text_embeds_1.readEmbedValueFromElement,
|
|
73
|
+
rich_text_embeds_1.readEncodedEmbedCode,
|
|
74
|
+
rich_text_embeds_1.normalizeEmbedsForStorage,
|
|
75
|
+
rich_text_embeds_1.resolveEmbedSandboxFlags,
|
|
76
|
+
rich_text_embeds_1.buildEmbedSandboxDocument,
|
|
77
|
+
rich_text_embeds_1.parseEmbedHeightMessage,
|
|
78
|
+
rich_text_embeds_1.createEmbedToken,
|
|
79
|
+
];
|
|
80
|
+
var runtimeConstant = function (name, literal) { return ({ name: name, literal: literal }); };
|
|
81
|
+
/**
|
|
82
|
+
* TypeScript's CommonJS emit rewrites every reference to an exported CONSTANT
|
|
83
|
+
* as `exports.NAME` (exported functions keep their bare names, which is why
|
|
84
|
+
* they can call each other). The generator runs against that CommonJS build, so
|
|
85
|
+
* printed function bodies arrive carrying `exports.` prefixes that mean nothing
|
|
86
|
+
* in the emitted module — where each constant is re-declared as a plain
|
|
87
|
+
* top-level binding of the same name. Rewriting them back is therefore exact,
|
|
88
|
+
* not a heuristic: only names this module emits are rewritten, and
|
|
89
|
+
* `generateEmbedRuntimeModuleSource` asserts nothing module-scoped is left.
|
|
90
|
+
*/
|
|
91
|
+
var bindRuntimeConstantReferences = function (source, names) {
|
|
92
|
+
return names.reduce(function (acc, name) { return acc.replace(new RegExp("\\bexports\\.".concat(name, "\\b"), 'g'), name); }, source);
|
|
93
|
+
};
|
|
94
|
+
function generateEmbedRuntimeModuleSource() {
|
|
95
|
+
var constants = [
|
|
96
|
+
runtimeConstant('EMBED_CLASS_NAME', JSON.stringify(rich_text_embeds_1.EMBED_CLASS_NAME)),
|
|
97
|
+
runtimeConstant('EMBED_FRAME_CLASS_NAME', JSON.stringify(rich_text_embeds_1.EMBED_FRAME_CLASS_NAME)),
|
|
98
|
+
runtimeConstant('EMBED_CAPTION_CLASS_NAME', JSON.stringify(rich_text_embeds_1.EMBED_CAPTION_CLASS_NAME)),
|
|
99
|
+
runtimeConstant('EMBED_BLOT_NAME', JSON.stringify(rich_text_embeds_1.EMBED_BLOT_NAME)),
|
|
100
|
+
runtimeConstant('EMBED_ATTR', JSON.stringify(rich_text_embeds_1.EMBED_ATTR, null, 2)),
|
|
101
|
+
runtimeConstant('EMBED_ALIGNMENTS', JSON.stringify(rich_text_embeds_1.EMBED_ALIGNMENTS)),
|
|
102
|
+
runtimeConstant('CUSTOM_EMBED_PROVIDER_ID', JSON.stringify(rich_text_embeds_1.CUSTOM_EMBED_PROVIDER_ID)),
|
|
103
|
+
runtimeConstant('GENERIC_EMBED_PROVIDER_ID', JSON.stringify(rich_text_embeds_1.GENERIC_EMBED_PROVIDER_ID)),
|
|
104
|
+
runtimeConstant('DEFAULT_EMBED_WIDTH', String(rich_text_embeds_1.DEFAULT_EMBED_WIDTH)),
|
|
105
|
+
runtimeConstant('DEFAULT_EMBED_ALIGN', JSON.stringify(rich_text_embeds_1.DEFAULT_EMBED_ALIGN)),
|
|
106
|
+
runtimeConstant('DEFAULT_EMBED_SANDBOX_LEVEL', JSON.stringify(rich_text_embeds_1.DEFAULT_EMBED_SANDBOX_LEVEL)),
|
|
107
|
+
runtimeConstant('WIDESCREEN_EMBED_RATIO', String(rich_text_embeds_1.WIDESCREEN_EMBED_RATIO)),
|
|
108
|
+
runtimeConstant('EMBED_CAPTION_STYLE', JSON.stringify(rich_text_embeds_1.EMBED_CAPTION_STYLE)),
|
|
109
|
+
runtimeConstant('EMBED_PROVIDERS', serializeEmbedProvidersForRuntime()),
|
|
110
|
+
runtimeConstant('EMBED_SANDBOX_FLAGS_STRICT', JSON.stringify(rich_text_embeds_1.EMBED_SANDBOX_FLAGS_STRICT)),
|
|
111
|
+
runtimeConstant('EMBED_SANDBOX_FLAGS_TRUSTED', JSON.stringify(rich_text_embeds_1.EMBED_SANDBOX_FLAGS_TRUSTED)),
|
|
112
|
+
runtimeConstant('EMBED_HEIGHT_MESSAGE_TYPE', JSON.stringify(rich_text_embeds_1.EMBED_HEIGHT_MESSAGE_TYPE)),
|
|
113
|
+
runtimeConstant('EMBED_TOKEN_PLACEHOLDER', JSON.stringify(rich_text_embeds_1.EMBED_TOKEN_PLACEHOLDER)),
|
|
114
|
+
runtimeConstant('EMBED_MIN_HEIGHT', String(rich_text_embeds_1.EMBED_MIN_HEIGHT)),
|
|
115
|
+
runtimeConstant('EMBED_MAX_HEIGHT', String(rich_text_embeds_1.EMBED_MAX_HEIGHT)),
|
|
116
|
+
runtimeConstant('EMBED_INITIAL_HEIGHT', String(rich_text_embeds_1.EMBED_INITIAL_HEIGHT)),
|
|
117
|
+
runtimeConstant('EMBED_SANDBOX_DOC_HEAD', JSON.stringify(rich_text_embeds_1.EMBED_SANDBOX_DOC_HEAD)),
|
|
118
|
+
runtimeConstant('EMBED_SANDBOX_DOC_TAIL', JSON.stringify(rich_text_embeds_1.EMBED_SANDBOX_DOC_TAIL)),
|
|
119
|
+
// `createEmbedToken` closes over this counter.
|
|
120
|
+
runtimeConstant('embedTokenCounter', '0'),
|
|
121
|
+
];
|
|
122
|
+
var names = constants.map(function (entry) { return entry.name; });
|
|
123
|
+
var declarations = constants.map(function (entry) { return "export var ".concat(entry.name, " = ").concat(entry.literal); });
|
|
124
|
+
var functions = RUNTIME_EXPORTS.map(function (fn) { return "export ".concat(bindRuntimeConstantReferences(fn.toString(), names)); });
|
|
125
|
+
var source = "".concat(RUNTIME_MODULE_HEADER, "\n").concat(declarations.join('\n\n'), "\n\n").concat(functions.join('\n\n'), "\n");
|
|
126
|
+
// An `exports.` reference that survived means a function reached for a
|
|
127
|
+
// constant left off the list above. That crashes every generated project at
|
|
128
|
+
// runtime, so it fails here instead. (Import leakage is covered by the
|
|
129
|
+
// emitted module being evaluated in this package's tests — this module has
|
|
130
|
+
// no imports, and must not gain any.)
|
|
131
|
+
var leaked = source.match(/\bexports\.[A-Za-z_$][\w$]*/g);
|
|
132
|
+
if (leaked) {
|
|
133
|
+
throw new Error("Embed runtime module cannot be emitted: unresolved module references ".concat(leaked.join(', ')));
|
|
134
|
+
}
|
|
135
|
+
return source;
|
|
136
|
+
}
|
|
137
|
+
exports.generateEmbedRuntimeModuleSource = generateEmbedRuntimeModuleSource;
|
|
138
|
+
var RUNTIME_MODULE_HEADER = "/**\n * Code embeds inside rich-text content \u2014 the shape the editor writes and the\n * page reads back. Generated from @teleporthq/teleport-shared; edit it there.\n *\n * An embed is stored inside the content HTML as a <figure class=\"tq-embed\">.\n * Passive markup (a provider iframe) lives in the figure as real children, so\n * it renders server-side with no JavaScript. Markup that can execute \u2014 a\n * <script>, an on* handler, a javascript: URL \u2014 is base64-encoded onto the\n * element instead, and mounted at runtime inside a sandboxed iframe so it can\n * never reach this page.\n */\n";
|
|
139
|
+
//# sourceMappingURL=rich-text-embeds-codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-embeds-codegen.js","sourceRoot":"","sources":["../../../src/utils/rich-text-embeds-codegen.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,uDAgD2B;AAE3B;;;;;GAKG;AACH,SAAgB,iCAAiC;IAC/C,IAAM,OAAO,GAAG,kCAAe,CAAC,GAAG,CAAC,UAAC,QAAQ;QAC3C,IAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ;aAC/B,GAAG,CACF,UAAC,OAAO;YACN,OAAA,qBAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,eAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,MAAG;QAAjF,CAAiF,CACpF;aACA,IAAI,CAAC,IAAI,CAAC,CAAA;QACb,OAAO,CACL,gBAAS,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,sBAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,C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AAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAC3D,IAAI,MAAM,EAAE;QACV,MAAM,IAAI,KAAK,CACb,+EAAwE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAC5F,CAAA;KACF;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AApDD,4EAoDC;AAED,IAAM,qBAAqB,GAAG,kmBAW7B,CAAA"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "code embed" contract for rich-text CONTENT — the blog post body, and any
|
|
3
|
+
* other column authored through a rich-text editor.
|
|
4
|
+
*
|
|
5
|
+
* A code embed is a block a post author drops into the body to pull in content
|
|
6
|
+
* from another site (a video, a social post, a design frame, a form, or a raw
|
|
7
|
+
* snippet they pasted). It is stored INSIDE the content HTML, so the same shape
|
|
8
|
+
* has to be produced by the studio's Quill editor, produced by the generated
|
|
9
|
+
* admin panel's Quill editor, previewed by the studio canvas and rendered by
|
|
10
|
+
* the exported Next.js app. This module is that single shape.
|
|
11
|
+
*
|
|
12
|
+
* Two rendering modes, decided by one rule (`resolveEmbedMode`):
|
|
13
|
+
*
|
|
14
|
+
* - `inline` — the markup is provably passive (no `<script>`, no `on*`
|
|
15
|
+
* handler, no `javascript:` URL). It is stored as the element's
|
|
16
|
+
* own children, so it renders server-side, needs no JavaScript
|
|
17
|
+
* and is crawlable. Most provider embeds are a bare `<iframe>`
|
|
18
|
+
* and land here.
|
|
19
|
+
* - `sandbox` — anything else. The markup is base64-encoded into
|
|
20
|
+
* `data-tq-embed-code` and the runtime materializes it inside a
|
|
21
|
+
* sandboxed `srcdoc` iframe, so author-supplied JavaScript can
|
|
22
|
+
* never touch the hosting page. The children hold only a
|
|
23
|
+
* `<noscript>` link fallback.
|
|
24
|
+
*
|
|
25
|
+
* The provider registry is deliberately DECLARATIVE — patterns plus a
|
|
26
|
+
* replacement template, never functions — so `rich-text-embeds-codegen` can
|
|
27
|
+
* serialize it verbatim into the module the generated project gets, and the
|
|
28
|
+
* editor and the published site can never drift.
|
|
29
|
+
*/
|
|
30
|
+
export type EmbedAlign = 'center' | 'float-left' | 'float-right';
|
|
31
|
+
export type EmbedMode = 'inline' | 'sandbox';
|
|
32
|
+
/**
|
|
33
|
+
* `strict` (the default) omits `allow-same-origin`, so the embed runs in an
|
|
34
|
+
* opaque origin and cannot reach the host page's storage or DOM. `trusted` adds
|
|
35
|
+
* it back for the widgets that refuse to render without storage access — an
|
|
36
|
+
* explicit, per-embed opt-in the author has to make.
|
|
37
|
+
*/
|
|
38
|
+
export type EmbedSandboxLevel = 'strict' | 'trusted';
|
|
39
|
+
export interface EmbedValue {
|
|
40
|
+
/** Registry id, or `custom` when the author pasted the markup themselves. */
|
|
41
|
+
provider: string;
|
|
42
|
+
/** The source URL, when there was one. Lets the editor re-open the Link tab. */
|
|
43
|
+
url: string;
|
|
44
|
+
/** The embed markup itself. */
|
|
45
|
+
code: string;
|
|
46
|
+
mode: EmbedMode;
|
|
47
|
+
/** Responsive box height as a padding-top percentage; `null` = intrinsic. */
|
|
48
|
+
ratio: number | null;
|
|
49
|
+
/** Block width as a percentage of the content column, 10-100. */
|
|
50
|
+
width: number;
|
|
51
|
+
align: EmbedAlign;
|
|
52
|
+
caption: string;
|
|
53
|
+
sandboxLevel: EmbedSandboxLevel;
|
|
54
|
+
}
|
|
55
|
+
export declare const EMBED_CLASS_NAME = "tq-embed";
|
|
56
|
+
export declare const EMBED_FRAME_CLASS_NAME = "tq-embed-frame";
|
|
57
|
+
export declare const EMBED_CAPTION_CLASS_NAME = "tq-embed-caption";
|
|
58
|
+
/** The Quill blot name, shared by the studio editor and the generated one. */
|
|
59
|
+
export declare const EMBED_BLOT_NAME = "tq-embed";
|
|
60
|
+
export declare const EMBED_ATTR: {
|
|
61
|
+
readonly MARKER: "data-tq-embed";
|
|
62
|
+
readonly PROVIDER: "data-tq-embed-provider";
|
|
63
|
+
readonly URL: "data-tq-embed-url";
|
|
64
|
+
readonly MODE: "data-tq-embed-mode";
|
|
65
|
+
readonly CODE: "data-tq-embed-code";
|
|
66
|
+
readonly RATIO: "data-tq-embed-ratio";
|
|
67
|
+
readonly WIDTH: "data-tq-embed-width";
|
|
68
|
+
readonly ALIGN: "data-tq-embed-align";
|
|
69
|
+
readonly CAPTION: "data-tq-embed-caption";
|
|
70
|
+
readonly SANDBOX: "data-tq-embed-sandbox";
|
|
71
|
+
/** Written by a runtime once a sandbox embed has been mounted. */
|
|
72
|
+
readonly ACTIVATED: "data-tq-embed-activated";
|
|
73
|
+
/**
|
|
74
|
+
* Marks an element an EDITOR added purely to preview the embed. Editors read
|
|
75
|
+
* their value back out of the live DOM, so a preview must be recognizable in
|
|
76
|
+
* order to be stripped again — see `normalizeEmbedsForStorage`.
|
|
77
|
+
*/
|
|
78
|
+
readonly PREVIEW: "data-tq-embed-preview";
|
|
79
|
+
};
|
|
80
|
+
export declare const EMBED_ALIGNMENTS: EmbedAlign[];
|
|
81
|
+
export declare const CUSTOM_EMBED_PROVIDER_ID = "custom";
|
|
82
|
+
export declare const GENERIC_EMBED_PROVIDER_ID = "iframe-url";
|
|
83
|
+
export declare const DEFAULT_EMBED_WIDTH = 100;
|
|
84
|
+
export declare const DEFAULT_EMBED_ALIGN: EmbedAlign;
|
|
85
|
+
export declare const DEFAULT_EMBED_SANDBOX_LEVEL: EmbedSandboxLevel;
|
|
86
|
+
/** 16:9, as a padding-top percentage. */
|
|
87
|
+
export declare const WIDESCREEN_EMBED_RATIO = 56.25;
|
|
88
|
+
export interface EmbedProviderDefinition {
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
/**
|
|
92
|
+
* Alternative spellings of the same URL. Every pattern of one provider must
|
|
93
|
+
* expose the same capture groups, because `template` indexes them by number.
|
|
94
|
+
*/
|
|
95
|
+
patterns: RegExp[];
|
|
96
|
+
/**
|
|
97
|
+
* The markup, with `$1`-`$9` replaced by the capture groups and `$&` by the
|
|
98
|
+
* whole URL. Prefix the token with `E` (`$E1`, `$E&`) to URL-encode it.
|
|
99
|
+
* A literal dollar is written `$$`.
|
|
100
|
+
*/
|
|
101
|
+
template: string;
|
|
102
|
+
/**
|
|
103
|
+
* When set, the frame becomes a responsive padding-top box of this
|
|
104
|
+
* percentage and the template's iframe is expected to fill it absolutely.
|
|
105
|
+
* `null` means the template carries its own height.
|
|
106
|
+
*/
|
|
107
|
+
ratio: number | null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Ordered most-specific first: `resolveEmbedProvider` returns the first match,
|
|
111
|
+
* and the generic `iframe-url` fallback is deliberately last.
|
|
112
|
+
*/
|
|
113
|
+
export declare const EMBED_PROVIDERS: EmbedProviderDefinition[];
|
|
114
|
+
export interface EmbedProviderMatch {
|
|
115
|
+
provider: EmbedProviderDefinition;
|
|
116
|
+
match: RegExpMatchArray;
|
|
117
|
+
}
|
|
118
|
+
/** `javascript:`, `data:` and protocol-relative URLs never become an embed. */
|
|
119
|
+
export declare function isSafeEmbedUrl(url: string): boolean;
|
|
120
|
+
/** How an embed names itself in the editor: the provider, or "Custom code". */
|
|
121
|
+
export declare function embedProviderLabel(providerId: string): string;
|
|
122
|
+
export declare function resolveEmbedProvider(url: string): EmbedProviderMatch | null;
|
|
123
|
+
/**
|
|
124
|
+
* Substitutes `$1`-`$9` / `$E1`-`$E9` / `$&` / `$E&` in a provider template.
|
|
125
|
+
* Written by hand rather than through `String.replace` so the replacement
|
|
126
|
+
* patterns `String.replace` reserves (`$'`, "$`", `$<name>`) stay literal.
|
|
127
|
+
*/
|
|
128
|
+
export declare function applyEmbedTemplate(template: string, match: RegExpMatchArray, url: string): string;
|
|
129
|
+
/** The embed markup for a pasted URL, or `null` when nothing recognizes it. */
|
|
130
|
+
export declare function buildEmbedHtmlFromUrl(url: string): {
|
|
131
|
+
provider: EmbedProviderDefinition;
|
|
132
|
+
html: string;
|
|
133
|
+
} | null;
|
|
134
|
+
/**
|
|
135
|
+
* Markup that can execute anything — a `<script>`, an inline `on*` handler or a
|
|
136
|
+
* `javascript:` URL — is quarantined in a sandboxed iframe. Everything else is
|
|
137
|
+
* passive and can be rendered straight into the page.
|
|
138
|
+
*/
|
|
139
|
+
export declare function resolveEmbedMode(html: string): EmbedMode;
|
|
140
|
+
export declare function clampEmbedWidth(width: number): number;
|
|
141
|
+
export declare function normalizeEmbedAlign(align: string): EmbedAlign;
|
|
142
|
+
export declare function escapeEmbedAttribute(value: string): string;
|
|
143
|
+
export declare function escapeEmbedText(value: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* UTF-8 safe base64, working in both the browser (`btoa`) and Node (`Buffer`).
|
|
146
|
+
* The intermediate `%xx` round-trip is what makes non-ASCII captions and
|
|
147
|
+
* markup survive — `btoa` alone throws on anything above U+00FF.
|
|
148
|
+
*/
|
|
149
|
+
export declare function encodeEmbedCode(code: string): string;
|
|
150
|
+
export declare function decodeEmbedCode(encoded: string): string;
|
|
151
|
+
export declare function createEmbedValue(params: {
|
|
152
|
+
code: string;
|
|
153
|
+
provider?: string;
|
|
154
|
+
url?: string;
|
|
155
|
+
ratio?: number | null;
|
|
156
|
+
width?: number;
|
|
157
|
+
align?: string;
|
|
158
|
+
caption?: string;
|
|
159
|
+
sandboxLevel?: EmbedSandboxLevel;
|
|
160
|
+
}): EmbedValue;
|
|
161
|
+
/**
|
|
162
|
+
* The outer block's own layout — width, float and the margins each align needs.
|
|
163
|
+
*
|
|
164
|
+
* `position:relative` is deliberate: an editor overlays a click catcher on the
|
|
165
|
+
* block (an embed's own iframe swallows the click that should select it), and
|
|
166
|
+
* that overlay needs the block as its positioning context.
|
|
167
|
+
*/
|
|
168
|
+
export declare function embedBlockStyle(value: Pick<EmbedValue, 'width' | 'align'>): string;
|
|
169
|
+
/**
|
|
170
|
+
* The frame is what holds the embed itself. With a `ratio` it becomes the
|
|
171
|
+
* responsive padding-top box the provider templates fill absolutely; without
|
|
172
|
+
* one the template carries its own height.
|
|
173
|
+
*/
|
|
174
|
+
export declare function embedFrameStyle(ratio: number | null): string;
|
|
175
|
+
export declare const EMBED_CAPTION_STYLE = "margin-top:8px;font-size:0.875em;line-height:1.5;opacity:0.75;text-align:center";
|
|
176
|
+
/**
|
|
177
|
+
* The stored markup for one embed. This is the exact string both editors write
|
|
178
|
+
* into the content column and both runtimes read back.
|
|
179
|
+
*/
|
|
180
|
+
export declare function buildEmbedElementHtml(value: EmbedValue): string;
|
|
181
|
+
/**
|
|
182
|
+
* `inline` keeps the markup as real children so it renders with no JavaScript.
|
|
183
|
+
* `sandbox` keeps only a `<noscript>` link — the markup itself lives, encoded,
|
|
184
|
+
* on `data-tq-embed-code` and the runtime mounts it in a sandboxed iframe.
|
|
185
|
+
*/
|
|
186
|
+
export declare function buildEmbedFrameChildren(value: EmbedValue): string;
|
|
187
|
+
export declare function findEmbedFrame(element: Element): Element | null;
|
|
188
|
+
export declare function readEmbedValueFromElement(element: Element): EmbedValue;
|
|
189
|
+
/**
|
|
190
|
+
* A corrupted `data-tq-embed-code` (truncated by an export round-trip, mangled
|
|
191
|
+
* by a content rewrite) must degrade to "render nothing", never to a thrown
|
|
192
|
+
* exception inside a render pass.
|
|
193
|
+
*/
|
|
194
|
+
export declare function readEncodedEmbedCode(element: Element): string;
|
|
195
|
+
export declare function applyEmbedElementLayout(element: Element, updates: {
|
|
196
|
+
width?: number;
|
|
197
|
+
align?: string;
|
|
198
|
+
}): void;
|
|
199
|
+
/**
|
|
200
|
+
* Adds, updates or removes the caption element in place. The caption lives both
|
|
201
|
+
* as an attribute (so it survives a sandbox re-render) and as visible text.
|
|
202
|
+
*/
|
|
203
|
+
export declare function applyEmbedElementCaption(element: Element, caption: string): void;
|
|
204
|
+
/**
|
|
205
|
+
* `allow-same-origin` is deliberately absent: combined with `allow-scripts` it
|
|
206
|
+
* lets a frame reach into the host page and even remove its own sandbox, which
|
|
207
|
+
* is the whole thing this mode exists to prevent.
|
|
208
|
+
*/
|
|
209
|
+
export declare const EMBED_SANDBOX_FLAGS_STRICT = "allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms allow-presentation";
|
|
210
|
+
/** The opt-in for widgets that refuse to render without storage access. */
|
|
211
|
+
export declare const EMBED_SANDBOX_FLAGS_TRUSTED: string;
|
|
212
|
+
export declare function resolveEmbedSandboxFlags(level: EmbedSandboxLevel): string;
|
|
213
|
+
export declare const EMBED_HEIGHT_MESSAGE_TYPE = "tq-embed-height";
|
|
214
|
+
export declare const EMBED_TOKEN_PLACEHOLDER = "__TQ_EMBED_TOKEN__";
|
|
215
|
+
export declare const EMBED_MIN_HEIGHT = 80;
|
|
216
|
+
export declare const EMBED_MAX_HEIGHT = 6000;
|
|
217
|
+
/** Until the frame reports back, this is what it occupies. */
|
|
218
|
+
export declare const EMBED_INITIAL_HEIGHT = 320;
|
|
219
|
+
export declare const EMBED_SANDBOX_DOC_HEAD: string;
|
|
220
|
+
export declare const EMBED_SANDBOX_DOC_TAIL = "</body></html>";
|
|
221
|
+
/**
|
|
222
|
+
* The document a sandboxed embed is given. Assign it to `iframe.srcdoc` as a
|
|
223
|
+
* property — writing it into the attribute would need HTML escaping.
|
|
224
|
+
*/
|
|
225
|
+
export declare function buildEmbedSandboxDocument(code: string, token: string): string;
|
|
226
|
+
/**
|
|
227
|
+
* A sandboxed frame has an opaque origin, so `event.origin` is `"null"` and
|
|
228
|
+
* cannot identify it. The per-frame token baked into its document is the guard
|
|
229
|
+
* instead: a message is only ever matched against tokens this page minted.
|
|
230
|
+
*/
|
|
231
|
+
export declare function parseEmbedHeightMessage(data: unknown): {
|
|
232
|
+
token: string;
|
|
233
|
+
height: number;
|
|
234
|
+
} | null;
|
|
235
|
+
export declare function createEmbedToken(): string;
|
|
236
|
+
/**
|
|
237
|
+
* Restores every embed inside `root` to its canonical STORED form, in place.
|
|
238
|
+
*
|
|
239
|
+
* An editor reads its value back out of the live DOM (Quill hands back
|
|
240
|
+
* `root.innerHTML`), and by then the DOM carries things the content column must
|
|
241
|
+
* never keep: the preview an editor mounted next to a sandboxed embed, and the
|
|
242
|
+
* marker a runtime writes once it has handled a block. The editor normalizes a
|
|
243
|
+
* detached CLONE of its root through this before emitting a value, so what is
|
|
244
|
+
* stored is exactly what `buildEmbedElementHtml` would have produced — whatever
|
|
245
|
+
* the preview did to the live DOM.
|
|
246
|
+
*
|
|
247
|
+
* The frame restore is a self-heal for the other mounting strategy: the canvas
|
|
248
|
+
* and the published page mount INTO the frame, because they never read back.
|
|
249
|
+
*/
|
|
250
|
+
export declare function normalizeEmbedsForStorage(root: Element): void;
|
|
251
|
+
//# sourceMappingURL=rich-text-embeds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-text-embeds.d.ts","sourceRoot":"","sources":["../../../src/utils/rich-text-embeds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,YAAY,GAAG,aAAa,CAAA;AAChE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAC5C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEpD,MAAM,WAAW,UAAU;IACzB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAA;IACX,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,CAAA;IACf,6EAA6E;IAC7E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,iBAAiB,CAAA;CAChC;AAED,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAC1C,eAAO,MAAM,sBAAsB,mBAAmB,CAAA;AACtD,eAAO,MAAM,wBAAwB,qBAAqB,CAAA;AAE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