@spectrum-web-components/grid 0.35.1-rc.43 → 0.36.0

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.
@@ -0,0 +1,421 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "sp-grid.js",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "sp-grid",
13
+ "declaration": {
14
+ "name": "Grid",
15
+ "module": "/src/Grid.js"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/Grid.js",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "",
27
+ "name": "Grid",
28
+ "members": [
29
+ {
30
+ "kind": "field",
31
+ "name": "focusableSelector",
32
+ "type": {
33
+ "text": "string"
34
+ },
35
+ "privacy": "public",
36
+ "attribute": "focusableSelector"
37
+ },
38
+ {
39
+ "kind": "field",
40
+ "name": "gap",
41
+ "type": {
42
+ "text": "`${'0' | `${number}px`}`"
43
+ },
44
+ "privacy": "public",
45
+ "default": "'0'",
46
+ "attribute": "gap"
47
+ },
48
+ {
49
+ "kind": "field",
50
+ "name": "padding",
51
+ "type": {
52
+ "text": "`${'0' | `${number}px`}` | undefined"
53
+ },
54
+ "privacy": "public",
55
+ "attribute": "padding"
56
+ },
57
+ {
58
+ "kind": "field",
59
+ "name": "items",
60
+ "type": {
61
+ "text": "Record<string, unknown>[]"
62
+ },
63
+ "privacy": "public",
64
+ "default": "[]",
65
+ "attribute": "items"
66
+ },
67
+ {
68
+ "kind": "field",
69
+ "name": "itemSize",
70
+ "type": {
71
+ "text": "{\n width: number;\n height: number;\n }"
72
+ },
73
+ "privacy": "public",
74
+ "default": "{\n width: 200,\n height: 200,\n }",
75
+ "attribute": "itemSize"
76
+ },
77
+ {
78
+ "kind": "field",
79
+ "name": "selected",
80
+ "type": {
81
+ "text": "Record<string, unknown>[]"
82
+ },
83
+ "privacy": "public",
84
+ "default": "[]",
85
+ "attribute": "selected"
86
+ },
87
+ {
88
+ "kind": "field",
89
+ "name": "gridController",
90
+ "default": "new GridController<HTMLElement>(this, {\n elements: () => [],\n itemSize: () => this.itemSize,\n /* c8 ignore next 2 */\n gap: () => this.gap,\n padding: () => this.padding || this.gap,\n })"
91
+ },
92
+ {
93
+ "kind": "method",
94
+ "name": "handleChange",
95
+ "privacy": "protected",
96
+ "return": {
97
+ "type": {
98
+ "text": "void"
99
+ }
100
+ },
101
+ "parameters": [
102
+ {
103
+ "name": "event",
104
+ "type": {
105
+ "text": "Event"
106
+ }
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "kind": "method",
112
+ "name": "createRenderRoot",
113
+ "privacy": "public",
114
+ "return": {
115
+ "type": {
116
+ "text": "this"
117
+ }
118
+ }
119
+ }
120
+ ],
121
+ "events": [
122
+ {
123
+ "description": "Announces that the value of `selected` has changed",
124
+ "name": "change"
125
+ }
126
+ ],
127
+ "attributes": [
128
+ {
129
+ "name": "focusableSelector",
130
+ "type": {
131
+ "text": "string"
132
+ },
133
+ "fieldName": "focusableSelector"
134
+ },
135
+ {
136
+ "name": "gap",
137
+ "type": {
138
+ "text": "`${'0' | `${number}px`}`"
139
+ },
140
+ "default": "'0'",
141
+ "fieldName": "gap"
142
+ },
143
+ {
144
+ "name": "padding",
145
+ "type": {
146
+ "text": "`${'0' | `${number}px`}` | undefined"
147
+ },
148
+ "fieldName": "padding"
149
+ },
150
+ {
151
+ "name": "items",
152
+ "type": {
153
+ "text": "Record<string, unknown>[]"
154
+ },
155
+ "default": "[]",
156
+ "fieldName": "items"
157
+ },
158
+ {
159
+ "name": "itemSize",
160
+ "type": {
161
+ "text": "{\n width: number;\n height: number;\n }"
162
+ },
163
+ "default": "{\n width: 200,\n height: 200,\n }",
164
+ "fieldName": "itemSize"
165
+ },
166
+ {
167
+ "name": "selected",
168
+ "type": {
169
+ "text": "Record<string, unknown>[]"
170
+ },
171
+ "default": "[]",
172
+ "fieldName": "selected"
173
+ }
174
+ ],
175
+ "superclass": {
176
+ "name": "LitVirtualizer",
177
+ "package": "@lit-labs/virtualizer/LitVirtualizer.js"
178
+ },
179
+ "tagName": "sp-grid",
180
+ "customElement": true
181
+ }
182
+ ],
183
+ "exports": [
184
+ {
185
+ "kind": "js",
186
+ "name": "Grid",
187
+ "declaration": {
188
+ "name": "Grid",
189
+ "module": "src/Grid.js"
190
+ }
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "kind": "javascript-module",
196
+ "path": "src/GridController.js",
197
+ "declarations": [
198
+ {
199
+ "kind": "class",
200
+ "description": "",
201
+ "name": "GridController",
202
+ "members": [
203
+ {
204
+ "kind": "field",
205
+ "name": "host",
206
+ "type": {
207
+ "text": "Grid"
208
+ },
209
+ "default": "host"
210
+ },
211
+ {
212
+ "kind": "field",
213
+ "name": "resizeController",
214
+ "type": {
215
+ "text": "ResizeController"
216
+ },
217
+ "default": "new ResizeController(this.host, {\n callback: (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n this.measureDirectionLength(entry.contentRect);\n });\n },\n })"
218
+ },
219
+ {
220
+ "kind": "field",
221
+ "name": "rovingTabindexController",
222
+ "type": {
223
+ "text": "RovingTabindexController<T>"
224
+ },
225
+ "default": "new RovingTabindexController<T>(\n this.host,\n {\n direction: 'grid',\n elements,\n focusInIndex: () => {\n const activeElement = (this.host.getRootNode() as Document)\n .activeElement as HTMLElement;\n return activeElement === this.host ? 0 : -1;\n },\n }\n )"
226
+ },
227
+ {
228
+ "kind": "field",
229
+ "name": "itemSize",
230
+ "type": {
231
+ "text": "ItemSize"
232
+ },
233
+ "readonly": true
234
+ },
235
+ {
236
+ "kind": "method",
237
+ "name": "_itemSize",
238
+ "privacy": "private",
239
+ "return": {
240
+ "type": {
241
+ "text": "ItemSize"
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "kind": "field",
247
+ "name": "_first",
248
+ "type": {
249
+ "text": "number"
250
+ },
251
+ "default": "0"
252
+ },
253
+ {
254
+ "kind": "field",
255
+ "name": "gap",
256
+ "type": {
257
+ "text": "string | undefined"
258
+ },
259
+ "readonly": true
260
+ },
261
+ {
262
+ "kind": "method",
263
+ "name": "_gap",
264
+ "privacy": "private",
265
+ "return": {
266
+ "type": {
267
+ "text": "string | undefined"
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "kind": "field",
273
+ "name": "padding",
274
+ "type": {
275
+ "text": "string | undefined"
276
+ },
277
+ "readonly": true
278
+ },
279
+ {
280
+ "kind": "method",
281
+ "name": "_padding",
282
+ "privacy": "private",
283
+ "return": {
284
+ "type": {
285
+ "text": "string | undefined"
286
+ }
287
+ }
288
+ },
289
+ {
290
+ "kind": "field",
291
+ "name": "_last",
292
+ "type": {
293
+ "text": "number"
294
+ },
295
+ "default": "0"
296
+ },
297
+ {
298
+ "kind": "method",
299
+ "name": "focus",
300
+ "privacy": "public",
301
+ "return": {
302
+ "type": {
303
+ "text": "void"
304
+ }
305
+ },
306
+ "parameters": [
307
+ {
308
+ "name": "options",
309
+ "optional": true,
310
+ "type": {
311
+ "text": "FocusOptions"
312
+ }
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "kind": "method",
318
+ "name": "applyLayout",
319
+ "privacy": "protected",
320
+ "return": {
321
+ "type": {
322
+ "text": "void"
323
+ }
324
+ },
325
+ "parameters": [
326
+ {
327
+ "name": "itemSize",
328
+ "type": {
329
+ "text": "ItemSize | (() => ItemSize)"
330
+ }
331
+ },
332
+ {
333
+ "name": "gap",
334
+ "optional": true,
335
+ "type": {
336
+ "text": "string | (() => string)"
337
+ }
338
+ },
339
+ {
340
+ "name": "padding",
341
+ "optional": true,
342
+ "type": {
343
+ "text": "string | (() => string)"
344
+ }
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ "kind": "method",
350
+ "name": "measureDirectionLength",
351
+ "privacy": "protected",
352
+ "return": {
353
+ "type": {
354
+ "text": "void"
355
+ }
356
+ },
357
+ "parameters": [
358
+ {
359
+ "name": "contentRect",
360
+ "type": {
361
+ "text": "DOMRect"
362
+ }
363
+ }
364
+ ]
365
+ },
366
+ {
367
+ "kind": "field",
368
+ "name": "handleFocusin",
369
+ "privacy": "protected"
370
+ },
371
+ {
372
+ "kind": "field",
373
+ "name": "handleFocusout",
374
+ "privacy": "protected"
375
+ },
376
+ {
377
+ "kind": "field",
378
+ "name": "handleRangeChanged",
379
+ "privacy": "protected"
380
+ },
381
+ {
382
+ "kind": "field",
383
+ "name": "handleVisibleChanged",
384
+ "privacy": "protected"
385
+ },
386
+ {
387
+ "kind": "method",
388
+ "name": "hostConnected",
389
+ "privacy": "public",
390
+ "return": {
391
+ "type": {
392
+ "text": "void"
393
+ }
394
+ }
395
+ },
396
+ {
397
+ "kind": "method",
398
+ "name": "hostDisconnected",
399
+ "privacy": "public",
400
+ "return": {
401
+ "type": {
402
+ "text": "void"
403
+ }
404
+ }
405
+ }
406
+ ]
407
+ }
408
+ ],
409
+ "exports": [
410
+ {
411
+ "kind": "js",
412
+ "name": "GridController",
413
+ "declaration": {
414
+ "name": "GridController",
415
+ "module": "src/GridController.js"
416
+ }
417
+ }
418
+ ]
419
+ }
420
+ ]
421
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/grid",
3
- "version": "0.35.1-rc.43+432051b80",
3
+ "version": "0.36.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -64,8 +64,8 @@
64
64
  "dependencies": {
65
65
  "@lit-labs/observers": "^2.0.0",
66
66
  "@lit-labs/virtualizer": "^2.0.2",
67
- "@spectrum-web-components/base": "^0.35.1-rc.43+432051b80",
68
- "@spectrum-web-components/reactive-controllers": "^0.35.1-rc.43+432051b80",
67
+ "@spectrum-web-components/base": "^0.36.0",
68
+ "@spectrum-web-components/reactive-controllers": "^0.36.0",
69
69
  "lit": "^2.5.0"
70
70
  },
71
71
  "types": "./src/index.d.ts",
@@ -74,5 +74,5 @@
74
74
  "./sp-*.js",
75
75
  "./**/*.dev.js"
76
76
  ],
77
- "gitHead": "432051b8085e7c86032333fa296bfa5334d47d84"
77
+ "gitHead": "a532ff8a410abeefb54d9638a2316ae82570566e"
78
78
  }