@tempots/dom 24.0.0-next.5 → 24.0.0-next.6
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/dom/headless-context.d.ts +2 -2
- package/index.cjs +1 -1
- package/index.js +872 -762
- package/package.json +1 -1
- package/renderable/render.d.ts +23 -0
package/package.json
CHANGED
package/renderable/render.d.ts
CHANGED
|
@@ -51,3 +51,26 @@ export declare const runHeadless: (makeRenderable: () => Renderable, { startUrl,
|
|
|
51
51
|
export declare class RenderingError extends Error {
|
|
52
52
|
constructor(message: string);
|
|
53
53
|
}
|
|
54
|
+
export declare const NODE_PLACEHOLDER_ATTR = "data-tts-node";
|
|
55
|
+
export declare const CLASS_PLACEHOLDER_ATTR = "data-tts-class";
|
|
56
|
+
export declare const STYLE_PLACEHOLDER_ATTR = "data-tts-style";
|
|
57
|
+
export declare const HTML_PLACEHOLDER_ATTR = "data-tts-html";
|
|
58
|
+
export declare const TEXT_PLACEHOLDER_ATTR = "data-tts-text";
|
|
59
|
+
export declare const ATTRS_PLACEHOLDER_ATTR = "data-tts-attrs";
|
|
60
|
+
export declare class HeadlessAdapter<EL> {
|
|
61
|
+
readonly select: (selector: string) => EL[];
|
|
62
|
+
readonly getAttribute: (el: EL, attr: string) => string | null;
|
|
63
|
+
readonly setAttribute: (el: EL, attr: string, value: string | null) => void;
|
|
64
|
+
readonly getClass: (el: EL) => string | null;
|
|
65
|
+
readonly setClass: (el: EL, cls: string | null) => void;
|
|
66
|
+
readonly getStyles: (el: EL) => Record<string, string>;
|
|
67
|
+
readonly setStyles: (el: EL, styles: Record<string, string>) => void;
|
|
68
|
+
readonly appendHTML: (el: EL, html: string) => void;
|
|
69
|
+
readonly getInnerHTML: (el: EL) => string | null;
|
|
70
|
+
readonly setInnerHTML: (el: EL, html: string) => void;
|
|
71
|
+
readonly getInnerText: (el: EL) => string | null;
|
|
72
|
+
readonly setInnerText: (el: EL, text: string) => void;
|
|
73
|
+
constructor(select: (selector: string) => EL[], getAttribute: (el: EL, attr: string) => string | null, setAttribute: (el: EL, attr: string, value: string | null) => void, getClass: (el: EL) => string | null, setClass: (el: EL, cls: string | null) => void, getStyles: (el: EL) => Record<string, string>, setStyles: (el: EL, styles: Record<string, string>) => void, appendHTML: (el: EL, html: string) => void, getInnerHTML: (el: EL) => string | null, setInnerHTML: (el: EL, html: string) => void, getInnerText: (el: EL) => string | null, setInnerText: (el: EL, text: string) => void);
|
|
74
|
+
readonly setFromRoot: (root: HeadlessPortal, setPlaceholder: boolean) => void;
|
|
75
|
+
}
|
|
76
|
+
export declare const restoreTempoPlaceholders: () => void;
|