full site update
This commit is contained in:
87
node_modules/ultrahtml/dist/index.d.ts
generated
vendored
Normal file
87
node_modules/ultrahtml/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
export type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
export interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
export interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
export interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
export interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
export interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
export declare const DOCUMENT_NODE = 0;
|
||||
export declare const ELEMENT_NODE = 1;
|
||||
export declare const TEXT_NODE = 2;
|
||||
export declare const COMMENT_NODE = 3;
|
||||
export declare const DOCTYPE_NODE = 4;
|
||||
export declare function h(type: any, props?: null | Record<string, any>, ...children: any[]): ElementNode;
|
||||
export declare const Fragment: unique symbol;
|
||||
export declare function parse(input: string | ReturnType<typeof html>): any;
|
||||
export interface Visitor {
|
||||
(node: Node$1, parent?: Node$1, index?: number): void | Promise<void>;
|
||||
}
|
||||
export interface VisitorSync {
|
||||
(node: Node$1, parent?: Node$1, index?: number): void;
|
||||
}
|
||||
export declare const RenderFn: unique symbol;
|
||||
export declare function __unsafeHTML(str: string): {
|
||||
value: string;
|
||||
};
|
||||
export declare function __unsafeRenderFn(node: ElementNode, fn: (props: Record<string, any>, ...children: Node$1[]) => Node$1): ElementNode;
|
||||
export declare function attrs(attributes: Record<string, string>): {
|
||||
value: string;
|
||||
};
|
||||
export declare function html(tmpl: TemplateStringsArray, ...vals: any[]): {
|
||||
value: string;
|
||||
};
|
||||
export declare function walk(node: Node$1, callback: Visitor): Promise<void>;
|
||||
export declare function walkSync(node: Node$1, callback: VisitorSync): void;
|
||||
export declare function renderSync(node: Node$1): string;
|
||||
export declare function render(node: Node$1): Promise<string>;
|
||||
interface Transformer$1 {
|
||||
(node: Node$1): Node$1 | Promise<Node$1>;
|
||||
}
|
||||
export interface TransformerSync {
|
||||
(node: Node$1): Node$1;
|
||||
}
|
||||
export declare function transform(markup: string | Node$1, transformers?: Transformer$1[]): Promise<string>;
|
||||
export declare function transformSync(markup: string | Node$1, transformers?: TransformerSync[]): string;
|
||||
|
||||
export {
|
||||
Location$1 as Location,
|
||||
Node$1 as Node,
|
||||
Transformer$1 as Transformer,
|
||||
};
|
||||
|
||||
export {};
|
1
node_modules/ultrahtml/dist/index.js
generated
vendored
Normal file
1
node_modules/ultrahtml/dist/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/ultrahtml/dist/index.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
57
node_modules/ultrahtml/dist/jsx-runtime/index.d.ts
generated
vendored
Normal file
57
node_modules/ultrahtml/dist/jsx-runtime/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
export declare const Fragment: unique symbol;
|
||||
declare function createVNode(type: any, { children, ...attributes }: Record<string, any>, key: string, __self: string, __source: string): ElementNode;
|
||||
|
||||
export {
|
||||
createVNode as jsx,
|
||||
createVNode as jsxDEV,
|
||||
createVNode as jsxs,
|
||||
};
|
||||
|
||||
export {};
|
1
node_modules/ultrahtml/dist/jsx-runtime/index.js
generated
vendored
Normal file
1
node_modules/ultrahtml/dist/jsx-runtime/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{TEXT_NODE as a}from"../index.js";import{ELEMENT_NODE as s,Fragment as d,__unsafeRenderFn as f}from"../index.js";function g(n,{children:e,...o},i,m,u){let t={type:s,name:typeof n=="function"?n.name:n,attributes:o,children:(Array.isArray(e)?e:[e]).map(r=>typeof r=="string"?{type:a,value:r}:r),parent:void 0,loc:[]};return typeof n=="function"&&f(t,n),t}export{d as Fragment,g as jsx,g as jsxDEV,g as jsxs};
|
7
node_modules/ultrahtml/dist/jsx-runtime/index.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/jsx-runtime/index.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/jsx-runtime/index.ts"],
|
||||
"sourcesContent": ["import { ElementNode, Node, TEXT_NODE } from '../index.js';\nimport { ELEMENT_NODE, Fragment, __unsafeRenderFn } from '../index.js';\n\nfunction createVNode(\n\ttype: any,\n\t{ children, ...attributes }: Record<string, any>,\n\tkey: string,\n\t__self: string,\n\t__source: string,\n) {\n\tconst vnode: ElementNode = {\n\t\ttype: ELEMENT_NODE,\n\t\tname: typeof type === 'function' ? type.name : type,\n\t\tattributes,\n\t\tchildren: (Array.isArray(children) ? children : [children]).map((child) => {\n\t\t\tif (typeof child === 'string') {\n\t\t\t\treturn {\n\t\t\t\t\ttype: TEXT_NODE,\n\t\t\t\t\tvalue: child,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn child;\n\t\t}),\n\t\tparent: undefined as any,\n\t\tloc: [] as any,\n\t};\n\n\tif (typeof type === 'function') {\n\t\t__unsafeRenderFn(vnode, type);\n\t}\n\n\treturn vnode;\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n};\n"],
|
||||
"mappings": "AAAA,OAA4B,aAAAA,MAAiB,cAC7C,OAAS,gBAAAC,EAAc,YAAAC,EAAU,oBAAAC,MAAwB,cAEzD,SAASC,EACRC,EACA,CAAE,SAAAC,EAAU,GAAGC,CAAW,EAC1BC,EACAC,EACAC,EACC,CACD,IAAMC,EAAqB,CAC1B,KAAMV,EACN,KAAM,OAAOI,GAAS,WAAaA,EAAK,KAAOA,EAC/C,WAAAE,EACA,UAAW,MAAM,QAAQD,CAAQ,EAAIA,EAAW,CAACA,CAAQ,GAAG,IAAKM,GAC5D,OAAOA,GAAU,SACb,CACN,KAAMZ,EACN,MAAOY,CACR,EAEMA,CACP,EACD,OAAQ,OACR,IAAK,CAAC,CACP,EAEA,OAAI,OAAOP,GAAS,YACnBF,EAAiBQ,EAAON,CAAI,EAGtBM,CACR",
|
||||
"names": ["TEXT_NODE", "ELEMENT_NODE", "Fragment", "__unsafeRenderFn", "createVNode", "type", "children", "attributes", "key", "__self", "__source", "vnode", "child"]
|
||||
}
|
57
node_modules/ultrahtml/dist/selector.d.ts
generated
vendored
Normal file
57
node_modules/ultrahtml/dist/selector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
export declare function specificity(selector: string): number;
|
||||
export declare function matches(node: Node$1, selector: string): boolean;
|
||||
export declare function querySelector(node: Node$1, selector: string): Node$1;
|
||||
export declare function querySelectorAll(node: Node$1, selector: string): Node$1[];
|
||||
|
||||
export {
|
||||
querySelectorAll as default,
|
||||
};
|
||||
|
||||
export {};
|
1
node_modules/ultrahtml/dist/selector.js
generated
vendored
Normal file
1
node_modules/ultrahtml/dist/selector.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/ultrahtml/dist/selector.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/selector.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
100
node_modules/ultrahtml/dist/transformers/inline.d.ts
generated
vendored
Normal file
100
node_modules/ultrahtml/dist/transformers/inline.d.ts
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
type Integer = number;
|
||||
type Environment = {
|
||||
mediaType: "screen" | "print" | "not-screen-or-print";
|
||||
anyHover: "none" | "hover";
|
||||
anyPointer: "none" | "coarse" | "fine";
|
||||
colorGamut: "not-srgb" | "srgb-but-not-p3" | "p3-but-not-rec2020" | "rec2020";
|
||||
grid: "bitmap" | "grid";
|
||||
hover: "none" | "hover";
|
||||
overflowBlock: "none" | "scroll" | "paged";
|
||||
overflowInline: "none" | "scroll";
|
||||
pointer: "none" | "coarse" | "fine";
|
||||
scan: "interlace" | "progressive";
|
||||
update: "none" | "slow" | "fast";
|
||||
widthPx: Integer;
|
||||
heightPx: Integer;
|
||||
deviceWidthPx: Integer;
|
||||
deviceHeightPx: Integer;
|
||||
colorBits: Integer;
|
||||
monochromeBits: "not-monochrome" | Integer;
|
||||
colorIndex: "none" | Integer;
|
||||
dppx: Integer;
|
||||
displayMode: "fullscreen" | "standalone" | "minimal-ui" | "browser";
|
||||
dynamicRange: "not-hdr" | "hdr";
|
||||
environmentBlending: "opaque" | "additive" | "subtractive";
|
||||
forcedColors: "none" | "active";
|
||||
invertedColors: "none" | "inverted";
|
||||
navControls: "none" | "back";
|
||||
prefersColorScheme: "no-preference" | "light" | "dark";
|
||||
prefersContrast: "no-preference" | "less" | "more" | "custom";
|
||||
prefersReducedData: "no-preference" | "reduce";
|
||||
prefersReducedMotion: "no-preference" | "reduce";
|
||||
prefersReducedTransparency: "no-preference" | "reduce";
|
||||
scripting: "none" | "initial-only" | "enabled";
|
||||
videoColorGamut: "not-srgb" | "srgb-but-not-p3" | "p3-but-not-rec2020" | "rec2020";
|
||||
videoDynamicRange: "not-hdr" | "hdr";
|
||||
horizontalViewportSegments: Integer;
|
||||
verticalViewportSegments: Integer;
|
||||
};
|
||||
export interface InlineOptions {
|
||||
/** Emit `style` attributes as objects rather than strings. */
|
||||
useObjectSyntax: boolean;
|
||||
env: Partial<Environment> & {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
declare function inline(opts?: Partial<InlineOptions>): (doc: Node$1) => Node$1;
|
||||
|
||||
export {
|
||||
inline as default,
|
||||
};
|
||||
|
||||
export {};
|
7
node_modules/ultrahtml/dist/transformers/inline.js
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/transformers/inline.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/ultrahtml/dist/transformers/inline.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/transformers/inline.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
node_modules/ultrahtml/dist/transformers/sanitize.d.ts
generated
vendored
Normal file
74
node_modules/ultrahtml/dist/transformers/sanitize.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
export interface SanitizeOptions {
|
||||
/** An Array of strings indicating elements that the sanitizer should not remove. All elements not in the array will be dropped. */
|
||||
allowElements?: string[];
|
||||
/** An Array of strings indicating elements that the sanitizer should not remove. All elements not in the array will be removed while keeping their child content. */
|
||||
unblockElements?: string[];
|
||||
/** An Array of strings indicating elements that the sanitizer should remove, but keeping their child elements. */
|
||||
blockElements?: string[];
|
||||
/** An Array of strings indicating elements (including nested elements) that the sanitizer should remove. */
|
||||
dropElements?: string[];
|
||||
/** An Object where each key is the attribute name and the value is an Array of allowed tag names. Matching attributes will not be removed. All attributes that are not in the array will be dropped. */
|
||||
allowAttributes?: Record<string, string[]>;
|
||||
/** An Object where each key is the attribute name and the value is an Array of dropped tag names. Matching attributes will be removed. */
|
||||
dropAttributes?: Record<string, string[]>;
|
||||
/** A Boolean value set to false (default) to remove components and their children. If set to true, components will be subject to built-in and custom configuration checks (and will be retained or dropped based on those checks). */
|
||||
allowComponents?: boolean;
|
||||
/** A Boolean value set to false (default) to remove custom elements and their children. If set to true, custom elements will be subject to built-in and custom configuration checks (and will be retained or dropped based on those checks). */
|
||||
allowCustomElements?: boolean;
|
||||
/** A Boolean value set to false (default) to remove HTML comments. Set to true in order to keep comments. */
|
||||
allowComments?: boolean;
|
||||
}
|
||||
declare function sanitize(opts?: SanitizeOptions): (doc: Node$1) => Node$1;
|
||||
|
||||
export {
|
||||
sanitize as default,
|
||||
};
|
||||
|
||||
export {};
|
1
node_modules/ultrahtml/dist/transformers/sanitize.js
generated
vendored
Normal file
1
node_modules/ultrahtml/dist/transformers/sanitize.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{ELEMENT_NODE as a,walkSync as p}from"../index.js";function f(t){var n;if(t===void 0)return{allowElements:[],dropElements:["script"],allowComponents:!1,allowCustomElements:!1,allowComments:!1};{let e=new Set([]);(n=t.allowElements)!=null&&n.includes("script")||e.add("script");for(let l of t.dropElements??[])e.add(l);return{allowComponents:!1,allowCustomElements:!1,allowComments:!1,...t,dropElements:Array.from(e)}}}function E(t){return t.name.includes("-")?"custom-element":/[\_\$A-Z]/.test(t.name[0])||t.name.includes(".")?"component":"element"}function w(t,n,e){var l,o,s,r;return((l=e.allowElements)==null?void 0:l.length)>0&&e.allowElements.includes(t)?"allow":((o=e.blockElements)==null?void 0:o.length)>0&&e.blockElements.includes(t)?"block":((s=e.dropElements)==null?void 0:s.length)>0&&e.dropElements.find(u=>u===t)||n==="component"&&!e.allowComponents||n==="custom-element"&&!e.allowCustomElements?"drop":e.unblockElements?e.unblockElements.some(u=>u===t)?"allow":"block":((r=e.allowElements)==null?void 0:r.length)>0?"drop":"allow"}function b(t,n){var l,o,s,r,u,m,c,d;let e=t.attributes;for(let i of Object.keys(t.attributes))(l=n.allowAttributes)!=null&&l[i]&&((o=n.allowAttributes)!=null&&o[i].includes(t.name))||(r=(s=n.allowAttributes)==null?void 0:s[i])!=null&&r.includes("*")||((u=n.dropAttributes)!=null&&u[i]&&((m=n.dropAttributes)!=null&&m[i].includes(t.name))||(d=(c=n.dropAttributes)==null?void 0:c[i])!=null&&d.includes("*"))&&delete e[i];return e}function g(t,n,e){let l=E(n),{name:o}=n,s=w(o,l,t);return s==="drop"?()=>{e.children=e.children.filter(r=>r!==n)}:s==="block"?()=>{e.children=e.children.map(r=>r===n?r.children:r).flat(1)}:()=>{n.attributes=b(n,t)}}function N(t){let n=f(t);return e=>{let l=[];p(e,(o,s)=>{switch(o.type){case a:{l.push(g(n,o,s));return}default:return}});for(let o=l.length-1;o>=0;o--)l[o]();return e}}export{N as default};
|
7
node_modules/ultrahtml/dist/transformers/sanitize.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/transformers/sanitize.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
58
node_modules/ultrahtml/dist/transformers/scope.d.ts
generated
vendored
Normal file
58
node_modules/ultrahtml/dist/transformers/scope.d.ts
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
export interface ScopeOptions {
|
||||
hash?: string;
|
||||
attribute?: string;
|
||||
}
|
||||
declare function scope(opts?: ScopeOptions): (doc: Node$1) => Promise<Node$1>;
|
||||
|
||||
export {
|
||||
scope as default,
|
||||
};
|
||||
|
||||
export {};
|
31
node_modules/ultrahtml/dist/transformers/scope.js
generated
vendored
Normal file
31
node_modules/ultrahtml/dist/transformers/scope.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/ultrahtml/dist/transformers/scope.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/transformers/scope.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
54
node_modules/ultrahtml/dist/transformers/swap.d.ts
generated
vendored
Normal file
54
node_modules/ultrahtml/dist/transformers/swap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
// Generated by dts-bundle-generator v9.5.1
|
||||
|
||||
type Node$1 = DocumentNode | ElementNode | TextNode | CommentNode | DoctypeNode;
|
||||
type NodeType = typeof DOCUMENT_NODE | typeof ELEMENT_NODE | typeof TEXT_NODE | typeof COMMENT_NODE | typeof DOCTYPE_NODE;
|
||||
interface Location$1 {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
interface BaseNode {
|
||||
type: NodeType;
|
||||
loc: [
|
||||
Location$1,
|
||||
Location$1
|
||||
];
|
||||
parent: Node$1;
|
||||
[key: string]: any;
|
||||
}
|
||||
interface LiteralNode extends BaseNode {
|
||||
value: string;
|
||||
}
|
||||
interface ParentNode$1 extends BaseNode {
|
||||
children: Node$1[];
|
||||
}
|
||||
interface DocumentNode extends Omit<ParentNode$1, "parent"> {
|
||||
type: typeof DOCUMENT_NODE;
|
||||
attributes: Record<string, string>;
|
||||
parent: undefined;
|
||||
}
|
||||
interface ElementNode extends ParentNode$1 {
|
||||
type: typeof ELEMENT_NODE;
|
||||
name: string;
|
||||
attributes: Record<string, string>;
|
||||
}
|
||||
interface TextNode extends LiteralNode {
|
||||
type: typeof TEXT_NODE;
|
||||
}
|
||||
interface CommentNode extends LiteralNode {
|
||||
type: typeof COMMENT_NODE;
|
||||
}
|
||||
interface DoctypeNode extends LiteralNode {
|
||||
type: typeof DOCTYPE_NODE;
|
||||
}
|
||||
declare const DOCUMENT_NODE = 0;
|
||||
declare const ELEMENT_NODE = 1;
|
||||
declare const TEXT_NODE = 2;
|
||||
declare const COMMENT_NODE = 3;
|
||||
declare const DOCTYPE_NODE = 4;
|
||||
declare function swap(components?: Record<string, string | ((props: Record<string, any>, ...children: any[]) => any)>): (doc: Node$1) => Node$1;
|
||||
|
||||
export {
|
||||
swap as default,
|
||||
};
|
||||
|
||||
export {};
|
1
node_modules/ultrahtml/dist/transformers/swap.js
generated
vendored
Normal file
1
node_modules/ultrahtml/dist/transformers/swap.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{RenderFn as r}from"../index.js";import{__unsafeRenderFn as i}from"../index.js";import{querySelectorAll as s}from"../selector.js";function d(t={}){return o=>{for(let[f,e]of Object.entries(t))for(let n of s(o,f))typeof e=="string"?(n.name=e,r in n&&delete n[r]):typeof e=="function"&&i(n,e);return o}}export{d as default};
|
7
node_modules/ultrahtml/dist/transformers/swap.js.map
generated
vendored
Normal file
7
node_modules/ultrahtml/dist/transformers/swap.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../src/transformers/swap.ts"],
|
||||
"sourcesContent": ["import { ElementNode, RenderFn } from '../index.js';\nimport { Node, __unsafeRenderFn } from '../index.js';\nimport { querySelectorAll } from '../selector.js';\n\nexport default function swap(\n\tcomponents: Record<\n\t\tstring,\n\t\tstring | ((props: Record<string, any>, ...children: any[]) => any)\n\t> = {},\n) {\n\treturn (doc: Node): Node => {\n\t\tfor (const [selector, component] of Object.entries(components)) {\n\t\t\tfor (const node of querySelectorAll(doc, selector)) {\n\t\t\t\tif (typeof component === 'string') {\n\t\t\t\t\tnode.name = component;\n\t\t\t\t\tif (RenderFn in node) {\n\t\t\t\t\t\tdelete (node as any)[RenderFn];\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof component === 'function') {\n\t\t\t\t\t__unsafeRenderFn(node as ElementNode, component);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn doc;\n\t};\n}\n"],
|
||||
"mappings": "AAAA,OAAsB,YAAAA,MAAgB,cACtC,OAAe,oBAAAC,MAAwB,cACvC,OAAS,oBAAAC,MAAwB,iBAElB,SAARC,EACNC,EAGI,CAAC,EACJ,CACD,OAAQC,GAAoB,CAC3B,OAAW,CAACC,EAAUC,CAAS,IAAK,OAAO,QAAQH,CAAU,EAC5D,QAAWI,KAAQN,EAAiBG,EAAKC,CAAQ,EAC5C,OAAOC,GAAc,UACxBC,EAAK,KAAOD,EACRP,KAAYQ,GACf,OAAQA,EAAaR,CAAQ,GAEpB,OAAOO,GAAc,YAC/BN,EAAiBO,EAAqBD,CAAS,EAIlD,OAAOF,CACR,CACD",
|
||||
"names": ["RenderFn", "__unsafeRenderFn", "querySelectorAll", "swap", "components", "doc", "selector", "component", "node"]
|
||||
}
|
Reference in New Issue
Block a user