@spectrum-web-components/grid 0.49.0 → 0.50.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/grid",
3
- "version": "0.49.0",
3
+ "version": "0.50.0-beta.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -64,8 +64,8 @@
64
64
  "dependencies": {
65
65
  "@lit-labs/observers": "^2.0.2",
66
66
  "@lit-labs/virtualizer": "^2.0.12",
67
- "@spectrum-web-components/base": "^0.49.0",
68
- "@spectrum-web-components/reactive-controllers": "^0.49.0",
67
+ "@spectrum-web-components/base": "^0.50.0-beta.0",
68
+ "@spectrum-web-components/reactive-controllers": "^0.50.0-beta.0",
69
69
  "lit": "^2.5.0 || ^3.1.3"
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": "088e84caa1e2f723d735b011608ca0a3411e2149"
77
+ "gitHead": "c3e248b4de0be546f3fb6bdfb26c9f711676b9c3"
78
78
  }
@@ -1,420 +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": "method",
103
- "name": "handleChange",
104
- "privacy": "protected",
105
- "return": {
106
- "type": {
107
- "text": "void"
108
- }
109
- },
110
- "parameters": [
111
- {
112
- "name": "event",
113
- "type": {
114
- "text": "Event"
115
- }
116
- }
117
- ]
118
- }
119
- ],
120
- "events": [
121
- {
122
- "description": "Announces that the value of `selected` has changed",
123
- "name": "change"
124
- }
125
- ],
126
- "attributes": [
127
- {
128
- "name": "focusableSelector",
129
- "type": {
130
- "text": "string"
131
- },
132
- "fieldName": "focusableSelector"
133
- },
134
- {
135
- "name": "gap",
136
- "type": {
137
- "text": "`${'0' | `${number}px`}`"
138
- },
139
- "default": "'0'",
140
- "fieldName": "gap"
141
- },
142
- {
143
- "name": "padding",
144
- "type": {
145
- "text": "`${'0' | `${number}px`}` | undefined"
146
- },
147
- "fieldName": "padding"
148
- },
149
- {
150
- "name": "items",
151
- "type": {
152
- "text": "Record<string, unknown>[]"
153
- },
154
- "default": "[]",
155
- "fieldName": "items"
156
- },
157
- {
158
- "name": "itemSize",
159
- "type": {
160
- "text": "{\n width: number;\n height: number;\n }"
161
- },
162
- "default": "{\n width: 200,\n height: 200,\n }",
163
- "fieldName": "itemSize"
164
- },
165
- {
166
- "name": "selected",
167
- "type": {
168
- "text": "Record<string, unknown>[]"
169
- },
170
- "default": "[]",
171
- "fieldName": "selected"
172
- }
173
- ],
174
- "superclass": {
175
- "name": "LitVirtualizer",
176
- "package": "@lit-labs/virtualizer/LitVirtualizer.js"
177
- },
178
- "tagName": "sp-grid",
179
- "customElement": true
180
- }
181
- ],
182
- "exports": [
183
- {
184
- "kind": "js",
185
- "name": "Grid",
186
- "declaration": {
187
- "name": "Grid",
188
- "module": "src/Grid.js"
189
- }
190
- }
191
- ]
192
- },
193
- {
194
- "kind": "javascript-module",
195
- "path": "src/GridController.js",
196
- "declarations": [
197
- {
198
- "kind": "class",
199
- "description": "",
200
- "name": "GridController",
201
- "members": [
202
- {
203
- "kind": "field",
204
- "name": "host",
205
- "type": {
206
- "text": "Grid"
207
- },
208
- "default": "host"
209
- },
210
- {
211
- "kind": "field",
212
- "name": "resizeController",
213
- "type": {
214
- "text": "ResizeController"
215
- },
216
- "default": "new ResizeController(this.host, {\n callback: (entries: ResizeObserverEntry[]): void => {\n entries.forEach((entry) => {\n this.measureDirectionLength(entry.contentRect);\n });\n },\n })"
217
- },
218
- {
219
- "kind": "field",
220
- "name": "rovingTabindexController",
221
- "type": {
222
- "text": "RovingTabindexController<T>"
223
- },
224
- "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 )"
225
- },
226
- {
227
- "kind": "field",
228
- "name": "itemSize",
229
- "type": {
230
- "text": "ItemSize"
231
- },
232
- "readonly": true
233
- },
234
- {
235
- "kind": "method",
236
- "name": "_itemSize",
237
- "privacy": "private",
238
- "return": {
239
- "type": {
240
- "text": "ItemSize"
241
- }
242
- }
243
- },
244
- {
245
- "kind": "field",
246
- "name": "_first",
247
- "type": {
248
- "text": "number"
249
- },
250
- "default": "0"
251
- },
252
- {
253
- "kind": "field",
254
- "name": "gap",
255
- "type": {
256
- "text": "string | undefined"
257
- },
258
- "readonly": true
259
- },
260
- {
261
- "kind": "method",
262
- "name": "_gap",
263
- "privacy": "private",
264
- "return": {
265
- "type": {
266
- "text": "string | undefined"
267
- }
268
- }
269
- },
270
- {
271
- "kind": "field",
272
- "name": "padding",
273
- "type": {
274
- "text": "string | undefined"
275
- },
276
- "readonly": true
277
- },
278
- {
279
- "kind": "method",
280
- "name": "_padding",
281
- "privacy": "private",
282
- "return": {
283
- "type": {
284
- "text": "string | undefined"
285
- }
286
- }
287
- },
288
- {
289
- "kind": "field",
290
- "name": "_last",
291
- "type": {
292
- "text": "number"
293
- },
294
- "default": "0"
295
- },
296
- {
297
- "kind": "method",
298
- "name": "focus",
299
- "privacy": "public",
300
- "return": {
301
- "type": {
302
- "text": "void"
303
- }
304
- },
305
- "parameters": [
306
- {
307
- "name": "options",
308
- "optional": true,
309
- "type": {
310
- "text": "FocusOptions"
311
- }
312
- }
313
- ]
314
- },
315
- {
316
- "kind": "method",
317
- "name": "applyLayout",
318
- "privacy": "protected",
319
- "return": {
320
- "type": {
321
- "text": "void"
322
- }
323
- },
324
- "parameters": [
325
- {
326
- "name": "itemSize",
327
- "type": {
328
- "text": "ItemSize | (() => ItemSize)"
329
- }
330
- },
331
- {
332
- "name": "gap",
333
- "optional": true,
334
- "type": {
335
- "text": "string | (() => string)"
336
- }
337
- },
338
- {
339
- "name": "padding",
340
- "optional": true,
341
- "type": {
342
- "text": "string | (() => string)"
343
- }
344
- }
345
- ]
346
- },
347
- {
348
- "kind": "method",
349
- "name": "measureDirectionLength",
350
- "privacy": "protected",
351
- "return": {
352
- "type": {
353
- "text": "void"
354
- }
355
- },
356
- "parameters": [
357
- {
358
- "name": "contentRect",
359
- "type": {
360
- "text": "DOMRect"
361
- }
362
- }
363
- ]
364
- },
365
- {
366
- "kind": "field",
367
- "name": "handleFocusin",
368
- "privacy": "protected"
369
- },
370
- {
371
- "kind": "field",
372
- "name": "handleFocusout",
373
- "privacy": "protected"
374
- },
375
- {
376
- "kind": "field",
377
- "name": "handleRangeChanged",
378
- "privacy": "protected"
379
- },
380
- {
381
- "kind": "field",
382
- "name": "handleVisibleChanged",
383
- "privacy": "protected"
384
- },
385
- {
386
- "kind": "method",
387
- "name": "hostConnected",
388
- "privacy": "public",
389
- "return": {
390
- "type": {
391
- "text": "void"
392
- }
393
- }
394
- },
395
- {
396
- "kind": "method",
397
- "name": "hostDisconnected",
398
- "privacy": "public",
399
- "return": {
400
- "type": {
401
- "text": "void"
402
- }
403
- }
404
- }
405
- ]
406
- }
407
- ],
408
- "exports": [
409
- {
410
- "kind": "js",
411
- "name": "GridController",
412
- "declaration": {
413
- "name": "GridController",
414
- "module": "src/GridController.js"
415
- }
416
- }
417
- ]
418
- }
419
- ]
420
- }