@dooboostore/simple-web-component 1.0.21 → 1.0.23
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/README.md +1113 -95
- package/dist/cjs/decorators/addEventListener.js +4 -0
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/applyNode.js +174 -0
- package/dist/cjs/decorators/applyNode.js.map +7 -0
- package/dist/cjs/decorators/attribute.js +30 -10
- package/dist/cjs/decorators/attribute.js.map +3 -3
- package/dist/cjs/decorators/{changedAttribute.js → changedAttributeHost.js} +6 -6
- package/dist/cjs/decorators/changedAttributeHost.js.map +7 -0
- package/dist/cjs/decorators/classList.js +45 -15
- package/dist/cjs/decorators/classList.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +107 -57
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js +4 -3
- package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
- package/dist/cjs/decorators/index.js +2 -4
- package/dist/cjs/decorators/index.js.map +2 -2
- package/dist/cjs/decorators/lifecycles.js +29 -0
- package/dist/cjs/decorators/lifecycles.js.map +2 -2
- package/dist/cjs/decorators/query.js +5 -1
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +5 -1
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/decorators/setAttribute.js +5 -1
- package/dist/cjs/decorators/setAttribute.js.map +2 -2
- package/dist/cjs/decorators/style.js +39 -13
- package/dist/cjs/decorators/style.js.map +2 -2
- package/dist/cjs/elements/SwcAppEngine.js.map +2 -2
- package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
- package/dist/cjs/elements/SwcAsync.js +2 -2
- package/dist/cjs/elements/SwcAsync.js.map +2 -2
- package/dist/cjs/elements/SwcChoose.js +2 -2
- package/dist/cjs/elements/SwcChoose.js.map +2 -2
- package/dist/cjs/elements/SwcIf.js +2 -2
- package/dist/cjs/elements/SwcIf.js.map +2 -2
- package/dist/cjs/elements/SwcLoop.js +2 -2
- package/dist/cjs/elements/SwcLoop.js.map +2 -2
- package/dist/cjs/elements/register.js +6 -5
- package/dist/cjs/elements/register.js.map +2 -2
- package/dist/cjs/index.js +6 -18
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/utils/TemplateUtils.js +6 -0
- package/dist/cjs/utils/TemplateUtils.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js +4 -0
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/applyNode.js +155 -0
- package/dist/esm/decorators/applyNode.js.map +7 -0
- package/dist/esm/decorators/attribute.js +30 -10
- package/dist/esm/decorators/attribute.js.map +3 -3
- package/dist/esm/decorators/{changedAttribute.js → changedAttributeHost.js} +3 -3
- package/dist/esm/decorators/changedAttributeHost.js.map +7 -0
- package/dist/esm/decorators/classList.js +45 -15
- package/dist/esm/decorators/classList.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +106 -56
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +4 -3
- package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
- package/dist/esm/decorators/index.js +2 -4
- package/dist/esm/decorators/index.js.map +2 -2
- package/dist/esm/decorators/lifecycles.js +29 -0
- package/dist/esm/decorators/lifecycles.js.map +2 -2
- package/dist/esm/decorators/query.js +5 -1
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +5 -1
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm/decorators/setAttribute.js +5 -1
- package/dist/esm/decorators/setAttribute.js.map +2 -2
- package/dist/esm/decorators/style.js +39 -13
- package/dist/esm/decorators/style.js.map +2 -2
- package/dist/esm/elements/SwcAppEngine.js.map +2 -2
- package/dist/esm/elements/SwcAppMixin.js.map +2 -2
- package/dist/esm/elements/SwcAsync.js +2 -2
- package/dist/esm/elements/SwcAsync.js.map +2 -2
- package/dist/esm/elements/SwcChoose.js +2 -2
- package/dist/esm/elements/SwcChoose.js.map +2 -2
- package/dist/esm/elements/SwcIf.js +2 -2
- package/dist/esm/elements/SwcIf.js.map +2 -2
- package/dist/esm/elements/SwcLoop.js +2 -2
- package/dist/esm/elements/SwcLoop.js.map +2 -2
- package/dist/esm/elements/register.js +6 -5
- package/dist/esm/elements/register.js.map +2 -2
- package/dist/esm/index.js +6 -18
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/types.js.map +2 -2
- package/dist/esm/utils/TemplateUtils.js +6 -0
- package/dist/esm/utils/TemplateUtils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +385 -206
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
- package/dist/types/decorators/addEventListener.d.ts +6 -0
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/applyNode.d.ts +121 -0
- package/dist/types/decorators/applyNode.d.ts.map +1 -0
- package/dist/types/decorators/attribute.d.ts +6 -0
- package/dist/types/decorators/attribute.d.ts.map +1 -1
- package/dist/types/decorators/{changedAttribute.d.ts → changedAttributeHost.d.ts} +6 -2
- package/dist/types/decorators/changedAttributeHost.d.ts.map +1 -0
- package/dist/types/decorators/classList.d.ts +32 -5
- package/dist/types/decorators/classList.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts +14 -2
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
- package/dist/types/decorators/index.d.ts +2 -4
- package/dist/types/decorators/index.d.ts.map +1 -1
- package/dist/types/decorators/lifecycles.d.ts +16 -0
- package/dist/types/decorators/lifecycles.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +6 -3
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +6 -0
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/decorators/setAttribute.d.ts +5 -0
- package/dist/types/decorators/setAttribute.d.ts.map +1 -1
- package/dist/types/decorators/style.d.ts +28 -3
- package/dist/types/decorators/style.d.ts.map +1 -1
- package/dist/types/elements/SwcAppEngine.d.ts.map +1 -1
- package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
- package/dist/types/elements/register.d.ts +1 -1
- package/dist/types/elements/register.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -15
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/TemplateUtils.d.ts +5 -0
- package/dist/types/utils/TemplateUtils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +385 -206
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
- package/package.json +3 -3
- package/src/decorators/addEventListener.ts +9 -0
- package/src/decorators/applyNode.ts +290 -0
- package/src/decorators/attribute.ts +46 -12
- package/src/decorators/{changedAttribute.ts → changedAttributeHost.ts} +5 -1
- package/src/decorators/classList.ts +71 -16
- package/src/decorators/elementDefine.ts +130 -63
- package/src/decorators/emitCustomEvent.ts +13 -5
- package/src/decorators/index.ts +2 -4
- package/src/decorators/lifecycles.ts +43 -1
- package/src/decorators/query.ts +9 -2
- package/src/decorators/queryAll.ts +9 -0
- package/src/decorators/setAttribute.ts +8 -0
- package/src/decorators/style.ts +64 -13
- package/src/elements/SwcAppEngine.ts +1 -0
- package/src/elements/SwcAppMixin.ts +2 -1
- package/src/elements/SwcAsync.ts +2 -2
- package/src/elements/SwcChoose.ts +2 -2
- package/src/elements/SwcIf.ts +2 -2
- package/src/elements/SwcLoop.ts +2 -2
- package/src/elements/register.ts +7 -5
- package/src/index.ts +8 -17
- package/src/types.ts +2 -1
- package/src/utils/TemplateUtils.ts +9 -0
- package/dist/cjs/decorators/appendChild.js +0 -92
- package/dist/cjs/decorators/appendChild.js.map +0 -7
- package/dist/cjs/decorators/changedAttribute.js.map +0 -7
- package/dist/cjs/decorators/onConnectedInnerHtml.js +0 -48
- package/dist/cjs/decorators/onConnectedInnerHtml.js.map +0 -7
- package/dist/cjs/decorators/replaceChildren.js +0 -79
- package/dist/cjs/decorators/replaceChildren.js.map +0 -7
- package/dist/esm/decorators/appendChild.js +0 -73
- package/dist/esm/decorators/appendChild.js.map +0 -7
- package/dist/esm/decorators/changedAttribute.js.map +0 -7
- package/dist/esm/decorators/onConnectedInnerHtml.js +0 -29
- package/dist/esm/decorators/onConnectedInnerHtml.js.map +0 -7
- package/dist/esm/decorators/replaceChildren.js +0 -60
- package/dist/esm/decorators/replaceChildren.js.map +0 -7
- package/dist/types/decorators/appendChild.d.ts +0 -17
- package/dist/types/decorators/appendChild.d.ts.map +0 -1
- package/dist/types/decorators/changedAttribute.d.ts.map +0 -1
- package/dist/types/decorators/onConnectedInnerHtml.d.ts +0 -15
- package/dist/types/decorators/onConnectedInnerHtml.d.ts.map +0 -1
- package/dist/types/decorators/replaceChildren.d.ts +0 -9
- package/dist/types/decorators/replaceChildren.d.ts.map +0 -1
- package/src/decorators/appendChild.ts +0 -86
- package/src/decorators/onConnectedInnerHtml.ts +0 -42
- package/src/decorators/replaceChildren.ts +0 -64
|
@@ -23,4 +23,10 @@ export declare function addEventListener(selector: string, type: string, options
|
|
|
23
23
|
delegate?: boolean;
|
|
24
24
|
}): MethodDecorator;
|
|
25
25
|
export declare const getAddEventListenerMetadata: (target: any) => AddEventListenerMetadata[] | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* @addEventListenerHost decorator - simplified version of @addEventListener for :host selector
|
|
28
|
+
* Usage: @addEventListenerHost('click')
|
|
29
|
+
* Usage: @addEventListenerHost('click', { stopPropagation: true })
|
|
30
|
+
*/
|
|
31
|
+
export declare function addEventListenerHost(type: string, options?: AddEventListenerBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
26
32
|
//# sourceMappingURL=addEventListener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addEventListener.d.ts","sourceRoot":"","sources":["../../../src/decorators/addEventListener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,2BAA2B,GAAG,eAAe,GAAG;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACjF;AAED,eAAO,MAAM,+BAA+B,eAAoD,CAAC;AAEjG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,CAAC;AAChI,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,eAAe,CAAC;AAkBpK,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,wBAAwB,EAAE,GAAG,SAGtF,CAAC"}
|
|
1
|
+
{"version":3,"file":"addEventListener.d.ts","sourceRoot":"","sources":["../../../src/decorators/addEventListener.ts"],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
|
|
1
|
+
import { SwcRootType } from '../types';
|
|
2
|
+
export type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove';
|
|
3
|
+
export interface ApplyNodeOptions {
|
|
4
|
+
position?: ApplyNodePosition;
|
|
5
|
+
root?: SwcRootType;
|
|
6
|
+
}
|
|
7
|
+
export interface ApplyNodeMetadata {
|
|
8
|
+
propertyKey: string | symbol;
|
|
9
|
+
selector: string;
|
|
10
|
+
options: ApplyNodeOptions;
|
|
11
|
+
}
|
|
12
|
+
export declare const APPLY_NODE_METADATA_KEY: unique symbol;
|
|
13
|
+
/**
|
|
14
|
+
* @applyNode decorator to surgically add/replace nodes to a target element.
|
|
15
|
+
*
|
|
16
|
+
* Usage examples:
|
|
17
|
+
* @applyNode('#list') addItem() { return '<li>New Item</li>'; } // append at end
|
|
18
|
+
* @applyNode('#header', { position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; } // prepend at start
|
|
19
|
+
* @applyNode('#item', { position: 'replace' }) replaceItem() { return '<div>Replaced</div>'; } // replace element
|
|
20
|
+
* @applyNode('#list', { position: 'replaceChildren' }) updateList() { return [item1, item2]; } // replace all children
|
|
21
|
+
* @applyNode('#notification', { position: 'remove' }) dismissNotification() { return shouldDismiss; } // remove if truthy
|
|
22
|
+
* @applyNode('.items', { position: 'remove', root: 'shadow' }) clearItems() { return true; } // remove shadow DOM elements
|
|
23
|
+
*
|
|
24
|
+
* Positions:
|
|
25
|
+
* - 'beforeEnd' (default): Append at end of target
|
|
26
|
+
* - 'afterBegin': Prepend at start of target
|
|
27
|
+
* - 'beforeBegin': Insert before target
|
|
28
|
+
* - 'afterEnd': Insert after target
|
|
29
|
+
* - 'replace': Replace the entire target element
|
|
30
|
+
* - 'replaceChildren': Replace all children of target element
|
|
31
|
+
* - 'innerHtml': Set target's innerHTML
|
|
32
|
+
* - 'innerText': Set target's innerText
|
|
33
|
+
* - 'remove': Remove target element if returned value is truthy
|
|
34
|
+
*
|
|
35
|
+
* Root Options:
|
|
36
|
+
* - 'auto' (default): Search shadow DOM first, then light DOM
|
|
37
|
+
* - 'shadow': Search only in shadow DOM
|
|
38
|
+
* - 'light': Search only in light DOM
|
|
39
|
+
* - 'all': Use both (shadow preferred for query, both for remove)
|
|
40
|
+
*/
|
|
41
|
+
export declare function applyNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
|
|
42
|
+
export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
|
|
43
|
+
/**
|
|
44
|
+
* @applyNodeHost decorator - simplified version of @applyNode for :host selector
|
|
45
|
+
* Usage: @applyNodeHost() addItem() { return '<li>New Item</li>'; }
|
|
46
|
+
* Usage: @applyNodeHost({ position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; }
|
|
47
|
+
*/
|
|
48
|
+
export declare function applyNodeHost(options?: ApplyNodeOptions): MethodDecorator;
|
|
49
|
+
/**
|
|
50
|
+
* @applyBeforeBeginNode - Insert before target element
|
|
51
|
+
*/
|
|
52
|
+
export declare const applyBeforeBeginNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
53
|
+
/**
|
|
54
|
+
* @applyAfterBeginNode - Prepend to target element
|
|
55
|
+
*/
|
|
56
|
+
export declare const applyAfterBeginNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
57
|
+
/**
|
|
58
|
+
* @applyBeforeEndNode - Append to target element (default)
|
|
59
|
+
*/
|
|
60
|
+
export declare const applyBeforeEndNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
61
|
+
/**
|
|
62
|
+
* @applyAfterEndNode - Insert after target element
|
|
63
|
+
*/
|
|
64
|
+
export declare const applyAfterEndNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
65
|
+
/**
|
|
66
|
+
* @applyReplaceNode - Replace entire target element
|
|
67
|
+
*/
|
|
68
|
+
export declare const applyReplaceNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
69
|
+
/**
|
|
70
|
+
* @applyReplaceChildrenNode - Replace all children of target element
|
|
71
|
+
*/
|
|
72
|
+
export declare const applyReplaceChildrenNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
73
|
+
/**
|
|
74
|
+
* @applyInnerHtmlNode - Set target's innerHTML
|
|
75
|
+
*/
|
|
76
|
+
export declare const applyInnerHtmlNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
77
|
+
/**
|
|
78
|
+
* @applyInnerTextNode - Set target's innerText
|
|
79
|
+
*/
|
|
80
|
+
export declare const applyInnerTextNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
81
|
+
/**
|
|
82
|
+
* @applyRemoveNode - Remove target element if truthy
|
|
83
|
+
*/
|
|
84
|
+
export declare const applyRemoveNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
|
|
85
|
+
/**
|
|
86
|
+
* @applyBeforeBeginNodeHost - Insert before :host
|
|
87
|
+
*/
|
|
88
|
+
export declare const applyBeforeBeginNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
89
|
+
/**
|
|
90
|
+
* @applyAfterBeginNodeHost - Prepend to :host
|
|
91
|
+
*/
|
|
92
|
+
export declare const applyAfterBeginNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
93
|
+
/**
|
|
94
|
+
* @applyBeforeEndNodeHost - Append to :host
|
|
95
|
+
*/
|
|
96
|
+
export declare const applyBeforeEndNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
97
|
+
/**
|
|
98
|
+
* @applyAfterEndNodeHost - Insert after :host
|
|
99
|
+
*/
|
|
100
|
+
export declare const applyAfterEndNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
101
|
+
/**
|
|
102
|
+
* @applyReplaceNodeHost - Replace :host
|
|
103
|
+
*/
|
|
104
|
+
export declare const applyReplaceNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
105
|
+
/**
|
|
106
|
+
* @applyReplaceChildrenNodeHost - Replace children of :host
|
|
107
|
+
*/
|
|
108
|
+
export declare const applyReplaceChildrenNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
109
|
+
/**
|
|
110
|
+
* @applyInnerHtmlNodeHost - Set :host innerHTML
|
|
111
|
+
*/
|
|
112
|
+
export declare const applyInnerHtmlNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
113
|
+
/**
|
|
114
|
+
* @applyInnerTextNodeHost - Set :host innerText
|
|
115
|
+
*/
|
|
116
|
+
export declare const applyInnerTextNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
117
|
+
/**
|
|
118
|
+
* @applyRemoveNodeHost - Remove :host if truthy
|
|
119
|
+
*/
|
|
120
|
+
export declare const applyRemoveNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
|
|
121
|
+
//# sourceMappingURL=applyNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/J,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,eAA4C,CAAC;AAUjF;;;;;;;;;;;;;;;;;;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I,UAAS,gBAAqB,oBACV,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAS,gBAAqB,oBACV,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAS,gBAAqB,oBACV,CAAC"}
|
|
@@ -20,4 +20,10 @@ export declare const resolveTargetEls: (inst: any, selector: string, options: At
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function attribute(selector: string, options?: AttributeOptions): PropertyDecorator;
|
|
22
22
|
export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
|
|
23
|
+
/**
|
|
24
|
+
* @hostAttribute decorator - simplified version of @attribute for :host selector
|
|
25
|
+
* Usage: @hostAttribute('data-product-id')
|
|
26
|
+
* Usage: @hostAttribute('disabled', { type: Boolean })
|
|
27
|
+
*/
|
|
28
|
+
export declare function attributeHost(attrName: string, options?: AttributeOptions): PropertyDecorator;
|
|
23
29
|
//# sourceMappingURL=attribute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CA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;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,iBAAiB,CA2F7F;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAEvE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,iBAAiB,CAEjG"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const ON_ATTRIBUTE_CHANGED_METADATA_KEY: unique symbol;
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @changedAttributeHost decorator - fires when any attribute on :host changes
|
|
4
|
+
* Usage: @changedAttributeHost('data-product-id')
|
|
5
|
+
*/
|
|
6
|
+
export declare function changedAttributeHost(attributeName?: string): MethodDecorator;
|
|
3
7
|
export declare const getChangedAttributeMetadata: (target: any) => Map<string, (string | symbol)[]> | undefined;
|
|
4
8
|
export declare const findAllAttributeChangedMetadata: (target: any) => Map<string, (string | symbol)[]>;
|
|
5
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=changedAttributeHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changedAttributeHost.d.ts","sourceRoot":"","sources":["../../../src/decorators/changedAttributeHost.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,eAAsD,CAAC;AAErG;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,CAiB5E;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,SAG5F,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAE5F,CAAC"}
|
|
@@ -1,34 +1,61 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
1
2
|
export declare const CLASS_LIST_METADATA_KEY: unique symbol;
|
|
2
3
|
export type ClassListAction = 'set' | 'update' | 'add' | 'remove' | 'toggle';
|
|
3
4
|
export interface ClassListMetadata {
|
|
4
5
|
propertyKey: string | symbol;
|
|
5
6
|
selector: string;
|
|
6
7
|
action: ClassListAction;
|
|
8
|
+
options: SwcQueryOptions;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* @setClassList decorator to surgically replace all classes on a target element.
|
|
10
12
|
* Returns: string | string[]
|
|
11
13
|
*/
|
|
12
|
-
export declare const setClassList: (selector: string) => MethodDecorator;
|
|
14
|
+
export declare const setClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
13
15
|
/**
|
|
14
16
|
* @updateClassList decorator to surgically update specific classes.
|
|
15
17
|
* Returns: Record<string, boolean> (toggle with force) | string | string[] (add)
|
|
16
18
|
*/
|
|
17
|
-
export declare const updateClassList: (selector: string) => MethodDecorator;
|
|
19
|
+
export declare const updateClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
18
20
|
/**
|
|
19
21
|
* @addClassList decorator to surgically add classes to a target element.
|
|
20
22
|
* Returns: string | string[]
|
|
21
23
|
*/
|
|
22
|
-
export declare const addClassList: (selector: string) => MethodDecorator;
|
|
24
|
+
export declare const addClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
23
25
|
/**
|
|
24
26
|
* @removeClassList decorator to surgically remove classes from a target element.
|
|
25
27
|
* Returns: string | string[]
|
|
26
28
|
*/
|
|
27
|
-
export declare const removeClassList: (selector: string) => MethodDecorator;
|
|
29
|
+
export declare const removeClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
28
30
|
/**
|
|
29
31
|
* @toggleClassList decorator to surgically toggle classes on a target element.
|
|
30
32
|
* Returns: string | string[]
|
|
31
33
|
*/
|
|
32
|
-
export declare const toggleClassList: (selector: string) => MethodDecorator;
|
|
34
|
+
export declare const toggleClassList: (selector: string, options?: SwcQueryOptions) => MethodDecorator;
|
|
35
|
+
/**
|
|
36
|
+
* @setClassListHost decorator to set classes on :host element.
|
|
37
|
+
* Returns: string | string[]
|
|
38
|
+
*/
|
|
39
|
+
export declare const setClassListHost: (options?: SwcQueryOptions) => MethodDecorator;
|
|
40
|
+
/**
|
|
41
|
+
* @updateClassListHost decorator to update specific classes on :host.
|
|
42
|
+
* Returns: Record<string, boolean> (toggle with force) | string | string[] (add)
|
|
43
|
+
*/
|
|
44
|
+
export declare const updateClassListHost: (options?: SwcQueryOptions) => MethodDecorator;
|
|
45
|
+
/**
|
|
46
|
+
* @addClassListHost decorator to add classes to :host element.
|
|
47
|
+
* Returns: string | string[]
|
|
48
|
+
*/
|
|
49
|
+
export declare const addClassListHost: (options?: SwcQueryOptions) => MethodDecorator;
|
|
50
|
+
/**
|
|
51
|
+
* @removeClassListHost decorator to remove classes from :host element.
|
|
52
|
+
* Returns: string | string[]
|
|
53
|
+
*/
|
|
54
|
+
export declare const removeClassListHost: (options?: SwcQueryOptions) => MethodDecorator;
|
|
55
|
+
/**
|
|
56
|
+
* @toggleClassListHost decorator to toggle classes on :host element.
|
|
57
|
+
* Returns: string | string[]
|
|
58
|
+
*/
|
|
59
|
+
export declare const toggleClassListHost: (options?: SwcQueryOptions) => MethodDecorator;
|
|
33
60
|
export declare const findAllClassListMetadata: (target: any) => Map<string | symbol, ClassListMetadata>;
|
|
34
61
|
//# sourceMappingURL=classList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classList.d.ts","sourceRoot":"","sources":["../../../src/decorators/classList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"classList.d.ts","sourceRoot":"","sources":["../../../src/decorators/classList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAA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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,eAAgD,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SAiBnC,CAAC;AA6JF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA8UpD,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SpecialSelector, SwcQueryOptions } from '../types';
|
|
2
2
|
export interface EmitCustomEventBaseOptions {
|
|
3
|
-
attributeName?: string;
|
|
4
3
|
bubbles?: boolean;
|
|
5
4
|
composed?: boolean;
|
|
6
5
|
cancelable?: boolean;
|
|
@@ -9,10 +8,23 @@ export interface EmitCustomEventMetadata {
|
|
|
9
8
|
propertyKey: string | symbol;
|
|
10
9
|
selector: string;
|
|
11
10
|
type: string;
|
|
12
|
-
options: EmitCustomEventBaseOptions & SwcQueryOptions
|
|
11
|
+
options: (EmitCustomEventBaseOptions & SwcQueryOptions) | (EmitCustomEventBaseOptions & SwcQueryOptions & {
|
|
12
|
+
attributeName?: string;
|
|
13
|
+
});
|
|
13
14
|
}
|
|
14
15
|
export declare const EMIT_CUSTOM_EVENT_METADATA_KEY: unique symbol;
|
|
15
16
|
export declare function emitCustomEvent(target: SpecialSelector, type: string, options?: EmitCustomEventBaseOptions): MethodDecorator;
|
|
16
17
|
export declare function emitCustomEvent(selector: string, type: string, options?: EmitCustomEventBaseOptions & SwcQueryOptions): MethodDecorator;
|
|
17
18
|
export declare const getEmitCustomEventMetadataList: (target: any) => EmitCustomEventMetadata[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* @emitCustomEventHost decorator - simplified version of @emitCustomEvent for :host selector
|
|
21
|
+
* Usage: @emitCustomEventHost('navigate')
|
|
22
|
+
* Usage: @emitCustomEventHost('navigate', { attributeName: 'on-navigate' })
|
|
23
|
+
*
|
|
24
|
+
* The attributeName option is used to automatically observe attributes for this event.
|
|
25
|
+
* For example, { attributeName: 'on-navigate' } will add 'on-navigate' to observedAttributes.
|
|
26
|
+
*/
|
|
27
|
+
export declare function emitCustomEventHost(type: string, options?: EmitCustomEventBaseOptions & SwcQueryOptions & {
|
|
28
|
+
attributeName?: string;
|
|
29
|
+
}): MethodDecorator;
|
|
18
30
|
//# sourceMappingURL=emitCustomEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,WAAW,0BAA0B;IACzC,
|
|
1
|
+
{"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,0BAA0B,GAAG,eAAe,CAAC,GAAG,CAAC,0BAA0B,GAAG,eAAe,GAAG;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvI;AAED,eAAO,MAAM,8BAA8B,eAAmD,CAAC;AAC/F,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,CAAC;AAC9H,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,GAAG,eAAe,CAAC;AA6EzI,eAAO,MAAM,8BAA8B,GAAI,QAAQ,GAAG,KAAG,uBAAuB,EAAE,GAAG,SAGxF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAEtJ"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
export * from './addEventListener';
|
|
2
2
|
export * from './attribute';
|
|
3
3
|
export * from './elementDefine';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './changedAttributeHost';
|
|
5
5
|
export * from './setAttribute';
|
|
6
6
|
export * from './emitCustomEvent';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './appendChild';
|
|
7
|
+
export * from './applyNode';
|
|
9
8
|
export * from './lifecycles';
|
|
10
9
|
export * from './query';
|
|
11
10
|
export * from './queryAll';
|
|
12
|
-
export * from './onConnectedInnerHtml';
|
|
13
11
|
export * from './classList';
|
|
14
12
|
export * from './style';
|
|
15
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const ON_CONSTRUCTOR_METADATA_KEY: unique symbol;
|
|
1
2
|
export declare const ON_BEFORE_CONNECTED_METADATA_KEY: unique symbol;
|
|
2
3
|
export declare const ON_AFTER_CONNECTED_METADATA_KEY: unique symbol;
|
|
3
4
|
export declare const ON_BEFORE_DISCONNECTED_METADATA_KEY: unique symbol;
|
|
@@ -5,7 +6,16 @@ export declare const ON_AFTER_DISCONNECTED_METADATA_KEY: unique symbol;
|
|
|
5
6
|
export declare const ON_BEFORE_ADOPTED_METADATA_KEY: unique symbol;
|
|
6
7
|
export declare const ON_AFTER_ADOPTED_METADATA_KEY: unique symbol;
|
|
7
8
|
export declare const ON_ADD_EVENT_LISTENER_METADATA_KEY: unique symbol;
|
|
9
|
+
export declare const INNER_HTML_METADATA_KEY: unique symbol;
|
|
8
10
|
export declare const ATTRIBUTE_CHANGED_WILDCARD = "*";
|
|
11
|
+
export interface InnerHtmlOptions {
|
|
12
|
+
useShadow?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface InnerHtmlMetadata {
|
|
15
|
+
propertyKey: string | symbol;
|
|
16
|
+
options: InnerHtmlOptions;
|
|
17
|
+
}
|
|
18
|
+
export declare const onConstructor: MethodDecorator;
|
|
9
19
|
export declare const onBeforeConnected: MethodDecorator;
|
|
10
20
|
export declare const onAfterConnected: MethodDecorator;
|
|
11
21
|
export declare const onConnected: MethodDecorator;
|
|
@@ -16,8 +26,14 @@ export declare const onBeforeAdopted: MethodDecorator;
|
|
|
16
26
|
export declare const onAfterAdopted: MethodDecorator;
|
|
17
27
|
export declare const onAdopted: MethodDecorator;
|
|
18
28
|
export declare const onAddEventListener: MethodDecorator;
|
|
29
|
+
/**
|
|
30
|
+
* @onConnectedInnerHtml decorator to define the initial HTML content when connected.
|
|
31
|
+
*/
|
|
32
|
+
export declare function onConnectedInnerHtml(options: InnerHtmlOptions): MethodDecorator;
|
|
33
|
+
export declare function onConnectedInnerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
|
|
19
34
|
/**
|
|
20
35
|
* 프로토타입 체인을 순회하며 모든 라이프사이클 메서드를 수집합니다.
|
|
21
36
|
*/
|
|
22
37
|
export declare const findAllLifecycleMetadata: <T = (string | symbol)[]>(target: any, metadataKey: symbol) => T | undefined;
|
|
38
|
+
export declare const getOnConnectedInnerHtmlMetadata: (target: any) => InnerHtmlMetadata[] | undefined;
|
|
23
39
|
//# sourceMappingURL=lifecycles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gCAAgC,eAAqD,CAAC;AACnG,eAAO,MAAM,+BAA+B,eAAoD,CAAC;AACjG,eAAO,MAAM,mCAAmC,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iB,CAAC;AAExC,eAAO,MAAM,kBAAkB,iBAA+D,CAAC;AAE/F;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACjF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAqBzH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,aAAa,MAAM,KAAG,CAAC,GAAG,SAGxG,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAAE,GAAG,SAGnF,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { SpecialSelector, SwcQueryOptions } from '../types';
|
|
2
|
-
export type QueryOptions = {
|
|
3
|
-
root?: 'light' | 'shadow' | 'all' | 'auto';
|
|
4
|
-
};
|
|
5
2
|
export interface QueryMetadata {
|
|
6
3
|
propertyKey: string | symbol;
|
|
7
4
|
selector: string;
|
|
@@ -11,4 +8,10 @@ export declare const QUERY_METADATA_KEY: unique symbol;
|
|
|
11
8
|
export declare function query(target: SpecialSelector): PropertyDecorator;
|
|
12
9
|
export declare function query(selector: string, options?: SwcQueryOptions): PropertyDecorator;
|
|
13
10
|
export declare const getQueryMetadata: (target: any) => QueryMetadata[] | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @hostQuery decorator - simplified version of @query for :host selector
|
|
13
|
+
* Usage: @hostQuery()
|
|
14
|
+
* Usage: @hostQuery({ root: 'shadow' })
|
|
15
|
+
*/
|
|
16
|
+
export declare function queryHost(options?: SwcQueryOptions): PropertyDecorator;
|
|
14
17
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,eAAuC,CAAC;AAEvE,wBAAgB,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAClE,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AA0FtF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,aAAa,EAAE,GAAG,SAGhE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAEtE"}
|
|
@@ -8,4 +8,10 @@ export declare const QUERY_ALL_METADATA_KEY: unique symbol;
|
|
|
8
8
|
export declare function queryAll(target: SpecialSelector): PropertyDecorator;
|
|
9
9
|
export declare function queryAll(selector: string, options?: SwcQueryOptions): PropertyDecorator;
|
|
10
10
|
export declare const getQueryAllMetadata: (target: any) => QueryAllMetadata[] | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @hostQueryAll decorator - simplified version of @queryAll for :host selector
|
|
13
|
+
* Usage: @hostQueryAll()
|
|
14
|
+
* Usage: @hostQueryAll({ root: 'shadow' })
|
|
15
|
+
*/
|
|
16
|
+
export declare function queryAllHost(options?: SwcQueryOptions): PropertyDecorator;
|
|
11
17
|
//# sourceMappingURL=queryAll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryAll.d.ts","sourceRoot":"","sources":["../../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,eAA2C,CAAC;AAE/E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AACrE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AA2FzF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,GAAG,KAAG,gBAAgB,EAAE,GAAG,SAGtE,CAAC"}
|
|
1
|
+
{"version":3,"file":"queryAll.d.ts","sourceRoot":"","sources":["../../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,eAA2C,CAAC;AAE/E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AACrE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AA2FzF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,GAAG,KAAG,gBAAgB,EAAE,GAAG,SAGtE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAEzE"}
|
|
@@ -15,4 +15,9 @@ export declare function setAttribute(selector: string, name: string): MethodDeco
|
|
|
15
15
|
export declare function setAttribute(selector: string, name: string, options?: SwcQueryOptions): MethodDecorator;
|
|
16
16
|
export declare const getSetAttributeMetadata: (target: any) => Map<string | symbol, SetAttributeMetadata> | undefined;
|
|
17
17
|
export declare const findAllSetAttributeMetadata: (target: any) => Map<string | symbol, SetAttributeMetadata>;
|
|
18
|
+
/**
|
|
19
|
+
* @setAttributeHost decorator - simplified version of @setAttribute for :host selector
|
|
20
|
+
* Usage: @setAttributeHost('aria-disabled')
|
|
21
|
+
*/
|
|
22
|
+
export declare function setAttributeHost(name: string, options?: SwcQueryOptions): MethodDecorator;
|
|
18
23
|
//# sourceMappingURL=setAttribute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/setAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,0BAA0B,eAA+C,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;AAC9E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;AAsEzG,eAAO,MAAM,uBAAuB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CAAC,GAAG,SAGlG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CASlG,CAAC"}
|
|
1
|
+
{"version":3,"file":"setAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/setAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,0BAA0B,eAA+C,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;AAC9E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAAC;AAsEzG,eAAO,MAAM,uBAAuB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CAAC,GAAG,SAGlG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,oBAAoB,CASlG,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,eAAe,CAEzF"}
|
|
@@ -1,24 +1,49 @@
|
|
|
1
|
+
import { SwcQueryOptions } from '../types';
|
|
1
2
|
export type StyleAction = 'set' | 'update' | 'remove';
|
|
3
|
+
export interface StyleOptions extends SwcQueryOptions {
|
|
4
|
+
}
|
|
2
5
|
export interface StyleMetadata {
|
|
3
6
|
propertyKey: string | symbol;
|
|
4
7
|
selector: string;
|
|
5
8
|
action: StyleAction;
|
|
9
|
+
options: StyleOptions;
|
|
6
10
|
}
|
|
7
11
|
export declare const STYLE_METADATA_KEY: unique symbol;
|
|
8
12
|
/**
|
|
9
13
|
* @setStyle decorator to surgically set styles on a target element (replaces all existing styles).
|
|
10
14
|
* Usage: @setStyle('#box') getStyles() { return { color: 'red', display: 'block' }; }
|
|
15
|
+
* Usage: @setStyle('#box', { root: 'shadow' }) getStyles() { return { color: 'red' }; }
|
|
16
|
+
*/
|
|
17
|
+
export declare const setStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
18
|
+
/**
|
|
19
|
+
* @setStyleHost decorator - simplified version of @setStyle for :host selector.
|
|
20
|
+
* Usage: @setStyleHost getStyles() { return { color: 'red', display: 'block' }; }
|
|
21
|
+
* Usage: @setStyleHost({ root: 'shadow' }) getStyles() { return { color: 'red' }; }
|
|
11
22
|
*/
|
|
12
|
-
export declare const
|
|
23
|
+
export declare const setStyleHost: (options?: StyleOptions) => MethodDecorator;
|
|
13
24
|
/**
|
|
14
25
|
* @updateStyle decorator to surgically update styles on a target element (merges with existing styles).
|
|
15
26
|
* Usage: @updateStyle('#box') updateStyles() { return { color: 'blue' }; }
|
|
27
|
+
* Usage: @updateStyle('#box', { root: 'shadow' }) updateStyles() { return { color: 'blue' }; }
|
|
16
28
|
*/
|
|
17
|
-
export declare const updateStyle: (selector: string) => MethodDecorator;
|
|
29
|
+
export declare const updateStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
30
|
+
/**
|
|
31
|
+
* @updateStyleHost decorator - simplified version of @updateStyle for :host selector.
|
|
32
|
+
* Usage: @updateStyleHost updateStyles() { return { color: 'blue' }; }
|
|
33
|
+
* Usage: @updateStyleHost({ root: 'shadow' }) updateStyles() { return { color: 'blue' }; }
|
|
34
|
+
*/
|
|
35
|
+
export declare const updateStyleHost: (options?: StyleOptions) => MethodDecorator;
|
|
18
36
|
/**
|
|
19
37
|
* @removeStyle decorator to surgically remove styles from a target element.
|
|
20
38
|
* Usage: @removeStyle('#box') clearStyles() { return ['color', 'display']; }
|
|
39
|
+
* Usage: @removeStyle('#box', { root: 'shadow' }) clearStyles() { return ['color']; }
|
|
40
|
+
*/
|
|
41
|
+
export declare const removeStyle: (selector: string, options?: StyleOptions) => MethodDecorator;
|
|
42
|
+
/**
|
|
43
|
+
* @removeStyleHost decorator - simplified version of @removeStyle for :host selector.
|
|
44
|
+
* Usage: @removeStyleHost clearStyles() { return ['color', 'display']; }
|
|
45
|
+
* Usage: @removeStyleHost({ root: 'shadow' }) clearStyles() { return ['color']; }
|
|
21
46
|
*/
|
|
22
|
-
export declare const
|
|
47
|
+
export declare const removeStyleHost: (options?: StyleOptions) => MethodDecorator;
|
|
23
48
|
export declare const findAllStyleMetadata: (target: any) => Map<string | symbol, StyleMetadata>;
|
|
24
49
|
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/decorators/style.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/decorators/style.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,YAAa,SAAQ,eAAe;CACpD;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,eAAuC,CAAC;AAuEvE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,UAAS,YAAiB,oBAAmD,CAAC;AAEzH;;;;GAIG;AACH,eAAO,MAAM,YAAY,G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AM,CAAC;IACvB,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,cAAc,CAAS;gBAEX,IAAI,EAAE,WAAW;IAE/B,OAAO,CAAC,MAAM,CAAC,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"SwcAppEngine.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAK/E,OAAO,EAAE,MAAM,EAAmB,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIlE,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,aAAa,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC;AAEzF,qBAAa,YAAY;IAMX,OAAO,CAAC,IAAI;IALjB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,cAAc,CAAS;gBAEX,IAAI,EAAE,WAAW;IAE/B,OAAO,CAAC,MAAM,CAAC,EAAE,sBAAsB;IAyE7C,UAAU;CAGX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwcAppMixin.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppMixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SwcAppMixin.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppMixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGtE,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,WAAW,CAAA;CAAE,EAAE,IAAI,EAAE,CAAC;kBAA9B,GAAG,EAAE;;;;yBAWhC,sBAAsB;;;sBA+CzB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAI7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const registerAllElements: (w: any) =>
|
|
1
|
+
export declare const registerAllElements: (w: any) => any[];
|
|
2
2
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/elements/register.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,GAAI,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/elements/register.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,GAAI,GAAG,GAAG,UA0tBzC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
|
|
3
|
-
export * from './decorators
|
|
4
|
-
export * from './decorators/setAttribute';
|
|
5
|
-
export * from './decorators/changedAttribute';
|
|
6
|
-
export { onConnectedInnerHtml } from './decorators/onConnectedInnerHtml';
|
|
7
|
-
export * from './decorators/replaceChildren';
|
|
8
|
-
export * from './decorators/appendChild';
|
|
9
|
-
export * from './decorators/classList';
|
|
10
|
-
export * from './decorators/style';
|
|
11
|
-
export * from './decorators/emitCustomEvent';
|
|
12
|
-
export * from './decorators/lifecycles';
|
|
13
|
-
export * from './decorators/query';
|
|
14
|
-
export * from './decorators/queryAll';
|
|
15
|
-
export * from './decorators/addEventListener';
|
|
2
|
+
import { ConstructorType } from "@dooboostore/core";
|
|
3
|
+
export * from './decorators';
|
|
16
4
|
export * from './types';
|
|
17
5
|
export * from './utils/Utils';
|
|
18
6
|
export * from './utils/TemplateUtils';
|
|
19
7
|
export * from './config/config';
|
|
20
|
-
declare const _default: (w: Window, other?: ((w: Window) =>
|
|
8
|
+
declare const _default: (w: Window, other?: ((w: Window) => ConstructorType<any>)[]) => ConstructorType<any>[];
|
|
21
9
|
export default _default;
|
|
22
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,cAAc,cAAc,CAAC;AAG7B,cAAc,SAAS,CAAC;AAGxB,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AAGtC,cAAc,iBAAiB,CAAC;yBAGhB,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,KAAG,eAAe,CAAC,GAAG,CAAC,EAAE;AAAnG,wBAQE"}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';
|
|
2
2
|
import { Router } from '@dooboostore/core-web';
|
|
3
|
+
import { SwcAttributeConfigType } from "./elements/SwcAppEngine";
|
|
3
4
|
export declare enum InjectSituationType {
|
|
4
5
|
HOST_SET = "SIMPLE_WEB_COMPONENT://HOSTSET",
|
|
5
6
|
APP_HOST = "SIMPLE_WEB_COMPONENT://APPHOST",
|
|
@@ -39,7 +40,7 @@ export type HelperHostSet = HelperSet & HostSet;
|
|
|
39
40
|
export interface SwcAppInterface extends HTMLElement {
|
|
40
41
|
simpleApplication?: SimpleApplication;
|
|
41
42
|
router?: Router;
|
|
42
|
-
connect(config?:
|
|
43
|
+
connect(config?: SwcAttributeConfigType): Promise<void>;
|
|
43
44
|
routing(path: string): Promise<void>;
|
|
44
45
|
}
|
|
45
46
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAE/D,oBAAY,mBAAmB;IAC7B,QAAQ,mCAAmC;IAC3C,QAAQ,mC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,CAAC;IACjC,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,aAAa,EAAE,eAAe,GAAG,IAAI,CAAC;IACtC,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC"}
|
|
@@ -11,6 +11,10 @@ export declare namespace TemplateUtils {
|
|
|
11
11
|
* Tagged template function to create a Text node from string.
|
|
12
12
|
*/
|
|
13
13
|
const textNode: (strings: TemplateStringsArray, ...values: any[]) => Text;
|
|
14
|
+
/**
|
|
15
|
+
* Tagged template function to create a Comment node from string.
|
|
16
|
+
*/
|
|
17
|
+
const commentNode: (strings: TemplateStringsArray, ...values: any[]) => Comment;
|
|
14
18
|
/**
|
|
15
19
|
* Generic element creator using a configuration object and attribute map.
|
|
16
20
|
*/
|
|
@@ -34,6 +38,7 @@ export declare namespace TemplateUtils {
|
|
|
34
38
|
}
|
|
35
39
|
export declare const htmlFragment: (strings: TemplateStringsArray, ...values: any[]) => DocumentFragment;
|
|
36
40
|
export declare const textNode: (strings: TemplateStringsArray, ...values: any[]) => Text;
|
|
41
|
+
export declare const commentNode: (strings: TemplateStringsArray, ...values: any[]) => Comment;
|
|
37
42
|
export declare const createElement: <T extends HTMLElement>(info: CreateElementInfo, attrs?: Record<string, any>) => T;
|
|
38
43
|
export declare const htmlDivElement: (strings: TemplateStringsArray, ...values: any[]) => HTMLDivElement;
|
|
39
44
|
export declare const htmlSpanElement: (strings: TemplateStringsArray, ...values: any[]) => HTMLSpanElement;
|