@spectrum-web-components/grid 1.8.0 → 1.9.0-nightly.20251013134115

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