@ppg_pl/pallete 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/cjs/index-160fcb6c.js +1661 -0
  2. package/dist/cjs/index-160fcb6c.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +4 -0
  4. package/dist/cjs/index.cjs.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +24 -0
  6. package/dist/cjs/loader.cjs.js.map +1 -0
  7. package/dist/cjs/my-backdrop_8.cjs.entry.js +7985 -0
  8. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -0
  9. package/dist/cjs/pallete.cjs.js +28 -0
  10. package/dist/cjs/pallete.cjs.js.map +1 -0
  11. package/dist/collection/collection-manifest.json +19 -0
  12. package/dist/collection/components/api/index.js +20 -0
  13. package/dist/collection/components/api/index.js.map +1 -0
  14. package/dist/collection/components/api/services.js +82 -0
  15. package/dist/collection/components/api/services.js.map +1 -0
  16. package/dist/collection/components/my-backdrop/my-backdrop.css +13 -0
  17. package/dist/collection/components/my-backdrop/my-backdrop.js +17 -0
  18. package/dist/collection/components/my-backdrop/my-backdrop.js.map +1 -0
  19. package/dist/collection/components/my-colorbox/my-colorbox.css +52 -0
  20. package/dist/collection/components/my-colorbox/my-colorbox.js +157 -0
  21. package/dist/collection/components/my-colorbox/my-colorbox.js.map +1 -0
  22. package/dist/collection/components/my-colorinfo/my-colorinfo.js +187 -0
  23. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -0
  24. package/dist/collection/components/my-component/my-component.css +6 -0
  25. package/dist/collection/components/my-component/my-component.js +133 -0
  26. package/dist/collection/components/my-component/my-component.js.map +1 -0
  27. package/dist/collection/components/my-loader/my-loader.css +85 -0
  28. package/dist/collection/components/my-loader/my-loader.js +19 -0
  29. package/dist/collection/components/my-loader/my-loader.js.map +1 -0
  30. package/dist/collection/components/my-modal/__mocks__/index.js +759 -0
  31. package/dist/collection/components/my-modal/__mocks__/index.js.map +1 -0
  32. package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
  33. package/dist/collection/components/my-modal/assets/close.png +0 -0
  34. package/dist/collection/components/my-modal/my-modal.css +367 -0
  35. package/dist/collection/components/my-modal/my-modal.js +448 -0
  36. package/dist/collection/components/my-modal/my-modal.js.map +1 -0
  37. package/dist/collection/components/my-search/assets/search.svg +15 -0
  38. package/dist/collection/components/my-search/my-search.css +35 -0
  39. package/dist/collection/components/my-search/my-search.js +125 -0
  40. package/dist/collection/components/my-search/my-search.js.map +1 -0
  41. package/dist/collection/components/my-slider/index.js +148 -0
  42. package/dist/collection/components/my-slider/index.js.map +1 -0
  43. package/dist/collection/components/my-slider/my-slider.css +88 -0
  44. package/dist/collection/gtmUtils.js +4 -0
  45. package/dist/collection/gtmUtils.js.map +1 -0
  46. package/dist/collection/index.js +2 -0
  47. package/dist/collection/index.js.map +1 -0
  48. package/dist/collection/types.js +2 -0
  49. package/dist/collection/types.js.map +1 -0
  50. package/{www/build/gtmUtils-dcdac4ce.js → dist/components/gtmUtils.js} +2 -0
  51. package/dist/components/gtmUtils.js.map +1 -0
  52. package/dist/components/index.d.ts +9 -11
  53. package/dist/components/index.js +3 -0
  54. package/dist/components/index.js.map +1 -0
  55. package/dist/components/index2.js +5305 -0
  56. package/dist/components/index2.js.map +1 -0
  57. package/dist/components/my-backdrop.js +8 -0
  58. package/dist/components/my-backdrop.js.map +1 -0
  59. package/dist/components/my-backdrop2.js +31 -0
  60. package/dist/components/my-backdrop2.js.map +1 -0
  61. package/dist/components/my-colorbox.js +8 -0
  62. package/dist/components/my-colorbox.js.map +1 -0
  63. package/dist/{pallete/my-colorbox.entry.js → components/my-colorbox2.js} +37 -8
  64. package/dist/components/my-colorbox2.js.map +1 -0
  65. package/dist/components/my-colorinfo.js +8 -0
  66. package/dist/components/my-colorinfo.js.map +1 -0
  67. package/dist/{pallete/my-colorinfo.entry.js → components/my-colorinfo2.js} +44 -10
  68. package/dist/components/my-colorinfo2.js.map +1 -0
  69. package/dist/{pallete/my-component.entry.js → components/my-component.js} +87 -11
  70. package/dist/components/my-component.js.map +1 -0
  71. package/dist/components/my-loader.js +8 -0
  72. package/dist/components/my-loader.js.map +1 -0
  73. package/{www/build/my-loader.entry.js → dist/components/my-loader2.js} +23 -7
  74. package/dist/components/my-loader2.js.map +1 -0
  75. package/dist/components/my-modal.js +8 -0
  76. package/dist/components/my-modal.js.map +1 -0
  77. package/dist/{pallete/my-modal.entry.js → components/my-modal2.js} +120 -120
  78. package/dist/components/my-modal2.js.map +1 -0
  79. package/dist/components/my-search.js +8 -0
  80. package/dist/components/my-search.js.map +1 -0
  81. package/{www/build/my-search.entry.js → dist/components/my-search2.js} +32 -9
  82. package/dist/components/my-search2.js.map +1 -0
  83. package/dist/components/my-slider.js +8 -0
  84. package/dist/components/my-slider.js.map +1 -0
  85. package/dist/esm/index-943c259f.js +1632 -0
  86. package/dist/esm/index-943c259f.js.map +1 -0
  87. package/dist/esm/index.js +3 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/loader.js +20 -0
  90. package/dist/esm/loader.js.map +1 -0
  91. package/dist/esm/my-backdrop_8.entry.js +7974 -0
  92. package/dist/esm/my-backdrop_8.entry.js.map +1 -0
  93. package/dist/esm/pallete.js +23 -0
  94. package/dist/esm/pallete.js.map +1 -0
  95. package/dist/esm/polyfills/core-js.js +11 -0
  96. package/dist/esm/polyfills/css-shim.js +1 -0
  97. package/dist/esm/polyfills/dom.js +79 -0
  98. package/dist/esm/polyfills/es5-html-element.js +1 -0
  99. package/dist/esm/polyfills/index.js +34 -0
  100. package/dist/esm/polyfills/system.js +6 -0
  101. package/dist/index.cjs.js +1 -0
  102. package/dist/index.js +1 -0
  103. package/dist/pallete/index.esm.js +1 -0
  104. package/dist/pallete/index.esm.js.map +1 -0
  105. package/dist/pallete/p-9a7eff4f.entry.js +2 -0
  106. package/dist/pallete/p-9a7eff4f.entry.js.map +1 -0
  107. package/dist/pallete/p-c77aaa54.js +3 -0
  108. package/dist/pallete/p-c77aaa54.js.map +1 -0
  109. package/dist/pallete/pallete.css +1 -3
  110. package/dist/pallete/pallete.esm.js +2 -129
  111. package/dist/pallete/pallete.esm.js.map +1 -0
  112. package/dist/types/components/api/services.d.ts +1 -1
  113. package/dist/types/components/my-component/my-component.d.ts +2 -0
  114. package/dist/types/components/my-modal/__mocks__/index.d.ts +415 -0
  115. package/dist/types/components/my-modal/my-modal.d.ts +3 -1
  116. package/dist/types/components.d.ts +2 -0
  117. package/dist/types/stencil-public-runtime.d.ts +91 -19
  118. package/dist/types/types.d.ts +8 -8
  119. package/loader/index.d.ts +9 -0
  120. package/loader/package.json +1 -0
  121. package/package.json +21 -5
  122. package/www/build/index.esm.js +1 -0
  123. package/www/build/index.esm.js.map +1 -0
  124. package/www/build/p-825a7d1d.js +163 -0
  125. package/www/build/p-9a7eff4f.entry.js +2 -0
  126. package/www/build/p-9a7eff4f.entry.js.map +1 -0
  127. package/www/build/p-c77aaa54.js +3 -0
  128. package/www/build/p-c77aaa54.js.map +1 -0
  129. package/www/build/p-fd390eef.css +3 -0
  130. package/www/build/pallete.css +1 -3
  131. package/www/build/pallete.esm.js +2 -129
  132. package/www/build/pallete.esm.js.map +1 -0
  133. package/www/index.html +2 -40
  134. package/dist/pallete/app-globals-0f993ce5.js +0 -3
  135. package/dist/pallete/css-shim-60f618b9.js +0 -4
  136. package/dist/pallete/dom-4eeb3fee.js +0 -73
  137. package/dist/pallete/gtmUtils-dcdac4ce.js +0 -5
  138. package/dist/pallete/index-1ac7471e.js +0 -3059
  139. package/dist/pallete/my-backdrop.entry.js +0 -15
  140. package/dist/pallete/my-loader.entry.js +0 -15
  141. package/dist/pallete/my-search.entry.js +0 -36
  142. package/dist/pallete/my-slider.entry.js +0 -11333
  143. package/dist/pallete/shadow-css-02866686.js +0 -387
  144. package/www/build/app-globals-0f993ce5.js +0 -3
  145. package/www/build/css-shim-60f618b9.js +0 -4
  146. package/www/build/dom-4eeb3fee.js +0 -73
  147. package/www/build/index-1ac7471e.js +0 -3059
  148. package/www/build/my-backdrop.entry.js +0 -15
  149. package/www/build/my-colorbox.entry.js +0 -40
  150. package/www/build/my-colorinfo.entry.js +0 -36
  151. package/www/build/my-component.entry.js +0 -154
  152. package/www/build/my-modal.entry.js +0 -2459
  153. package/www/build/my-slider.entry.js +0 -11333
  154. package/www/build/shadow-css-02866686.js +0 -387
@@ -133,7 +133,7 @@ export interface ListenOptions {
133
133
  */
134
134
  passive?: boolean;
135
135
  }
136
- export declare type ListenTargetOptions = 'body' | 'document' | 'window';
136
+ export type ListenTargetOptions = 'body' | 'document' | 'window';
137
137
  export interface StateDecorator {
138
138
  (): PropertyDecorator;
139
139
  }
@@ -214,14 +214,16 @@ export declare const State: StateDecorator;
214
214
  * https://stenciljs.com/docs/reactive-data#watch-decorator
215
215
  */
216
216
  export declare const Watch: WatchDecorator;
217
- export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
- export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
217
+ export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
+ export type ErrorHandler = (err: any, element?: HTMLElement) => void;
219
219
  /**
220
220
  * `setMode()` is used for libraries which provide multiple "modes" for styles.
221
221
  */
222
222
  export declare const setMode: (handler: ResolutionHandler) => void;
223
223
  /**
224
- * getMode
224
+ * `getMode()` is used for libraries which provide multiple "modes" for styles.
225
+ * @param ref a reference to the node to get styles for
226
+ * @returns the current mode or undefined, if not found
225
227
  */
226
228
  export declare function getMode<T = string | undefined>(ref: any): T;
227
229
  export declare function setPlatformHelpers(helpers: {
@@ -234,6 +236,9 @@ export declare function setPlatformHelpers(helpers: {
234
236
  /**
235
237
  * Get the base path to where the assets can be found. Use `setAssetPath(path)`
236
238
  * if the path needs to be customized.
239
+ * @param path the path to use in calculating the asset path. this value will be
240
+ * used in conjunction with the base asset path
241
+ * @returns the base path
237
242
  */
238
243
  export declare function getAssetPath(path: string): string;
239
244
  /**
@@ -246,22 +251,38 @@ export declare function getAssetPath(path: string): string;
246
251
  * `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
247
252
  * dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
248
253
  * But do note that this configuration depends on how your script is bundled, or lack of
249
- * bunding, and where your assets can be loaded from. Additionally custom bundling
254
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
250
255
  * will have to ensure the static assets are copied to its build directory.
256
+ * @param path the asset path to set
257
+ * @returns the set path
251
258
  */
252
259
  export declare function setAssetPath(path: string): string;
253
260
  /**
254
- * getElement
261
+ * Used to specify a nonce value that corresponds with an application's
262
+ * [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
263
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
264
+ * Alternatively, the nonce value can be set on a `meta` tag in the DOM head
265
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
266
+ * @param nonce The value to be used for the nonce attribute.
267
+ */
268
+ export declare function setNonce(nonce: string): void;
269
+ /**
270
+ * Retrieve a Stencil element for a given reference
271
+ * @param ref the ref to get the Stencil element for
272
+ * @returns a reference to the element
255
273
  */
256
274
  export declare function getElement(ref: any): HTMLStencilElement;
257
275
  /**
258
276
  * Schedules a new render of the given instance or element even if no state changed.
259
277
  *
260
- * Notice `forceUpdate()` is not syncronous and might perform the DOM render in the next frame.
278
+ * Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
279
+ *
280
+ * @param ref the node/element to force the re-render of
261
281
  */
262
282
  export declare function forceUpdate(ref: any): void;
263
283
  /**
264
284
  * getRenderingRef
285
+ * @returns the rendering ref
265
286
  */
266
287
  export declare function getRenderingRef(): any;
267
288
  export interface HTMLStencilElement extends HTMLElement {
@@ -272,6 +293,8 @@ export interface HTMLStencilElement extends HTMLElement {
272
293
  * in the best moment to perform DOM mutation without causing layout thrashing.
273
294
  *
274
295
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
296
+ *
297
+ * @param task the DOM-write to schedule
275
298
  */
276
299
  export declare function writeTask(task: RafCallback): void;
277
300
  /**
@@ -279,6 +302,8 @@ export declare function writeTask(task: RafCallback): void;
279
302
  * in the best moment to perform DOM reads without causing layout thrashing.
280
303
  *
281
304
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
305
+ *
306
+ * @param task the DOM-read to schedule
282
307
  */
283
308
  export declare function readTask(task: RafCallback): void;
284
309
  /**
@@ -417,13 +442,57 @@ interface HostAttributes {
417
442
  ref?: (el: HTMLElement | null) => void;
418
443
  [prop: string]: any;
419
444
  }
445
+ /**
446
+ * Utilities for working with functional Stencil components. An object
447
+ * conforming to this interface is passed by the Stencil runtime as the third
448
+ * argument to a functional component, allowing component authors to work with
449
+ * features like children.
450
+ *
451
+ * The children of a functional component will be passed as the second
452
+ * argument, so a functional component which uses these utils to transform its
453
+ * children might look like the following:
454
+ *
455
+ * ```ts
456
+ * export const AddClass: FunctionalComponent = (_, children, utils) => (
457
+ * utils.map(children, child => ({
458
+ * ...child,
459
+ * vattrs: {
460
+ * ...child.vattrs,
461
+ * class: `${child.vattrs.class} add-class`
462
+ * }
463
+ * }))
464
+ * );
465
+ * ```
466
+ *
467
+ * For more see the Stencil documentation, here:
468
+ * https://stenciljs.com/docs/functional-components
469
+ */
420
470
  export interface FunctionalUtilities {
471
+ /**
472
+ * Utility for reading the children of a functional component at runtime.
473
+ * Since the Stencil runtime uses a different interface for children it is
474
+ * not recommendeded to read the children directly, and is preferable to use
475
+ * this utility to, for instance, perform a side effect for each child.
476
+ */
421
477
  forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
478
+ /**
479
+ * Utility for transforming the children of a functional component. Given an
480
+ * array of children and a callback this will return a list of the results of
481
+ * passing each child to the supplied callback.
482
+ */
422
483
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
423
484
  }
424
485
  export interface FunctionalComponent<T = {}> {
425
486
  (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
426
487
  }
488
+ /**
489
+ * A Child VDOM node
490
+ *
491
+ * This has most of the same properties as {@link VNode} but friendlier names
492
+ * (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
493
+ * order to provide a friendlier public interface for users of the
494
+ * {@link FunctionalUtilities}).
495
+ */
427
496
  export interface ChildNode {
428
497
  vtag?: string | number | Function;
429
498
  vkey?: string | number;
@@ -470,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
470
539
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
471
540
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
472
541
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
542
+ /**
543
+ * A virtual DOM node
544
+ */
473
545
  export interface VNode {
474
546
  $flags$: number;
475
547
  $tag$: string | number | Function;
@@ -820,8 +892,8 @@ export declare namespace JSXBase {
820
892
  accept?: string;
821
893
  allowdirs?: boolean;
822
894
  alt?: string;
823
- autoCapitalize?: any;
824
- autocapitalize?: any;
895
+ autoCapitalize?: string;
896
+ autocapitalize?: string;
825
897
  autoComplete?: string;
826
898
  autocomplete?: string;
827
899
  autoFocus?: boolean;
@@ -1145,8 +1217,8 @@ export declare namespace JSXBase {
1145
1217
  resource?: string;
1146
1218
  typeof?: string;
1147
1219
  vocab?: string;
1148
- autoCapitalize?: any;
1149
- autocapitalize?: any;
1220
+ autoCapitalize?: string;
1221
+ autocapitalize?: string;
1150
1222
  autoCorrect?: string;
1151
1223
  autocorrect?: string;
1152
1224
  autoSave?: string;
@@ -1437,12 +1509,12 @@ export declare namespace JSXBase {
1437
1509
  onCutCapture?: (event: ClipboardEvent) => void;
1438
1510
  onPaste?: (event: ClipboardEvent) => void;
1439
1511
  onPasteCapture?: (event: ClipboardEvent) => void;
1440
- onCompositionEnd?: (event: CompositionEvent) => void;
1441
- onCompositionEndCapture?: (event: CompositionEvent) => void;
1442
- onCompositionStart?: (event: CompositionEvent) => void;
1443
- onCompositionStartCapture?: (event: CompositionEvent) => void;
1444
- onCompositionUpdate?: (event: CompositionEvent) => void;
1445
- onCompositionUpdateCapture?: (event: CompositionEvent) => void;
1512
+ onCompositionend?: (event: CompositionEvent) => void;
1513
+ onCompositionendCapture?: (event: CompositionEvent) => void;
1514
+ onCompositionstart?: (event: CompositionEvent) => void;
1515
+ onCompositionstartCapture?: (event: CompositionEvent) => void;
1516
+ onCompositionupdate?: (event: CompositionEvent) => void;
1517
+ onCompositionupdateCapture?: (event: CompositionEvent) => void;
1446
1518
  onFocus?: (event: FocusEvent) => void;
1447
1519
  onFocusCapture?: (event: FocusEvent) => void;
1448
1520
  onFocusin?: (event: FocusEvent) => void;
@@ -1453,8 +1525,8 @@ export declare namespace JSXBase {
1453
1525
  onBlurCapture?: (event: FocusEvent) => void;
1454
1526
  onChange?: (event: Event) => void;
1455
1527
  onChangeCapture?: (event: Event) => void;
1456
- onInput?: (event: Event) => void;
1457
- onInputCapture?: (event: Event) => void;
1528
+ onInput?: (event: InputEvent) => void;
1529
+ onInputCapture?: (event: InputEvent) => void;
1458
1530
  onReset?: (event: Event) => void;
1459
1531
  onResetCapture?: (event: Event) => void;
1460
1532
  onSubmit?: (event: Event) => void;
@@ -1,10 +1,10 @@
1
- export declare type Shop = {
1
+ export type Shop = {
2
2
  name: string;
3
3
  createdAt: string;
4
4
  publishedAt: string;
5
5
  updatedAt: string;
6
6
  };
7
- export declare type Color = {
7
+ export type Color = {
8
8
  hex: string;
9
9
  image: Record<string, Data<Image>>;
10
10
  links: Link[];
@@ -16,7 +16,7 @@ export declare type Color = {
16
16
  category?: Data<Partial<Color>>;
17
17
  number?: string;
18
18
  };
19
- export declare type Product = {
19
+ export type Product = {
20
20
  colors?: Color[];
21
21
  modalDescription: string;
22
22
  modalLogo: Record<string, Data<Image>>;
@@ -30,25 +30,25 @@ export declare type Product = {
30
30
  id?: string;
31
31
  categories?: any;
32
32
  };
33
- export declare type Image = {
33
+ export type Image = {
34
34
  name: string;
35
35
  url: string;
36
36
  formats: any;
37
37
  };
38
- export declare type Link = {
38
+ export type Link = {
39
39
  id: number;
40
40
  path: string;
41
41
  shop: Record<string, Data<Shop>>;
42
42
  };
43
- export declare type Data<Model> = {
43
+ export type Data<Model> = {
44
44
  attributes: Model;
45
45
  id: number;
46
46
  };
47
- export declare type PaginationData<Model> = {
47
+ export type PaginationData<Model> = {
48
48
  list: Model[];
49
49
  pagination: Pagination;
50
50
  };
51
- export declare type Pagination = {
51
+ export type Pagination = {
52
52
  page: number;
53
53
  pageCount: number;
54
54
  pageSize: number;
package/loader/index.d.ts CHANGED
@@ -10,3 +10,12 @@ export interface CustomElementsDefineOptions {
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
12
  export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "pallete-loader",
3
+ "private": true,
3
4
  "typings": "./index.d.ts",
4
5
  "module": "./index.js",
5
6
  "main": "./index.cjs.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppg_pl/pallete",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -23,11 +23,13 @@
23
23
  "build": "stencil build --docs",
24
24
  "start": "stencil build --dev --watch --serve",
25
25
  "test": "stencil test --spec --e2e",
26
- "test.watch": "stencil test --spec --e2e --watchAll",
27
- "generate": "stencil generate"
26
+ "test.watch": "stencil test --spec --watchAll",
27
+ "test:e2e": "stencil test --e2e ",
28
+ "generate": "stencil generate",
29
+ "postinstall": "husky install"
28
30
  },
29
31
  "dependencies": {
30
- "@stencil/core": "^2.13.0",
32
+ "@stencil/core": "3.1.0",
31
33
  "@stencil/helmet": "^0.3.3",
32
34
  "@stencil/sass": "^1.5.2",
33
35
  "@types/qs": "^6.9.7",
@@ -36,6 +38,7 @@
36
38
  },
37
39
  "devDependencies": {
38
40
  "@types/jest": "^27.0.3",
41
+ "husky": "^8.0.3",
39
42
  "jest": "^27.4.5",
40
43
  "jest-cli": "^27.4.5",
41
44
  "puppeteer": "^10.0.0"
@@ -45,5 +48,18 @@
45
48
  "url": "https://github.com/ionic-team/stencil-component-starter/issues"
46
49
  },
47
50
  "homepage": "https://github.com/ionic-team/stencil-component-starter#readme",
48
- "author": ""
51
+ "author": "",
52
+ "jest": {
53
+ "transform": {
54
+ "^.+\\.(ts|tsx)$": "<rootDir>/node_modules/@stencil/core/testing/jest.preprocessor.js"
55
+ },
56
+ "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
57
+ "moduleFileExtensions": [
58
+ "ts",
59
+ "tsx",
60
+ "js",
61
+ "json",
62
+ "jsx"
63
+ ]
64
+ }
49
65
  }
@@ -1 +1,2 @@
1
1
 
2
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":[],"mappings":""}
@@ -0,0 +1,163 @@
1
+ import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-9973ff37.js';
2
+ export { s as setNonce } from './index-9973ff37.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
4
+
5
+ /*
6
+ Stencil Client Patch Browser v3.1.0 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ /**
9
+ * Helper method for querying a `meta` tag that contains a nonce value
10
+ * out of a DOM's head.
11
+ *
12
+ * @param doc The DOM containing the `head` to query against
13
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
14
+ * exists or the tag has no content.
15
+ */
16
+ function queryNonceMetaTagContent(doc) {
17
+ var _a, _b, _c;
18
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
19
+ }
20
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
21
+ const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
22
+ const patchBrowser = () => {
23
+ // NOTE!! This fn cannot use async/await!
24
+ if (BUILD.isDev && !BUILD.isTesting) {
25
+ consoleDevInfo('Running in development mode.');
26
+ }
27
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
28
+ if (BUILD.cssVarShim) {
29
+ // shim css vars
30
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
31
+ plt.$cssShim$ = win.__cssshim;
32
+ }
33
+ if (BUILD.cloneNodeFix) {
34
+ // opted-in to polyfill cloneNode() for slot polyfilled components
35
+ patchCloneNodeFix(H.prototype);
36
+ }
37
+ if (BUILD.profile && !performance.mark) {
38
+ // not all browsers support performance.mark/measure (Safari 10)
39
+ // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
40
+ // simply stub the implementations out.
41
+ // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
42
+ // @ts-ignore
43
+ performance.mark = performance.measure = () => {
44
+ /*noop*/
45
+ };
46
+ performance.getEntriesByName = () => [];
47
+ }
48
+ // @ts-ignore
49
+ const scriptElm =
50
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
51
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
52
+ BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
53
+ ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
54
+ s.getAttribute('data-stencil-namespace') === NAMESPACE)
55
+ : null;
56
+ const importMeta = import.meta.url;
57
+ const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};
58
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
59
+ if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
60
+ // Safari < v11 support: This IF is true if it's Safari below v11.
61
+ // This fn cannot use async/await since Safari didn't support it until v11,
62
+ // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
63
+ // so both the ESM file and nomodule file would get downloaded. Only Safari
64
+ // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
65
+ // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
66
+ // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
67
+ return {
68
+ then() {
69
+ /* promise noop */
70
+ },
71
+ };
72
+ }
73
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
74
+ if (!BUILD.safari10 && importMeta !== '') {
75
+ opts.resourcesUrl = new URL('.', importMeta).href;
76
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
77
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
78
+ }
79
+ else if (BUILD.dynamicImportShim || BUILD.safari10) {
80
+ opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
81
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
82
+ if (BUILD.dynamicImportShim) {
83
+ patchDynamicImport(opts.resourcesUrl, scriptElm);
84
+ }
85
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
86
+ if (BUILD.dynamicImportShim && !win.customElements) {
87
+ // module support, but no custom elements support (Old Edge)
88
+ // @ts-ignore
89
+ return import(/* webpackChunkName: "polyfills-dom" */ './dom-423bdd70.js').then(() => opts);
90
+ }
91
+ }
92
+ return promiseResolve(opts);
93
+ };
94
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
95
+ const patchDynamicImport = (base, orgScriptElm) => {
96
+ const importFunctionName = getDynamicImportFunction(NAMESPACE);
97
+ try {
98
+ // test if this browser supports dynamic imports
99
+ // There is a caching issue in V8, that breaks using import() in Function
100
+ // By generating a random string, we can workaround it
101
+ // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
102
+ win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
103
+ }
104
+ catch (e) {
105
+ // this shim is specifically for browsers that do support "esm" imports
106
+ // however, they do NOT support "dynamic" imports
107
+ // basically this code is for old Edge, v18 and below
108
+ const moduleMap = new Map();
109
+ win[importFunctionName] = (src) => {
110
+ var _a;
111
+ const url = new URL(src, base).href;
112
+ let mod = moduleMap.get(url);
113
+ if (!mod) {
114
+ const script = doc.createElement('script');
115
+ script.type = 'module';
116
+ script.crossOrigin = orgScriptElm.crossOrigin;
117
+ script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
118
+ type: 'application/javascript',
119
+ }));
120
+ // Apply CSP nonce to the script tag if it exists
121
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
122
+ if (nonce != null) {
123
+ script.setAttribute('nonce', nonce);
124
+ }
125
+ mod = new Promise((resolve) => {
126
+ script.onload = () => {
127
+ resolve(win[importFunctionName].m);
128
+ script.remove();
129
+ };
130
+ });
131
+ moduleMap.set(url, mod);
132
+ doc.head.appendChild(script);
133
+ }
134
+ return mod;
135
+ };
136
+ }
137
+ };
138
+ const patchCloneNodeFix = (HTMLElementPrototype) => {
139
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
140
+ HTMLElementPrototype.cloneNode = function (deep) {
141
+ if (this.nodeName === 'TEMPLATE') {
142
+ return nativeCloneNodeFn.call(this, deep);
143
+ }
144
+ const clonedNode = nativeCloneNodeFn.call(this, false);
145
+ const srcChildNodes = this.childNodes;
146
+ if (deep) {
147
+ for (let i = 0; i < srcChildNodes.length; i++) {
148
+ // Node.ATTRIBUTE_NODE === 2, and checking because IE11
149
+ if (srcChildNodes[i].nodeType !== 2) {
150
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
151
+ }
152
+ }
153
+ }
154
+ return clonedNode;
155
+ };
156
+ };
157
+
158
+ patchBrowser().then(options => {
159
+ globalScripts();
160
+ return bootstrapLazy([["my-colorinfo",[[0,"my-colorinfo",{"currentColor":[16],"shop":[1],"product":[1],"data":[16],"isMobile":[4,"is-mobile"],"infoBoxWidth":[2,"info-box-width"],"closeImage":[1,"close-image"]}]]],["my-colorbox",[[0,"my-colorbox",{"color":[1],"name":[1],"shop":[1],"product":[1],"isActive":[4,"is-active"],"isCategoryActive":[4,"is-category-active"]}]]],["my-loader",[[2,"my-loader"]]],["my-search",[[2,"my-search",{"productId":[2,"product-id"],"isMobile":[4,"is-mobile"],"searchIcon":[1,"search-icon"],"searchText":[32]}]]],["my-modal",[[0,"my-modal",{"shop":[1],"product":[1],"closeImage":[1,"close-image"],"arrowDown":[1,"arrow-down"],"chunksNum":[32],"data":[32],"preloader":[32],"loading":[32],"colors":[32],"currentColor":[32],"currentIndex":[32],"infoBoxWidth":[32],"boxWidth":[32],"padding":[32],"isMobile":[32],"showRange":[32],"colorCategories":[32],"selectedCategory":[32],"page":[32],"open":[64]},[[0,"closeInfoBox","closeInfoBoxHandler"],[9,"resize","handleResize"],[0,"searchColors","searchColorsHandler"]]]]],["my-backdrop",[[0,"my-backdrop"]]],["my-slider",[[0,"my-slider",{"slides":[16],"shop":[1],"product":[1],"color":[1]}]]],["my-component",[[2,"my-component",{"shop":[1],"product":[1],"show":[32],"readyToClose":[32],"open":[64]},[[0,"readyToCLose","setReadyToCloseHandler"],[0,"close","closeModalHandler"]]]]]], options);
161
+ });
162
+
163
+ //# sourceMappingURL=pallete.esm.js.map