@nuralyui/document 0.0.1 → 0.0.3
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/demo/document-demo.js +2 -2
- package/demo/document-demo.js.map +1 -1
- package/document.component.js +1 -1
- package/document.component.js.map +1 -1
- package/package.json +1 -1
- package/react.d.ts +306 -0
- package/react.d.ts.map +1 -0
- package/react.js +12 -0
- package/react.js.map +1 -0
package/demo/document-demo.js
CHANGED
|
@@ -19,14 +19,14 @@ let HyDatePickerDemoElement = class HyDatePickerDemoElement extends LitElement {
|
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
return html `
|
|
22
|
-
<hy-
|
|
22
|
+
<hy-document-viewer
|
|
23
23
|
previewable="true"
|
|
24
24
|
id="url-viewer"
|
|
25
25
|
src="http://localhost:7004/api/v1/storage/preview/my-folder%2FRNE%20Public.pdf"
|
|
26
26
|
width="100%"
|
|
27
27
|
height="500px"
|
|
28
28
|
previewable
|
|
29
|
-
></hy-
|
|
29
|
+
></hy-document-viewer>
|
|
30
30
|
`;
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-demo.js","sourceRoot":"","sources":["../../../../src/components/document/demo/document-demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,0BAA0B,CAAC;AAGlC,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,UAAU;IAAvD;;QAEE,qBAAgB,GAAG,IAAI,CAAC;IAc1B,CAAC;IAZU,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;KASV,CAAC;IACJ,CAAC;CACF,CAAA;AAdC;IADC,KAAK,EAAE;iEACgB;AAFb,uBAAuB;IADnC,aAAa,CAAC,kBAAkB,CAAC;GACrB,uBAAuB,CAgBnC;SAhBY,uBAAuB","sourcesContent":["/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport '../document.component.js';\n\n@customElement('hy-document-demo')\nexport class HyDatePickerDemoElement extends LitElement {\n @state()\n selectedLanguage = 'en';\n\n override render() {\n return html`\n <hy-
|
|
1
|
+
{"version":3,"file":"document-demo.js","sourceRoot":"","sources":["../../../../src/components/document/demo/document-demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,0BAA0B,CAAC;AAGlC,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,UAAU;IAAvD;;QAEE,qBAAgB,GAAG,IAAI,CAAC;IAc1B,CAAC;IAZU,MAAM;QACb,OAAO,IAAI,CAAA;;;;;;;;;KASV,CAAC;IACJ,CAAC;CACF,CAAA;AAdC;IADC,KAAK,EAAE;iEACgB;AAFb,uBAAuB;IADnC,aAAa,CAAC,kBAAkB,CAAC;GACrB,uBAAuB,CAgBnC;SAhBY,uBAAuB","sourcesContent":["/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport '../document.component.js';\n\n@customElement('hy-document-demo')\nexport class HyDatePickerDemoElement extends LitElement {\n @state()\n selectedLanguage = 'en';\n\n override render() {\n return html`\n <hy-document-viewer \n previewable=\"true\"\n id=\"url-viewer\"\n src=\"http://localhost:7004/api/v1/storage/preview/my-folder%2FRNE%20Public.pdf\"\n width=\"100%\"\n height=\"500px\"\n previewable\n ></hy-document-viewer>\n `;\n }\n}\n"]}
|
package/document.component.js
CHANGED
|
@@ -220,7 +220,7 @@ __decorate([
|
|
|
220
220
|
state()
|
|
221
221
|
], HyPdfViewer.prototype, "isFullscreen", void 0);
|
|
222
222
|
HyPdfViewer = __decorate([
|
|
223
|
-
customElement('hy-
|
|
223
|
+
customElement('hy-document-viewer')
|
|
224
224
|
], HyPdfViewer);
|
|
225
225
|
export { HyPdfViewer };
|
|
226
226
|
//# sourceMappingURL=document.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.component.js","sourceRoot":"","sources":["../../../src/components/document/document.component.ts"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"document.component.js","sourceRoot":"","sources":["../../../src/components/document/document.component.ts"],"names":[],"mappings":"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","sourcesContent":["import { LitElement, html, css } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\n@customElement('hy-document-viewer')\nexport class HyPdfViewer extends LitElement {\n @property()\n src!: string;\n\n @property()\n width = 'auto';\n\n @property()\n height = 'auto';\n\n @property({type: Object})\n fallback = null;\n\n @property({ type: Boolean })\n previewable = false;\n\n @state()\n private isFullscreen = false;\n\n defaultFallBack = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAxMjAgMTIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHJlY3Qgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIGZpbGw9IiNFRkYxRjMiLz4NCjxwYXRoIGQ9Ik01OS40IDYyLjhWODAuNEg0OC4yVjQxLjZINjMuNEM2Ny4xIDQxLjYgNzAuMSA0Mi42IDcyLjQgNDQuN0M3NC43IDQ2LjggNzUuOCA0OS42IDc1LjggNTNDNzUuOCA1Ni41IDc0LjcgNTkuMiA3Mi40IDYxLjNDNzAuMiA2My40IDY3LjIgNjQuNCA2My40IDY0LjRINTkuNFY2Mi44Wk01OS40IDU0LjZINjMuNEM2NSA1NC42IDY2LjMgNTQuMSA2Ny4yIDUzQzY4LjEgNTEuOSA2OC42IDUwLjYgNjguNiA0OUM2OC42IDQ3LjUgNjguMSA0Ni4yIDY3LjIgNDUuMUM2Ni4zIDQ0IDY1IDQzLjQgNjMuNCA0My40SDU5LjRWNTQuNloiIGZpbGw9IiM2ODc3ODciLz4NCjwvc3ZnPg==';\n\n static override styles = css`\n :host {\n display: block;\n }\n \n .pdf-container {\n position: relative;\n overflow: hidden;\n min-height: 100px;\n background-color: #f5f5f5;\n border: 1px solid #e0e0e0;\n }\n \n .pdf-iframe {\n border: none;\n display: block;\n width: 100%;\n height: 100%;\n }\n \n .preview-button {\n position: absolute;\n top: 10px;\n right: 10px;\n background-color: rgba(255, 255, 255, 0.8);\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 5px 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 12px;\n z-index: 10;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n }\n \n .preview-button:hover {\n background-color: rgba(255, 255, 255, 1);\n }\n\n .preview-button svg {\n margin-right: 4px;\n }\n \n .fullscreen-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.95);\n z-index: 9999;\n display: flex;\n flex-direction: column;\n }\n \n .fullscreen-header {\n display: flex;\n justify-content: flex-end;\n padding: 16px;\n background-color: rgba(0, 0, 0, 0.4);\n }\n \n .close-button {\n background-color: white;\n border: none;\n border-radius: 4px;\n padding: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n }\n\n .close-button:hover {\n background-color: #f0f0f0;\n }\n \n .fullscreen-content {\n flex: 1;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .fullscreen-iframe {\n width: 100%;\n height: 100%;\n border: none;\n background-color: white;\n }\n `;\n\n override render() {\n return html`\n <div class=\"pdf-container\" style=\"width:${this.width}; height:${this.height};\">\n <iframe \n class=\"pdf-iframe\"\n src=\"${this.src}\" \n title=\"PDF Viewer\"\n @error=${this._handleError}\n ></iframe>\n \n ${this.previewable ? html`\n <button class=\"preview-button\" @click=${this._openFullscreen}>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.5 1H1.5C1.22386 1 1 1.22386 1 1.5V5.5C1 5.77614 1.22386 6 1.5 6C1.77614 6 2 5.77614 2 5.5V2H5.5C5.77614 2 6 1.77614 6 1.5C6 1.22386 5.77614 1 5.5 1Z\" fill=\"currentColor\"/>\n <path d=\"M14.5 1H10.5C10.2239 1 10 1.22386 10 1.5C10 1.77614 10.2239 2 10.5 2H14V5.5C14 5.77614 14.2239 6 14.5 6C14.7761 6 15 5.77614 15 5.5V1.5C15 1.22386 14.7761 1 14.5 1Z\" fill=\"currentColor\"/>\n <path d=\"M5.5 14H2V10.5C2 10.2239 1.77614 10 1.5 10C1.22386 10 1 10.2239 1 10.5V14.5C1 14.7761 1.22386 15 1.5 15H5.5C5.77614 15 6 14.7761 6 14.5C6 14.2239 5.77614 14 5.5 14Z\" fill=\"currentColor\"/>\n <path d=\"M14.5 10C14.2239 10 14 10.2239 14 10.5V14H10.5C10.2239 14 10 14.2239 10 14.5C10 14.7761 10.2239 15 10.5 15H14.5C14.7761 15 15 14.7761 15 14.5V10.5C15 10.2239 14.7761 10 14.5 10Z\" fill=\"currentColor\"/>\n </svg>\n Fullscreen\n </button>\n ` : ''}\n </div>\n \n ${this.isFullscreen ? html`\n <div class=\"fullscreen-overlay\">\n <div class=\"fullscreen-header\">\n <button class=\"close-button\" @click=${this._closeFullscreen}>\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.5 3.5L3.5 12.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M12.5 12.5L3.5 3.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n <div class=\"fullscreen-content\">\n <iframe \n class=\"fullscreen-iframe\"\n src=\"${this.src}\" \n title=\"Fullscreen PDF\"\n ></iframe>\n </div>\n </div>\n ` : ''}\n `;\n }\n\n _handleError(e: Event) {\n console.error('PDF loading error:', e);\n this.dispatchEvent(new CustomEvent('onError', {\n bubbles: true,\n composed: true,\n detail: {\n error: `Error loading PDF: PDF viewer not supported or file cannot be loaded`\n }\n }));\n \n // Show fallback image when error occurs\n const container = this.shadowRoot?.querySelector('.pdf-container');\n if (container) {\n const iframe = container.querySelector('iframe');\n if (iframe) {\n const img = document.createElement('img');\n img.src = this.fallback || this.defaultFallBack;\n img.alt = \"PDF failed to load\";\n img.style.width = \"100%\";\n img.style.height = \"100%\";\n img.style.objectFit = \"contain\";\n container.replaceChild(img, iframe);\n }\n }\n }\n\n _openFullscreen() {\n this.isFullscreen = true;\n // Prevent scrolling of the background when fullscreen is active\n document.body.style.overflow = 'hidden';\n }\n\n _closeFullscreen() {\n this.isFullscreen = false;\n // Restore scrolling when fullscreen is closed\n document.body.style.overflow = '';\n }\n\n // Clean up when component is removed\n override disconnectedCallback() {\n super.disconnectedCallback();\n // Ensure body scrolling is restored if component is removed while in fullscreen\n if (this.isFullscreen) {\n document.body.style.overflow = '';\n }\n }\n}"]}
|
package/package.json
CHANGED
package/react.d.ts
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export declare const HyDocument: import("@lit-labs/react").ReactWebComponent<{
|
|
2
|
+
accessKey: string;
|
|
3
|
+
readonly accessKeyLabel: string;
|
|
4
|
+
autocapitalize: string;
|
|
5
|
+
dir: string;
|
|
6
|
+
draggable: boolean;
|
|
7
|
+
hidden: boolean;
|
|
8
|
+
innerText: string;
|
|
9
|
+
lang: string;
|
|
10
|
+
readonly offsetHeight: number;
|
|
11
|
+
readonly offsetLeft: number;
|
|
12
|
+
readonly offsetParent: Element | null;
|
|
13
|
+
readonly offsetTop: number;
|
|
14
|
+
readonly offsetWidth: number;
|
|
15
|
+
outerText: string;
|
|
16
|
+
spellcheck: boolean;
|
|
17
|
+
title: string;
|
|
18
|
+
translate: boolean;
|
|
19
|
+
attachInternals(): ElementInternals;
|
|
20
|
+
click(): void;
|
|
21
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
22
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
23
|
+
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
24
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
25
|
+
readonly attributes: NamedNodeMap;
|
|
26
|
+
readonly classList: DOMTokenList;
|
|
27
|
+
className: string;
|
|
28
|
+
readonly clientHeight: number;
|
|
29
|
+
readonly clientLeft: number;
|
|
30
|
+
readonly clientTop: number;
|
|
31
|
+
readonly clientWidth: number;
|
|
32
|
+
id: string;
|
|
33
|
+
readonly localName: string;
|
|
34
|
+
readonly namespaceURI: string | null;
|
|
35
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
36
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
37
|
+
outerHTML: string;
|
|
38
|
+
readonly ownerDocument: Document;
|
|
39
|
+
readonly part: DOMTokenList;
|
|
40
|
+
readonly prefix: string | null;
|
|
41
|
+
readonly scrollHeight: number;
|
|
42
|
+
scrollLeft: number;
|
|
43
|
+
scrollTop: number;
|
|
44
|
+
readonly scrollWidth: number;
|
|
45
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
46
|
+
slot: string;
|
|
47
|
+
readonly tagName: string;
|
|
48
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
49
|
+
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
|
|
50
|
+
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
|
|
51
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
52
|
+
getAttribute(qualifiedName: string): string | null;
|
|
53
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
54
|
+
getAttributeNames(): string[];
|
|
55
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
56
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
57
|
+
getBoundingClientRect(): DOMRect;
|
|
58
|
+
getClientRects(): DOMRectList;
|
|
59
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
60
|
+
getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
|
|
61
|
+
getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
|
|
62
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
63
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
64
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
65
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
66
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
67
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
68
|
+
hasAttributes(): boolean;
|
|
69
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
70
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
71
|
+
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
72
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
73
|
+
matches(selectors: string): boolean;
|
|
74
|
+
releasePointerCapture(pointerId: number): void;
|
|
75
|
+
removeAttribute(qualifiedName: string): void;
|
|
76
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
77
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
78
|
+
requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
|
|
79
|
+
requestPointerLock(): void;
|
|
80
|
+
scroll(options?: ScrollToOptions | undefined): void;
|
|
81
|
+
scroll(x: number, y: number): void;
|
|
82
|
+
scrollBy(options?: ScrollToOptions | undefined): void;
|
|
83
|
+
scrollBy(x: number, y: number): void;
|
|
84
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
|
|
85
|
+
scrollTo(options?: ScrollToOptions | undefined): void;
|
|
86
|
+
scrollTo(x: number, y: number): void;
|
|
87
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
88
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
89
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
90
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
91
|
+
setPointerCapture(pointerId: number): void;
|
|
92
|
+
toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
|
|
93
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
94
|
+
readonly baseURI: string;
|
|
95
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
96
|
+
readonly firstChild: ChildNode | null;
|
|
97
|
+
readonly isConnected: boolean;
|
|
98
|
+
readonly lastChild: ChildNode | null;
|
|
99
|
+
readonly nextSibling: ChildNode | null;
|
|
100
|
+
readonly nodeName: string;
|
|
101
|
+
readonly nodeType: number;
|
|
102
|
+
nodeValue: string | null;
|
|
103
|
+
readonly parentElement: HTMLElement | null;
|
|
104
|
+
readonly parentNode: ParentNode | null;
|
|
105
|
+
readonly previousSibling: ChildNode | null;
|
|
106
|
+
textContent: string | null;
|
|
107
|
+
appendChild<T extends Node>(node: T): T;
|
|
108
|
+
cloneNode(deep?: boolean | undefined): Node;
|
|
109
|
+
compareDocumentPosition(other: Node): number;
|
|
110
|
+
contains(other: Node | null): boolean;
|
|
111
|
+
getRootNode(options?: GetRootNodeOptions | undefined): Node;
|
|
112
|
+
hasChildNodes(): boolean;
|
|
113
|
+
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
114
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
115
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
116
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
117
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
118
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
119
|
+
normalize(): void;
|
|
120
|
+
removeChild<T_2 extends Node>(child: T_2): T_2;
|
|
121
|
+
replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
|
|
122
|
+
readonly ATTRIBUTE_NODE: number;
|
|
123
|
+
readonly CDATA_SECTION_NODE: number;
|
|
124
|
+
readonly COMMENT_NODE: number;
|
|
125
|
+
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
126
|
+
readonly DOCUMENT_NODE: number;
|
|
127
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
128
|
+
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
129
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: number;
|
|
130
|
+
readonly DOCUMENT_POSITION_FOLLOWING: number;
|
|
131
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
|
|
132
|
+
readonly DOCUMENT_POSITION_PRECEDING: number;
|
|
133
|
+
readonly DOCUMENT_TYPE_NODE: number;
|
|
134
|
+
readonly ELEMENT_NODE: number;
|
|
135
|
+
readonly ENTITY_NODE: number;
|
|
136
|
+
readonly ENTITY_REFERENCE_NODE: number;
|
|
137
|
+
readonly NOTATION_NODE: number;
|
|
138
|
+
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
139
|
+
readonly TEXT_NODE: number;
|
|
140
|
+
dispatchEvent(event: Event): boolean;
|
|
141
|
+
ariaAtomic: string | null;
|
|
142
|
+
ariaAutoComplete: string | null;
|
|
143
|
+
ariaBusy: string | null;
|
|
144
|
+
ariaChecked: string | null;
|
|
145
|
+
ariaColCount: string | null;
|
|
146
|
+
ariaColIndex: string | null;
|
|
147
|
+
ariaColSpan: string | null;
|
|
148
|
+
ariaCurrent: string | null;
|
|
149
|
+
ariaDisabled: string | null;
|
|
150
|
+
ariaExpanded: string | null;
|
|
151
|
+
ariaHasPopup: string | null;
|
|
152
|
+
ariaHidden: string | null;
|
|
153
|
+
ariaKeyShortcuts: string | null;
|
|
154
|
+
ariaLabel: string | null;
|
|
155
|
+
ariaLevel: string | null;
|
|
156
|
+
ariaLive: string | null;
|
|
157
|
+
ariaModal: string | null;
|
|
158
|
+
ariaMultiLine: string | null;
|
|
159
|
+
ariaMultiSelectable: string | null;
|
|
160
|
+
ariaOrientation: string | null;
|
|
161
|
+
ariaPlaceholder: string | null;
|
|
162
|
+
ariaPosInSet: string | null;
|
|
163
|
+
ariaPressed: string | null;
|
|
164
|
+
ariaReadOnly: string | null;
|
|
165
|
+
ariaRequired: string | null;
|
|
166
|
+
ariaRoleDescription: string | null;
|
|
167
|
+
ariaRowCount: string | null;
|
|
168
|
+
ariaRowIndex: string | null;
|
|
169
|
+
ariaRowSpan: string | null;
|
|
170
|
+
ariaSelected: string | null;
|
|
171
|
+
ariaSetSize: string | null;
|
|
172
|
+
ariaSort: string | null;
|
|
173
|
+
ariaValueMax: string | null;
|
|
174
|
+
ariaValueMin: string | null;
|
|
175
|
+
ariaValueNow: string | null;
|
|
176
|
+
ariaValueText: string | null;
|
|
177
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
|
|
178
|
+
getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
|
|
179
|
+
after(...nodes: (string | Node)[]): void;
|
|
180
|
+
before(...nodes: (string | Node)[]): void;
|
|
181
|
+
remove(): void;
|
|
182
|
+
replaceWith(...nodes: (string | Node)[]): void;
|
|
183
|
+
innerHTML: string;
|
|
184
|
+
readonly nextElementSibling: Element | null;
|
|
185
|
+
readonly previousElementSibling: Element | null;
|
|
186
|
+
readonly childElementCount: number;
|
|
187
|
+
readonly children: HTMLCollection;
|
|
188
|
+
readonly firstElementChild: Element | null;
|
|
189
|
+
readonly lastElementChild: Element | null;
|
|
190
|
+
append(...nodes: (string | Node)[]): void;
|
|
191
|
+
prepend(...nodes: (string | Node)[]): void;
|
|
192
|
+
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
|
|
193
|
+
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
|
|
194
|
+
querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
|
|
195
|
+
querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
|
|
196
|
+
querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
|
|
197
|
+
querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
|
|
198
|
+
replaceChildren(...nodes: (string | Node)[]): void;
|
|
199
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
200
|
+
oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
201
|
+
oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
202
|
+
onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
203
|
+
readonly style: CSSStyleDeclaration;
|
|
204
|
+
contentEditable: string;
|
|
205
|
+
enterKeyHint: string;
|
|
206
|
+
inputMode: string;
|
|
207
|
+
readonly isContentEditable: boolean;
|
|
208
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
209
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
210
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
211
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
212
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
213
|
+
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
214
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
215
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
216
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
217
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
218
|
+
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
219
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
220
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
221
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
222
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
223
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
224
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
225
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
226
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
227
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
228
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
229
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
230
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
231
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
232
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
233
|
+
onerror: OnErrorEventHandler;
|
|
234
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
235
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
236
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
237
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
238
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
239
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
240
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
241
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
242
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
243
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
244
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
245
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
247
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
248
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
249
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
250
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
251
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
252
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
253
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
254
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
255
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
257
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
258
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
259
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
260
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
261
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
262
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
263
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
264
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
265
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
|
|
266
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
267
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
269
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
270
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
271
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
272
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
275
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
277
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
279
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
+
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
283
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
284
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
285
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
286
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
287
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
288
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
289
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
290
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
291
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
292
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
293
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
297
|
+
autofocus: boolean;
|
|
298
|
+
readonly dataset: DOMStringMap;
|
|
299
|
+
nonce?: string | undefined;
|
|
300
|
+
tabIndex: number;
|
|
301
|
+
blur(): void;
|
|
302
|
+
focus(options?: FocusOptions | undefined): void;
|
|
303
|
+
}, {
|
|
304
|
+
documentChange: string;
|
|
305
|
+
}>;
|
|
306
|
+
//# sourceMappingURL=react.d.ts.map
|
package/react.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/document/react.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC"}
|
package/react.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent } from '@lit-labs/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export const HyDocument = createComponent({
|
|
4
|
+
tagName: 'hy-document',
|
|
5
|
+
elementClass: class extends HTMLElement {
|
|
6
|
+
},
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
documentChange: 'document-change',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=react.js.map
|
package/react.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/document/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,KAAM,SAAQ,WAAW;KAAG;IAC1C,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,cAAc,EAAE,iBAAiB;KAClC;CACF,CAAC,CAAC","sourcesContent":["import {createComponent} from '@lit-labs/react';\nimport * as React from 'react';\n\nexport const HyDocument = createComponent({\n tagName: 'hy-document',\n elementClass: class extends HTMLElement {},\n react: React,\n events: {\n documentChange: 'document-change',\n },\n});\n"]}
|