@italia/sticky 1.0.0-alpha.9 → 1.0.0-beta.1

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 CHANGED
@@ -1,75 +1,11 @@
1
- # \<it-sticky>
1
+ # <it-sticky>
2
2
 
3
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
3
+ This package is part of [dev-kit-italia](https://italia.github.io/dev-kit-italia), a Web Components kit for the **.italia** design-system.
4
4
 
5
- ## Installation
5
+ ## Installation and usage
6
6
 
7
- ```bash
8
- npm i @italia/sticky
9
- ```
7
+ Most users want to install the full kit by installing [`@italia/dev-kit-italia`](https://npmjs.com/package/@italia/dev-kit-italia), but you have the option of installing this single Web Component separately if needed. Please find detailed installation and usage instructions in the [official documentation](https://italia.github.io/dev-kit-italia/?path=/docs/introduzione--documentazione).
10
8
 
11
- ## Usage
9
+ ## Documentation
12
10
 
13
- ```html
14
- <script type="module">
15
- import '@italia/it-sticky';
16
- </script>
17
-
18
- <it-sticky></it-sticky>
19
- ```
20
-
21
- ## Linting and formatting
22
-
23
- To scan the project for linting and formatting errors, run
24
-
25
- ```bash
26
- npm run lint
27
- ```
28
-
29
- To automatically fix linting and formatting errors, run
30
-
31
- ```bash
32
- npm run format
33
- ```
34
-
35
- ## Testing with Web Test Runner
36
-
37
- To execute a single test run:
38
-
39
- ```bash
40
- npm run test
41
- ```
42
-
43
- To run the tests in interactive watch mode run:
44
-
45
- ```bash
46
- npm run test:watch
47
- ```
48
-
49
- ## Demoing with Storybook
50
-
51
- To run a local instance of Storybook for your component, run
52
-
53
- ```bash
54
- npm run storybook
55
- ```
56
-
57
- To build a production version of Storybook, run
58
-
59
- ```bash
60
- npm run storybook:build
61
- ```
62
-
63
- ## Tooling configs
64
-
65
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
66
-
67
- If you customize the configuration a lot, you can consider moving them to individual files.
68
-
69
- ## Local Demo with `web-dev-server`
70
-
71
- ```bash
72
- npm start
73
- ```
74
-
75
- To run a local development server that serves the basic demo located in `demo/index.html`
11
+ Find the usage instructions for this specific component in its [dedicated documentation page](https://italia.github.io/dev-kit-italia/?path=/docs/componenti-sticky--documentazione).
@@ -97,6 +97,27 @@
97
97
  "attribute": "stackable",
98
98
  "reflects": true
99
99
  },
100
+ {
101
+ "kind": "field",
102
+ "name": "triggerOffset",
103
+ "type": {
104
+ "text": "StickyOptions['triggerOffset'] | undefined"
105
+ },
106
+ "default": "0",
107
+ "description": "Extra pixels to scroll past the element's natural position before sticky activates.\nUseful when you want sticky to kick in only after a preceding element (e.g. a header) has scrolled away.",
108
+ "attribute": "trigger-offset",
109
+ "reflects": true
110
+ },
111
+ {
112
+ "kind": "field",
113
+ "name": "triggerSelector",
114
+ "type": {
115
+ "text": "StickyOptions['triggerSelector'] | undefined"
116
+ },
117
+ "description": "CSS selector of an element whose height is used as the trigger offset.\nWhen provided, takes precedence over `trigger-offset`.",
118
+ "attribute": "trigger-selector",
119
+ "reflects": true
120
+ },
100
121
  {
101
122
  "kind": "field",
102
123
  "name": "position",
@@ -150,6 +171,23 @@
150
171
  "default": "false",
151
172
  "fieldName": "stackable"
152
173
  },
174
+ {
175
+ "name": "trigger-offset",
176
+ "type": {
177
+ "text": "StickyOptions['triggerOffset'] | undefined"
178
+ },
179
+ "default": "0",
180
+ "description": "Extra pixels to scroll past the element's natural position before sticky activates.\nUseful when you want sticky to kick in only after a preceding element (e.g. a header) has scrolled away.",
181
+ "fieldName": "triggerOffset"
182
+ },
183
+ {
184
+ "name": "trigger-selector",
185
+ "type": {
186
+ "text": "StickyOptions['triggerSelector'] | undefined"
187
+ },
188
+ "description": "CSS selector of an element whose height is used as the trigger offset.\nWhen provided, takes precedence over `trigger-offset`.",
189
+ "fieldName": "triggerSelector"
190
+ },
153
191
  {
154
192
  "name": "position",
155
193
  "type": {
@@ -205,6 +243,12 @@
205
243
  "privacy": "public",
206
244
  "default": "0"
207
245
  },
246
+ {
247
+ "kind": "field",
248
+ "name": "windowUpdateHandler",
249
+ "privacy": "private",
250
+ "readonly": true
251
+ },
208
252
  {
209
253
  "kind": "method",
210
254
  "name": "setVisualOrder",
@@ -263,6 +307,15 @@
263
307
  "privacy": "private",
264
308
  "default": "0"
265
309
  },
310
+ {
311
+ "kind": "field",
312
+ "name": "reservedHeight",
313
+ "type": {
314
+ "text": "number"
315
+ },
316
+ "privacy": "private",
317
+ "default": "0"
318
+ },
266
319
  {
267
320
  "kind": "field",
268
321
  "name": "hostElement",
@@ -324,6 +377,11 @@
324
377
  "name": "computeLimit",
325
378
  "privacy": "protected"
326
379
  },
380
+ {
381
+ "kind": "method",
382
+ "name": "measureHeight",
383
+ "privacy": "protected"
384
+ },
327
385
  {
328
386
  "kind": "method",
329
387
  "name": "isBeforeInDOM",
@@ -388,6 +446,16 @@
388
446
  },
389
447
  "description": "Computes the top offset for top-edge stackable stickies.\n\nVisual order: active fixed-top first (activation order), then\nnon-fixed in DOM order. Returns the cumulative height of all elements\nwith a lower visual order than this one."
390
448
  },
449
+ {
450
+ "kind": "method",
451
+ "name": "getExtraTriggerOffset",
452
+ "privacy": "protected",
453
+ "return": {
454
+ "type": {
455
+ "text": "number"
456
+ }
457
+ }
458
+ },
391
459
  {
392
460
  "kind": "method",
393
461
  "name": "getFixedContainingBlockFor",
@@ -631,7 +699,7 @@
631
699
  "type": {
632
700
  "text": "Meta"
633
701
  },
634
- "default": "{ title: 'Componenti/Sticky', component: 'it-sticky', tags: ['autodocs', 'a11y-ok', 'web-component'], args: { stackable: false, paddingTop: 0, stickyClassName: undefined, positionType: undefined, position: undefined, }, parameters: { docs: { description: { component: `<Description>Rende un elemento della pagina costantemente visibile allo scorrere della pagina.</Description> Talvolta è necessario che uno o più elementi della pagina restino sempre visibili anche quando essa viene fatta scorrere. Questo comportamento viene comunemente definito “sticky”. <br> Il componente <code>&lt;it-sticky&gt;</code> consente di mantenere visibile un elemento della pagina durante lo scroll, applicando automaticamente il comportamento “sticky”. <br> Per utilizzarlo, basta racchiudere il contenuto da fissare all’interno del tag <code>&lt;it-sticky&gt;</code>. Il componente gestisce in autonomia anche casi avanzati, come elementi impilabili o con padding e classi personalizzate, attraverso specifiche proprietà. <br> È disponibile una <a href=\"iframe.html?globals=&id=esempi-sticky--single-sticky&viewMode=story\" target=\"_blank\" rel=\"noopener\"> pagina di esempio </a> dedicata a questa funzionalità per comprenderne appieno significato ed utilizzo. `, }, }, }, argTypes: { stackable: { control: 'boolean', description: \"Attiva/disattiva la possibilità di rendere l'elemento impilabile su altri elementi sticky presenti in pagina\", table: { defaultValue: { summary: false } }, }, paddingTop: { control: 'number', description: \"Indica la distanza dall'elemento in sticky dal margine superiore\", table: { defaultValue: { summary: 0 } }, }, stickyClassName: { control: 'text', description: \"Classi CSS da applicare all'elemento quando viene attivata la funzionalità sticky\", table: { defaultValue: { summary: '' } }, }, positionType: { control: { type: 'select' }, options: ['sticky', 'fixed'], description: 'Indica il valore della proprietà CSS `position`. I valori ammessi sono `sticky` o `fixed`', table: { defaultValue: { summary: 'sticky' } }, }, position: { control: { type: 'select' }, options: ['top', 'bottom'], description: \"Indica il bordo del viewport a cui agganciare l'elemento. Usa `'bottom'` con `position-type=\\\"fixed\\\"` per una barra persistente in fondo alla pagina.\", table: { defaultValue: { summary: 'top' } }, }, }, render: (args) => renderSticky(args), }"
702
+ "default": "{ title: 'Componenti/Sticky', component: 'it-sticky', tags: ['autodocs', 'a11y-ok', 'web-component'], args: { stackable: false, paddingTop: 0, stickyClassName: undefined, positionType: undefined, triggerOffset: undefined, triggerSelector: undefined, position: undefined, }, parameters: { docs: { description: { component: `<Description>Rende un elemento della pagina costantemente visibile allo scorrere della pagina.</Description> Talvolta è necessario che uno o più elementi della pagina restino sempre visibili anche quando essa viene fatta scorrere. Questo comportamento viene comunemente definito “sticky”. <br> Il componente <code>&lt;it-sticky&gt;</code> consente di mantenere visibile un elemento della pagina durante lo scroll, applicando automaticamente il comportamento “sticky”. <br> Per utilizzarlo, basta racchiudere il contenuto da fissare all’interno del tag <code>&lt;it-sticky&gt;</code>. Il componente gestisce in autonomia anche casi avanzati, come elementi impilabili o con padding e classi personalizzate, attraverso specifiche proprietà. <br> È disponibile una <a href=\"iframe.html?globals=&id=esempi-sticky--single-sticky&viewMode=story\" target=\"_blank\" rel=\"noopener\"> pagina di esempio </a> dedicata a questa funzionalità per comprenderne appieno significato ed utilizzo. `, }, }, }, argTypes: { stackable: { control: 'boolean', description: \"Attiva/disattiva la possibilità di rendere l'elemento impilabile su altri elementi sticky presenti in pagina\", table: { defaultValue: { summary: false } }, }, paddingTop: { name: 'padding-top', control: 'number', description: \"Indica la distanza dall'elemento in sticky dal margine superiore\", table: { defaultValue: { summary: 0 } }, }, stickyClassName: { name: 'sticky-class-name', control: 'text', description: \"Classi CSS da applicare all'elemento quando viene attivata la funzionalità sticky\", table: { defaultValue: { summary: '' } }, }, positionType: { name: 'position-type', control: { type: 'select' }, options: ['sticky', 'fixed'], description: 'Indica il valore della proprietà CSS `position`. I valori ammessi sono `sticky` o `fixed`', table: { defaultValue: { summary: 'sticky' } }, }, triggerOffset: { name: 'trigger-offset', control: 'number', description: \"Definisce un offset in pixel tra l'elemento e il margine superiore per ritardare l'attivazione dello sticky\", table: { defaultValue: { summary: undefined } }, }, triggerSelector: { name: 'trigger-selector', control: 'text', description: 'Selettore CSS di un elemento della pagina da usare come soglia di attivazione dello sticky', table: { defaultValue: { summary: undefined } }, }, position: { control: { type: 'select' }, options: ['top', 'bottom'], description: \"Indica il bordo del viewport a cui agganciare l'elemento. Usa `'bottom'` con `position-type=\\\"fixed\\\"` per una barra persistente in fondo alla pagina.\", table: { defaultValue: { summary: 'top' } }, }, }, render: (args) => renderSticky(args), }"
635
703
  },
636
704
  {
637
705
  "kind": "variable",
package/dist/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { I as ItSticky, S as StickyController } from '../it-sticky-CUae0Q6L.js';
1
+ export { I as ItSticky, S as StickyController } from '../it-sticky-HpS1K2Dr.js';
2
2
  import 'lit/decorators.js';
3
3
  import 'lit/directive.js';
4
4
  import 'lit';
@@ -5,6 +5,16 @@ export declare class ItSticky extends BaseComponent {
5
5
  stickyClassName?: StickyOptions['stickyClassName'];
6
6
  positionType?: StickyOptions['positionType'];
7
7
  stackable?: StickyOptions['stackable'];
8
+ /**
9
+ * Extra pixels to scroll past the element's natural position before sticky activates.
10
+ * Useful when you want sticky to kick in only after a preceding element (e.g. a header) has scrolled away.
11
+ */
12
+ triggerOffset?: StickyOptions['triggerOffset'];
13
+ /**
14
+ * CSS selector of an element whose height is used as the trigger offset.
15
+ * When provided, takes precedence over `trigger-offset`.
16
+ */
17
+ triggerSelector?: StickyOptions['triggerSelector'];
8
18
  /** Which viewport edge to stick to. Use `'bottom'` together with `position-type="fixed"` for a persistent bottom bar. */
9
19
  position?: 'top' | 'bottom';
10
20
  _stickyController: StickyController;
@@ -1 +1 @@
1
- {"version":3,"file":"it-sticky.d.ts","sourceRoot":"","sources":["../../src/it-sticky.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEzE,qBAAa,QAAS,SAAQ,aAAa;IACc,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAK;IAEvC,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEvD,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAY;IAErE,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAS;IAE3F,yHAAyH;IAC5F,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAS;IAE1D,iBAAiB,EAAE,gBAAgB,CAAoC;cAE3D,OAAO,IAAI,IAAI;IAclC,gBAAgB;CAGjB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"it-sticky.d.ts","sourceRoot":"","sources":["../../src/it-sticky.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEzE,qBAAa,QAAS,SAAQ,aAAa;IACc,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAK;IAEvC,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEvD,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAY;IAErE,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAS;IAE3F;;;OAGG;IAEH,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAK;IAEnD;;;OAGG;IACyD,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAE/G,yHAAyH;IAC5F,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAS;IAE1D,iBAAiB,EAAE,gBAAgB,CAAoC;cAE3D,OAAO,IAAI,IAAI;IAclC,gBAAgB;CAGjB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -1,4 +1,4 @@
1
- export { I as ItSticky } from '../it-sticky-CUae0Q6L.js';
1
+ export { I as ItSticky } from '../it-sticky-HpS1K2Dr.js';
2
2
  import 'lit/decorators.js';
3
3
  import 'lit/directive.js';
4
4
  import 'lit';
@@ -9,6 +9,8 @@ export interface StickyConfig {
9
9
  stackable?: boolean;
10
10
  stickyClassName?: string;
11
11
  positionType?: 'fixed' | 'sticky';
12
+ triggerOffset?: number;
13
+ triggerSelector?: string;
12
14
  /** Which viewport edge to stick to. Defaults to `'top'`. */
13
15
  position?: 'top' | 'bottom';
14
16
  _stickyController?: StickyController<any>;
@@ -21,6 +23,9 @@ export interface StickyOptions {
21
23
  stackable?: boolean;
22
24
  stickyClassName?: string;
23
25
  positionType?: 'fixed' | 'sticky';
26
+ triggerOffset?: number;
27
+ triggerSelector?: string;
28
+ position?: 'top' | 'bottom';
24
29
  }
25
30
  declare global {
26
31
  var __itStickyState: {
@@ -30,12 +35,14 @@ declare global {
30
35
  }
31
36
  export declare class StickyController<T extends StickyElement = StickyElement> implements ReactiveController {
32
37
  visualOrder: number;
38
+ private readonly windowUpdateHandler;
33
39
  setVisualOrder(order: number): void;
34
40
  private host;
35
41
  private limit;
36
42
  private originalLimit;
37
43
  private height;
38
44
  private prevHeight;
45
+ private reservedHeight;
39
46
  private hostElement;
40
47
  private _isSticky;
41
48
  get isSticky(): boolean;
@@ -47,6 +54,7 @@ export declare class StickyController<T extends StickyElement = StickyElement> i
47
54
  hostDisconnected(): void;
48
55
  hostUpdate(): void;
49
56
  protected computeLimit(): void;
57
+ protected measureHeight(): number;
50
58
  protected isBeforeInDOM(a: Element, b: Element): boolean;
51
59
  /**
52
60
  * Walks the DOM from `document.body` using a TreeWalker and collects every
@@ -66,6 +74,7 @@ export declare class StickyController<T extends StickyElement = StickyElement> i
66
74
  * with a lower visual order than this one.
67
75
  */
68
76
  protected computeOffset(): number;
77
+ protected getExtraTriggerOffset(): number;
69
78
  /**
70
79
  * Returns the nearest ancestor element that creates a CSS fixed-position
71
80
  * containing block (i.e. has a non-none `transform`, `filter`, or
@@ -1 +1 @@
1
- {"version":3,"file":"sticky-controller.d.ts","sourceRoot":"","sources":["../../src/sticky-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AAIlE;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,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U;IA0BV,SAAS,CAAC,YAAY;IAatB,SAAS,CAAC,aAAa;IAKvB,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO;IAOxD;;;;;;;OAOG;IAEH,OAAO,CAAC,YAAY;IAWpB,SAAS,CAAC,8BAA8B,IAAI,MAAM;IAoBlD;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,IAAI,MAAM;IAiCjC,SAAS,CAAC,qBAAqB,IAAI,MAAM;IAOzC;;;;;;;;OAQG;IAGH,OAAO,CAAC,0BAA0B;IAalC;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,IAAI,MAAM;IAavC,SAAS,CAAC,UAAU;IAMpB,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,OAAO;IA0ClE,SAAS,CAAC,WAAW,CAAC,MAAM,SAAI;IAsChC,SAAS,CAAC,WAAW;IA8BrB;;;;;;;OAOG;IACH,OAAO,CAAC,gCAAgC;IAuBxC;;;;;;;OAOG;IACH,OAAO,CAAC,mCAAmC;CAkB5C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@italia/sticky",
3
3
  "description": "Web component it-sticky del Design system .italia",
4
- "version": "1.0.0-alpha.9",
4
+ "version": "1.0.0-beta.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,33 +32,33 @@
32
32
  "LICENSE",
33
33
  "custom-elements.json"
34
34
  ],
35
+ "scripts": {
36
+ "analyze": "cem analyze --litelement --exclude dist",
37
+ "build": "rollup --config rollup.config.js",
38
+ "clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
39
+ "lint": "eslint --ext .ts \"src/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" && prettier \"src/**/*.ts\" \"test/**/*.ts\" --check",
40
+ "format": "eslint --ext .ts \"src/**/*.ts\" \"test/**/*.ts\" --fix && stylelint \"styles/**/*.scss\" --fix && prettier \"src/**/*.ts\" \"test/**/*.ts\" --write",
41
+ "test": "wtr --coverage --node-resolve --config web-test-runner.config.js"
42
+ },
35
43
  "dependencies": {
36
- "bootstrap-italia": "3.0.0-alpha.9",
37
- "lit": "^3.3.0",
38
- "@italia/globals": "^1.0.0-alpha.9"
44
+ "@italia/globals": "workspace:^",
45
+ "bootstrap-italia": "catalog:",
46
+ "lit": "catalog:"
39
47
  },
40
48
  "devDependencies": {
41
49
  "@custom-elements-manifest/analyzer": "^0.10.3",
42
- "@open-wc/testing": "^4.0.0",
50
+ "@italia/test-config": "workspace:^",
51
+ "@italia/typescript-config": "workspace:^",
52
+ "@open-wc/testing": "catalog:",
43
53
  "@rollup/plugin-node-resolve": "^16.0.1",
44
54
  "@rollup/plugin-typescript": "^12.1.2",
45
- "@types/mocha": "^10.0.10",
46
- "@web/test-runner": "^0.18.2",
55
+ "@types/mocha": "catalog:",
56
+ "@web/test-runner": "catalog:",
47
57
  "rimraf": "^6.0.1",
48
58
  "rollup": "^4.42.0",
49
59
  "rollup-plugin-scss-lit": "^2.1.0",
50
60
  "tslib": "^2.6.3",
51
- "typescript": "^5.5.3",
52
- "@italia/test-config": "^0.0.0",
53
- "@italia/typescript-config": "^0.0.0"
61
+ "typescript": "catalog:"
54
62
  },
55
- "customElements": "custom-elements.json",
56
- "scripts": {
57
- "analyze": "cem analyze --litelement --exclude dist",
58
- "build": "rollup --config rollup.config.js",
59
- "clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
60
- "lint": "eslint --ext .ts \"src/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" && prettier \"src/**/*.ts\" \"test/**/*.ts\" --check",
61
- "format": "eslint --ext .ts \"src/**/*.ts\" \"test/**/*.ts\" --fix && stylelint \"styles/**/*.scss\" --fix && prettier \"src/**/*.ts\" \"test/**/*.ts\" --write",
62
- "test": "wtr --coverage --node-resolve --config web-test-runner.config.js"
63
- }
64
- }
63
+ "customElements": "custom-elements.json"
64
+ }