@sellmate/design-system 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/index-Cbd_FIth.js +21891 -0
- package/dist/cjs/index-Cbd_FIth.js.map +1 -0
- package/dist/cjs/index-DoEgM-7l.js +2586 -0
- package/dist/cjs/index-DoEgM-7l.js.map +1 -0
- package/dist/cjs/{index-eJV9DRUN.js → index-iB3JlG0y.js} +650 -12
- package/dist/cjs/{index-eJV9DRUN.js.map → index-iB3JlG0y.js.map} +1 -1
- package/dist/cjs/index.cjs.js +121 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-button_4.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-box_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option.cjs.entry.js +1 -1
- package/dist/cjs/sd-select.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +1 -1
- package/dist/cjs/sd-tooltip-portal.cjs.entry.js +1 -1
- package/dist/cjs/{tooltipArrow-nBURRjhe.js → tooltipArrow-CSLQDjwL.js} +3 -3
- package/dist/cjs/{tooltipArrow-nBURRjhe.js.map → tooltipArrow-CSLQDjwL.js.map} +1 -1
- package/dist/collection/index.js +4 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/next-hydrate.js +52 -0
- package/dist/collection/utils/next-hydrate.js.map +1 -0
- package/dist/collection/utils/next-react-wrapper.js +61 -0
- package/dist/collection/utils/next-react-wrapper.js.map +1 -0
- package/dist/components/index.js +115 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-BMMcpjI2.js → p-B0--8AFP.js} +3 -3
- package/dist/components/{p-BMMcpjI2.js.map → p-B0--8AFP.js.map} +1 -1
- package/dist/components/{p-7h5r3_Oi.js → p-B3-UiLOb.js} +3 -3
- package/dist/components/{p-7h5r3_Oi.js.map → p-B3-UiLOb.js.map} +1 -1
- package/dist/components/{p-BTvDxJlL.js → p-BVQq85Sb.js} +3 -3
- package/dist/components/{p-BTvDxJlL.js.map → p-BVQq85Sb.js.map} +1 -1
- package/dist/components/p-BjTJkvEh.js +21889 -0
- package/dist/components/p-BjTJkvEh.js.map +1 -0
- package/dist/components/{p-CCUdSU7s.js → p-BrGg4-IA.js} +4 -4
- package/dist/components/{p-CCUdSU7s.js.map → p-BrGg4-IA.js.map} +1 -1
- package/dist/components/{p-BTFW7ae2.js → p-CIRxuq9O.js} +3 -3
- package/dist/components/{p-BTFW7ae2.js.map → p-CIRxuq9O.js.map} +1 -1
- package/dist/components/{p-DDCjT-Wn.js → p-CmjvNSNS.js} +3 -3
- package/dist/components/{p-DDCjT-Wn.js.map → p-CmjvNSNS.js.map} +1 -1
- package/dist/components/{p-CMr_MjLT.js → p-CvQARSF2.js} +4 -4
- package/dist/components/{p-CMr_MjLT.js.map → p-CvQARSF2.js.map} +1 -1
- package/dist/components/{p-1fnLZFBF.js → p-CwAyLWEQ.js} +4 -4
- package/dist/components/{p-1fnLZFBF.js.map → p-CwAyLWEQ.js.map} +1 -1
- package/dist/components/{p-ZmqQTYnw.js → p-Cwa0Scin.js} +4 -4
- package/dist/components/{p-ZmqQTYnw.js.map → p-Cwa0Scin.js.map} +1 -1
- package/dist/components/{p-_COe-BX-.js → p-D_I5tXD6.js} +648 -13
- package/dist/components/p-D_I5tXD6.js.map +1 -0
- package/dist/components/{p-BFDQPvRY.js → p-Dg9QFKjM.js} +5 -5
- package/dist/components/{p-BFDQPvRY.js.map → p-Dg9QFKjM.js.map} +1 -1
- package/dist/components/{p-bMRGc2ya.js → p-DyncZo9Q.js} +7 -7
- package/dist/components/{p-bMRGc2ya.js.map → p-DyncZo9Q.js.map} +1 -1
- package/dist/components/p-dBol_ZO8.js +2584 -0
- package/dist/components/p-dBol_ZO8.js.map +1 -0
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker.js +5 -5
- package/dist/components/sd-date-range-picker.js +5 -5
- package/dist/components/sd-guide.js +4 -4
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +5 -5
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select.js +6 -6
- package/dist/components/sd-table.js +7 -7
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tooltip-portal.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/index.esm.js.map +1 -1
- package/dist/design-system/{p-1959dd61.entry.js → p-12aaaa03.entry.js} +2 -2
- package/dist/design-system/{p-4bc173bc.entry.js → p-1f393066.entry.js} +2 -2
- package/dist/design-system/{p-6f114a26.entry.js → p-2bb928fc.entry.js} +2 -2
- package/dist/design-system/{p-7353d0bb.entry.js → p-5db3252c.entry.js} +2 -2
- package/dist/design-system/{p-978b5165.entry.js → p-682cf57d.entry.js} +2 -2
- package/dist/design-system/{p-7d7eed25.entry.js → p-7e33f5e5.entry.js} +2 -2
- package/dist/design-system/{p-a8ff23ce.entry.js → p-8b2b47a7.entry.js} +2 -2
- package/dist/design-system/{p-48b56d5a.entry.js → p-912c7a8d.entry.js} +2 -2
- package/dist/design-system/{p-0f158e53.entry.js → p-97dbc008.entry.js} +2 -2
- package/dist/design-system/{p-21022434.entry.js → p-997af0ed.entry.js} +2 -2
- package/dist/design-system/p-BjTJkvEh.js +23 -0
- package/dist/design-system/p-BjTJkvEh.js.map +1 -0
- package/dist/design-system/p-DMW6VeLX.js +2 -0
- package/dist/design-system/{p-Di8dUbCh.js.map → p-DMW6VeLX.js.map} +1 -1
- package/dist/design-system/p-DVhJrGoi.js +3 -0
- package/dist/design-system/{p-KauK5hO3.js.map → p-DVhJrGoi.js.map} +1 -1
- package/dist/design-system/{p-5b9b8671.entry.js → p-c87c465b.entry.js} +2 -2
- package/dist/design-system/p-dBol_ZO8.js +3 -0
- package/dist/design-system/p-dBol_ZO8.js.map +1 -0
- package/dist/design-system/{p-6d7ade66.entry.js → p-e40ff66a.entry.js} +2 -2
- package/dist/esm/design-system.js +2 -2
- package/dist/esm/index-BjTJkvEh.js +21889 -0
- package/dist/esm/index-BjTJkvEh.js.map +1 -0
- package/dist/esm/{index-KauK5hO3.js → index-DVhJrGoi.js} +650 -12
- package/dist/esm/{index-KauK5hO3.js.map → index-DVhJrGoi.js.map} +1 -1
- package/dist/esm/index-dBol_ZO8.js +2584 -0
- package/dist/esm/index-dBol_ZO8.js.map +1 -0
- package/dist/esm/index.js +114 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sd-button_4.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-date-box_2.entry.js +1 -1
- package/dist/esm/sd-date-picker.entry.js +1 -1
- package/dist/esm/sd-date-range-picker.entry.js +1 -1
- package/dist/esm/sd-pagination_2.entry.js +2 -2
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-select-option.entry.js +1 -1
- package/dist/esm/sd-select.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +1 -1
- package/dist/esm/sd-tooltip-portal.entry.js +1 -1
- package/dist/esm/{tooltipArrow-BlfIbijp.js → tooltipArrow-BZiofDi8.js} +3 -3
- package/dist/esm/{tooltipArrow-BlfIbijp.js.map → tooltipArrow-BZiofDi8.js.map} +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/next-hydrate.d.ts +18 -0
- package/dist/types/utils/next-react-wrapper.d.ts +23 -0
- package/hydrate/index.d.ts +275 -0
- package/hydrate/index.js +22315 -0
- package/hydrate/index.mjs +22307 -0
- package/hydrate/package.json +12 -0
- package/package.json +10 -3
- package/dist/components/p-_COe-BX-.js.map +0 -1
- package/dist/design-system/p-Di8dUbCh.js +0 -2
- package/dist/design-system/p-KauK5hO3.js +0 -3
- /package/dist/design-system/{p-1959dd61.entry.js.map → p-12aaaa03.entry.js.map} +0 -0
- /package/dist/design-system/{p-4bc173bc.entry.js.map → p-1f393066.entry.js.map} +0 -0
- /package/dist/design-system/{p-6f114a26.entry.js.map → p-2bb928fc.entry.js.map} +0 -0
- /package/dist/design-system/{p-7353d0bb.entry.js.map → p-5db3252c.entry.js.map} +0 -0
- /package/dist/design-system/{p-978b5165.entry.js.map → p-682cf57d.entry.js.map} +0 -0
- /package/dist/design-system/{p-7d7eed25.entry.js.map → p-7e33f5e5.entry.js.map} +0 -0
- /package/dist/design-system/{p-a8ff23ce.entry.js.map → p-8b2b47a7.entry.js.map} +0 -0
- /package/dist/design-system/{p-48b56d5a.entry.js.map → p-912c7a8d.entry.js.map} +0 -0
- /package/dist/design-system/{p-0f158e53.entry.js.map → p-97dbc008.entry.js.map} +0 -0
- /package/dist/design-system/{p-21022434.entry.js.map → p-997af0ed.entry.js.map} +0 -0
- /package/dist/design-system/{p-5b9b8671.entry.js.map → p-c87c465b.entry.js.map} +0 -0
- /package/dist/design-system/{p-6d7ade66.entry.js.map → p-e40ff66a.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltipArrow-
|
|
1
|
+
{"version":3,"file":"tooltipArrow-BZiofDi8.js","sources":["src/components/assets/tooltipArrow.tsx"],"sourcesContent":["import { h } from '@stencil/core';\r\n\r\nexport const TooltipArrow = (props: SVGProps) => (\r\n <svg\r\n width=\"16\"\r\n height=\"12\"\r\n viewBox=\"0 0 16 12\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n {...props}\r\n >\r\n <path\r\n d=\"M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z\"\r\n fill=\"#07284A\"\r\n />\r\n </svg>\r\n);\r\n"],"names":[],"mappings":";;AAEa,MAAA,YAAY,GAAG,CAAC,KAAe,MAC3C,CACC,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,KAC9B,KAAK,EAAA,EAET,CACC,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,iHAAiH,EACnH,IAAI,EAAC,SAAS,EAAA,CACb,CACG;;;;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,3 +10,5 @@
|
|
|
10
10
|
export { format } from './utils/utils';
|
|
11
11
|
export type * from './components.d.ts';
|
|
12
12
|
export type { SdTableSortDir, SdTableColumn, Row } from './components/sd-table/sd-table';
|
|
13
|
+
export { defineCustomElements, waitForStencilHydration, initStencilForNextjs, CLIENT_ONLY_COMPONENTS, isClientOnlyComponent, } from './utils/next-react-wrapper';
|
|
14
|
+
export { renderStencilComponents, hydrateStencilComponents, STENCIL_CONFIG, } from './utils/next-hydrate';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next.js SSR을 위한 서버사이드 렌더링 함수
|
|
3
|
+
* @param html HTML 문자열
|
|
4
|
+
* @returns 렌더링된 HTML 문자열
|
|
5
|
+
*/
|
|
6
|
+
export declare function renderStencilComponents(html: string): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Next.js 클라이언트사이드 하이드레이션 함수
|
|
9
|
+
* @param document HTML 문서 객체
|
|
10
|
+
*/
|
|
11
|
+
export declare function hydrateStencilComponents(document: Document): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Next.js에서 Stencil 컴포넌트 사용을 위한 설정
|
|
14
|
+
*/
|
|
15
|
+
export declare const STENCIL_CONFIG: {
|
|
16
|
+
hydratedAttribute: string;
|
|
17
|
+
clientOnlyComponents: string[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next.js에서 Stencil 컴포넌트 사용을 위한 유틸리티 함수들
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 클라이언트 사이드에서만 Stencil 컴포넌트를 로드하는 함수
|
|
6
|
+
*/
|
|
7
|
+
export declare const defineCustomElements: () => Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Stencil 컴포넌트가 hydrate되었는지 확인하는 함수
|
|
10
|
+
*/
|
|
11
|
+
export declare const waitForStencilHydration: (element: HTMLElement, timeout?: number) => Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Next.js에서 Stencil 컴포넌트 초기화를 위한 설정
|
|
14
|
+
*/
|
|
15
|
+
export declare const initStencilForNextjs: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* SSR에서 제외할 컴포넌트 목록
|
|
18
|
+
*/
|
|
19
|
+
export declare const CLIENT_ONLY_COMPONENTS: string[];
|
|
20
|
+
/**
|
|
21
|
+
* 컴포넌트가 클라이언트 전용인지 확인
|
|
22
|
+
*/
|
|
23
|
+
export declare const isClientOnlyComponent: (tagName: string) => boolean;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { Readable } from 'node:stream';
|
|
4
|
+
|
|
5
|
+
export declare function createWindowFromHtml(templateHtml: string, uniqueId: string): any;
|
|
6
|
+
/**
|
|
7
|
+
* Serialize a value to a string that can be deserialized later.
|
|
8
|
+
* @param {unknown} value - The value to serialize.
|
|
9
|
+
* @returns {string} A string that can be deserialized later.
|
|
10
|
+
* @deprecated will be removed in v5. Use `@PropSerialize()` decorator instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare function serializeProperty(value: unknown): string | number | boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Deserialize a value from a string that was serialized earlier.
|
|
15
|
+
* @param {string} value - The string to deserialize.
|
|
16
|
+
* @returns {unknown} The deserialized value.
|
|
17
|
+
* @deprecated will be removed in v5. Use `@AttrDeserialize()` decorator instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare function deserializeProperty(value: string): any;
|
|
20
|
+
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
21
|
+
export interface HydrateDocumentOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
|
|
24
|
+
* a random ID will be generated
|
|
25
|
+
*/
|
|
26
|
+
buildId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the `href` attribute on the `<link rel="canonical">`
|
|
29
|
+
* tag within the `<head>`. If the value is not defined it will
|
|
30
|
+
* ensure a canonical link tag is no included in the `<head>`.
|
|
31
|
+
*/
|
|
32
|
+
canonicalUrl?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Include the HTML comments and attributes used by the client-side
|
|
35
|
+
* JavaScript to read the structure of the HTML and rebuild each
|
|
36
|
+
* component. Defaults to `true`.
|
|
37
|
+
*/
|
|
38
|
+
clientHydrateAnnotations?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Constrain `setTimeout()` to 1ms, but still async. Also
|
|
41
|
+
* only allows `setInterval()` to fire once, also constrained to 1ms.
|
|
42
|
+
* Defaults to `true`.
|
|
43
|
+
*/
|
|
44
|
+
constrainTimeouts?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Sets `document.cookie`
|
|
47
|
+
*/
|
|
48
|
+
cookie?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Sets the `dir` attribute on the top level `<html>`.
|
|
51
|
+
*/
|
|
52
|
+
direction?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Component tag names listed here will not be prerendered, nor will
|
|
55
|
+
* hydrated on the client-side. Components listed here will be ignored
|
|
56
|
+
* as custom elements and treated no differently than a `<div>`.
|
|
57
|
+
*/
|
|
58
|
+
excludeComponents?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Sets the `lang` attribute on the top level `<html>`.
|
|
61
|
+
*/
|
|
62
|
+
language?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Maximum number of components to hydrate on one page. Defaults to `300`.
|
|
65
|
+
*/
|
|
66
|
+
maxHydrateCount?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Sets `document.referrer`
|
|
69
|
+
*/
|
|
70
|
+
referrer?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Removes every `<script>` element found in the `document`. Defaults to `false`.
|
|
73
|
+
*/
|
|
74
|
+
removeScripts?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Removes CSS not used by elements within the `document`. Defaults to `true`.
|
|
77
|
+
*/
|
|
78
|
+
removeUnusedStyles?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The url the runtime uses for the resources, such as the assets directory.
|
|
81
|
+
*/
|
|
82
|
+
resourcesUrl?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Prints out runtime console logs to the NodeJS process. Defaults to `false`.
|
|
85
|
+
*/
|
|
86
|
+
runtimeLogging?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Component tags listed here will only be prerendered or server-side-rendered
|
|
89
|
+
* and will not be client-side hydrated. This is useful for components that
|
|
90
|
+
* are not dynamic and do not need to be defined as a custom element within the
|
|
91
|
+
* browser. For example, a header or footer component would be a good example that
|
|
92
|
+
* may not require any client-side JavaScript.
|
|
93
|
+
*/
|
|
94
|
+
staticComponents?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* The amount of milliseconds to wait for a page to finish rendering until
|
|
97
|
+
* a timeout error is thrown. Defaults to `15000`.
|
|
98
|
+
*/
|
|
99
|
+
timeout?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Sets `document.title`.
|
|
102
|
+
*/
|
|
103
|
+
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Sets `location.href`
|
|
106
|
+
*/
|
|
107
|
+
url?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Sets `navigator.userAgent`
|
|
110
|
+
*/
|
|
111
|
+
userAgent?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Configure how Stencil serializes the components shadow root.
|
|
114
|
+
* - If set to `declarative-shadow-dom` the component will be rendered within a Declarative Shadow DOM.
|
|
115
|
+
* - If set to `scoped` Stencil will render the contents of the shadow root as a `scoped: true` component
|
|
116
|
+
* and the shadow DOM will be created during client-side hydration.
|
|
117
|
+
* - Alternatively you can mix and match the two by providing an object with `declarative-shadow-dom` and `scoped` keys,
|
|
118
|
+
* the value arrays containing the tag names of the components that should be rendered in that mode.
|
|
119
|
+
*
|
|
120
|
+
* Examples:
|
|
121
|
+
* - `{ 'declarative-shadow-dom': ['my-component-1', 'another-component'], default: 'scoped' }`
|
|
122
|
+
* Render all components as `scoped` apart from `my-component-1` and `another-component`
|
|
123
|
+
* - `{ 'scoped': ['an-option-component'], default: 'declarative-shadow-dom' }`
|
|
124
|
+
* Render all components within `declarative-shadow-dom` apart from `an-option-component`
|
|
125
|
+
* - `'scoped'` Render all components as `scoped`
|
|
126
|
+
* - `false` disables shadow root serialization
|
|
127
|
+
*
|
|
128
|
+
* *NOTE* `true` has been deprecated in favor of `declarative-shadow-dom` and `scoped`
|
|
129
|
+
* @default 'declarative-shadow-dom'
|
|
130
|
+
*/
|
|
131
|
+
serializeShadowRoot?: "declarative-shadow-dom" | "scoped" | {
|
|
132
|
+
"declarative-shadow-dom"?: string[];
|
|
133
|
+
scoped?: string[];
|
|
134
|
+
default: "declarative-shadow-dom" | "scoped";
|
|
135
|
+
} | boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
138
|
+
/**
|
|
139
|
+
* Runs after the `document` has been hydrated.
|
|
140
|
+
*/
|
|
141
|
+
afterHydrate?(document: any): any | Promise<any>;
|
|
142
|
+
/**
|
|
143
|
+
* Sets an approximate line width the HTML should attempt to stay within.
|
|
144
|
+
* Note that this is "approximate", in that HTML may often not be able
|
|
145
|
+
* to be split at an exact line width. Additionally, new lines created
|
|
146
|
+
* is where HTML naturally already has whitespace, such as before an
|
|
147
|
+
* attribute or spaces between words. Defaults to `100`.
|
|
148
|
+
*/
|
|
149
|
+
approximateLineWidth?: number;
|
|
150
|
+
/**
|
|
151
|
+
* Runs before the `document` has been hydrated.
|
|
152
|
+
*/
|
|
153
|
+
beforeHydrate?(document: any): any | Promise<any>;
|
|
154
|
+
/**
|
|
155
|
+
* Format the HTML in a nicely indented format.
|
|
156
|
+
* Defaults to `false`.
|
|
157
|
+
*/
|
|
158
|
+
prettyHtml?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Remove quotes from attribute values when possible.
|
|
161
|
+
* Defaults to `true`.
|
|
162
|
+
*/
|
|
163
|
+
removeAttributeQuotes?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Remove the `=""` from standardized `boolean` attributes,
|
|
166
|
+
* such as `hidden` or `checked`. Defaults to `true`.
|
|
167
|
+
*/
|
|
168
|
+
removeBooleanAttributeQuotes?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Remove these standardized attributes when their value is empty:
|
|
171
|
+
* `class`, `dir`, `id`, `lang`, and `name`, `title`. Defaults to `true`.
|
|
172
|
+
*/
|
|
173
|
+
removeEmptyAttributes?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Remove HTML comments. Defaults to `true`.
|
|
176
|
+
*/
|
|
177
|
+
removeHtmlComments?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* The `fullDocument` flag determines the format of the rendered output. Set it to true to
|
|
180
|
+
* generate a complete HTML document, or false to render only the component.
|
|
181
|
+
* @default true
|
|
182
|
+
*/
|
|
183
|
+
fullDocument?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Style modes to render the component in.
|
|
186
|
+
* @see https://stenciljs.com/docs/styling#style-modes
|
|
187
|
+
*/
|
|
188
|
+
modes?: ResolutionHandler[];
|
|
189
|
+
}
|
|
190
|
+
export interface HydrateFactoryOptions extends SerializeDocumentOptions {
|
|
191
|
+
serializeToHtml: boolean;
|
|
192
|
+
destroyWindow: boolean;
|
|
193
|
+
destroyDocument: boolean;
|
|
194
|
+
}
|
|
195
|
+
export interface Diagnostic {
|
|
196
|
+
absFilePath?: string | undefined;
|
|
197
|
+
code?: string;
|
|
198
|
+
columnNumber?: number | undefined;
|
|
199
|
+
debugText?: string;
|
|
200
|
+
header?: string;
|
|
201
|
+
language?: string;
|
|
202
|
+
level: "error" | "warn" | "info" | "log" | "debug";
|
|
203
|
+
lineNumber?: number | undefined;
|
|
204
|
+
lines: PrintLine[];
|
|
205
|
+
messageText: string;
|
|
206
|
+
relFilePath?: string | undefined;
|
|
207
|
+
type: string;
|
|
208
|
+
}
|
|
209
|
+
export interface PrintLine {
|
|
210
|
+
lineIndex: number;
|
|
211
|
+
lineNumber: number;
|
|
212
|
+
text: string;
|
|
213
|
+
errorCharStart: number;
|
|
214
|
+
errorLength?: number;
|
|
215
|
+
}
|
|
216
|
+
export interface HydrateResults {
|
|
217
|
+
buildId: string;
|
|
218
|
+
diagnostics: Diagnostic[];
|
|
219
|
+
url: string;
|
|
220
|
+
host: string | null;
|
|
221
|
+
hostname: string | null;
|
|
222
|
+
href: string | null;
|
|
223
|
+
port: string | null;
|
|
224
|
+
pathname: string | null;
|
|
225
|
+
search: string | null;
|
|
226
|
+
hash: string | null;
|
|
227
|
+
html: string | null;
|
|
228
|
+
components: HydrateComponent[];
|
|
229
|
+
anchors: HydrateAnchorElement[];
|
|
230
|
+
imgs: HydrateImgElement[];
|
|
231
|
+
scripts: HydrateScriptElement[];
|
|
232
|
+
styles: HydrateStyleElement[];
|
|
233
|
+
staticData: HydrateStaticData[];
|
|
234
|
+
title: string | null;
|
|
235
|
+
hydratedCount: number;
|
|
236
|
+
httpStatus: number | null;
|
|
237
|
+
}
|
|
238
|
+
export interface HydrateComponent {
|
|
239
|
+
tag: string;
|
|
240
|
+
mode: string;
|
|
241
|
+
count: number;
|
|
242
|
+
depth: number;
|
|
243
|
+
}
|
|
244
|
+
export interface HydrateElement {
|
|
245
|
+
[attrName: string]: string | undefined;
|
|
246
|
+
}
|
|
247
|
+
export interface HydrateAnchorElement extends HydrateElement {
|
|
248
|
+
href?: string;
|
|
249
|
+
target?: string;
|
|
250
|
+
}
|
|
251
|
+
export interface HydrateImgElement extends HydrateElement {
|
|
252
|
+
src?: string;
|
|
253
|
+
}
|
|
254
|
+
export interface HydrateScriptElement extends HydrateElement {
|
|
255
|
+
src?: string;
|
|
256
|
+
type?: string;
|
|
257
|
+
}
|
|
258
|
+
export interface HydrateStyleElement extends HydrateElement {
|
|
259
|
+
id?: string;
|
|
260
|
+
href?: string;
|
|
261
|
+
content?: string;
|
|
262
|
+
}
|
|
263
|
+
export interface HydrateStaticData {
|
|
264
|
+
id: string;
|
|
265
|
+
type: string;
|
|
266
|
+
content: string;
|
|
267
|
+
}
|
|
268
|
+
export declare function streamToString(html: string | any, option?: SerializeDocumentOptions): Readable;
|
|
269
|
+
export declare function renderToString(html: string | any, options?: SerializeDocumentOptions): Promise<HydrateResults>;
|
|
270
|
+
export declare function renderToString(html: string | any, options: SerializeDocumentOptions | undefined, asStream: true): Readable;
|
|
271
|
+
export declare function hydrateDocument(doc: any | string, options?: HydrateDocumentOptions): Promise<HydrateResults>;
|
|
272
|
+
export declare function hydrateDocument(doc: any | string, options: HydrateDocumentOptions | undefined, asStream?: boolean): Readable;
|
|
273
|
+
export declare function serializeDocumentToString(doc: Document, opts: HydrateFactoryOptions): string;
|
|
274
|
+
|
|
275
|
+
export {};
|