@loomidev/floating-panel 0.2.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,804 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/index.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "LoomiFloatingPanel",
13
+ "declaration": {
14
+ "name": "LoomiFloatingPanel",
15
+ "module": "./loomi-floating-panel.js"
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "showLoomiFloatingPanel",
21
+ "declaration": {
22
+ "name": "showLoomiFloatingPanel",
23
+ "module": "./loomi-floating-panel.js"
24
+ }
25
+ },
26
+ {
27
+ "kind": "js",
28
+ "name": "hideLoomiFloatingPanel",
29
+ "declaration": {
30
+ "name": "hideLoomiFloatingPanel",
31
+ "module": "./loomi-floating-panel.js"
32
+ }
33
+ },
34
+ {
35
+ "kind": "js",
36
+ "name": "LoomiFloatingPanelMinimizeDetail",
37
+ "declaration": {
38
+ "name": "LoomiFloatingPanelMinimizeDetail",
39
+ "module": "./loomi-floating-panel.js"
40
+ }
41
+ },
42
+ {
43
+ "kind": "js",
44
+ "name": "LoomiFloatingPanelMaximizeDetail",
45
+ "declaration": {
46
+ "name": "LoomiFloatingPanelMaximizeDetail",
47
+ "module": "./loomi-floating-panel.js"
48
+ }
49
+ },
50
+ {
51
+ "kind": "js",
52
+ "name": "LoomiFloatingPanelDragDetail",
53
+ "declaration": {
54
+ "name": "LoomiFloatingPanelDragDetail",
55
+ "module": "./loomi-floating-panel.js"
56
+ }
57
+ },
58
+ {
59
+ "kind": "js",
60
+ "name": "LoomiFloatingPanelResizeDetail",
61
+ "declaration": {
62
+ "name": "LoomiFloatingPanelResizeDetail",
63
+ "module": "./loomi-floating-panel.js"
64
+ }
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "kind": "javascript-module",
70
+ "path": "src/loomi-floating-panel.ts",
71
+ "declarations": [
72
+ {
73
+ "kind": "function",
74
+ "name": "showLoomiFloatingPanel",
75
+ "return": {
76
+ "type": {
77
+ "text": "void"
78
+ }
79
+ },
80
+ "parameters": [
81
+ {
82
+ "name": "name",
83
+ "type": {
84
+ "text": "string"
85
+ }
86
+ }
87
+ ],
88
+ "description": "Open a floating panel by its `name`."
89
+ },
90
+ {
91
+ "kind": "function",
92
+ "name": "hideLoomiFloatingPanel",
93
+ "return": {
94
+ "type": {
95
+ "text": "void"
96
+ }
97
+ },
98
+ "parameters": [
99
+ {
100
+ "name": "name",
101
+ "type": {
102
+ "text": "string"
103
+ }
104
+ }
105
+ ],
106
+ "description": "Close a floating panel by its `name`."
107
+ },
108
+ {
109
+ "kind": "class",
110
+ "description": "`<loomi-floating-panel>` — a draggable, resizable panel that floats above the page,\nunanchored to any trigger. Open/close via `name` with `showLoomiFloatingPanel()` /\n`hideLoomiFloatingPanel()`, or the instance `show()` / `hide()` methods.",
111
+ "name": "LoomiFloatingPanel",
112
+ "slots": [
113
+ {
114
+ "description": "The panel body.",
115
+ "name": ""
116
+ }
117
+ ],
118
+ "members": [
119
+ {
120
+ "kind": "field",
121
+ "name": "name",
122
+ "type": {
123
+ "text": "string"
124
+ },
125
+ "default": "\"\"",
126
+ "attribute": "name"
127
+ },
128
+ {
129
+ "kind": "field",
130
+ "name": "title",
131
+ "type": {
132
+ "text": "string"
133
+ },
134
+ "default": "\"\"",
135
+ "attribute": "title"
136
+ },
137
+ {
138
+ "kind": "field",
139
+ "name": "locale",
140
+ "type": {
141
+ "text": "string"
142
+ },
143
+ "default": "\"\"",
144
+ "attribute": "locale"
145
+ },
146
+ {
147
+ "kind": "field",
148
+ "name": "open",
149
+ "type": {
150
+ "text": "boolean"
151
+ },
152
+ "default": "false",
153
+ "attribute": "open",
154
+ "reflects": true
155
+ },
156
+ {
157
+ "kind": "field",
158
+ "name": "showCloseIcon",
159
+ "type": {
160
+ "text": "boolean"
161
+ },
162
+ "default": "true",
163
+ "attribute": "show-close-icon"
164
+ },
165
+ {
166
+ "kind": "field",
167
+ "name": "resizable",
168
+ "type": {
169
+ "text": "boolean"
170
+ },
171
+ "default": "true",
172
+ "description": "Enables the eight drag handles along the edges/corners.",
173
+ "attribute": "resizable"
174
+ },
175
+ {
176
+ "kind": "field",
177
+ "name": "noDrag",
178
+ "type": {
179
+ "text": "boolean"
180
+ },
181
+ "default": "false",
182
+ "description": "Disables moving the panel by dragging (or arrow-keying) its header.",
183
+ "attribute": "no-drag"
184
+ },
185
+ {
186
+ "kind": "field",
187
+ "name": "bounded",
188
+ "type": {
189
+ "text": "boolean"
190
+ },
191
+ "default": "true",
192
+ "description": "Keeps the panel's edges within the viewport while dragging/resizing.",
193
+ "attribute": "bounded"
194
+ },
195
+ {
196
+ "kind": "field",
197
+ "name": "minimize",
198
+ "type": {
199
+ "text": "boolean"
200
+ },
201
+ "default": "false",
202
+ "description": "Shows a header button that collapses the panel to just its title bar.",
203
+ "attribute": "minimize"
204
+ },
205
+ {
206
+ "kind": "field",
207
+ "name": "maximize",
208
+ "type": {
209
+ "text": "boolean"
210
+ },
211
+ "default": "false",
212
+ "description": "Shows a header button that expands the panel to fill the viewport.",
213
+ "attribute": "maximize"
214
+ },
215
+ {
216
+ "kind": "field",
217
+ "name": "dragHandle",
218
+ "type": {
219
+ "text": "boolean"
220
+ },
221
+ "default": "false",
222
+ "description": "Restricts dragging to a dedicated grip in the header instead of the whole header.",
223
+ "attribute": "drag-handle"
224
+ },
225
+ {
226
+ "kind": "field",
227
+ "name": "minimized",
228
+ "type": {
229
+ "text": "boolean"
230
+ },
231
+ "default": "false",
232
+ "description": "Whether the panel is currently collapsed to its title bar.",
233
+ "attribute": "minimized",
234
+ "reflects": true
235
+ },
236
+ {
237
+ "kind": "field",
238
+ "name": "maximized",
239
+ "type": {
240
+ "text": "boolean"
241
+ },
242
+ "default": "false",
243
+ "description": "Whether the panel is currently filling the viewport.",
244
+ "attribute": "maximized",
245
+ "reflects": true
246
+ },
247
+ {
248
+ "kind": "field",
249
+ "name": "top",
250
+ "type": {
251
+ "text": "string"
252
+ },
253
+ "default": "\"\"",
254
+ "description": "Initial position; any CSS length. Left unset, the panel opens centered.",
255
+ "attribute": "top"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "left",
260
+ "type": {
261
+ "text": "string"
262
+ },
263
+ "default": "\"\"",
264
+ "attribute": "left"
265
+ },
266
+ {
267
+ "kind": "field",
268
+ "name": "width",
269
+ "type": {
270
+ "text": "string"
271
+ },
272
+ "default": "\"\"",
273
+ "description": "Initial size; any CSS length. Left unset, falls back to the stylesheet default.",
274
+ "attribute": "width"
275
+ },
276
+ {
277
+ "kind": "field",
278
+ "name": "height",
279
+ "type": {
280
+ "text": "string"
281
+ },
282
+ "default": "\"\"",
283
+ "attribute": "height"
284
+ },
285
+ {
286
+ "kind": "field",
287
+ "name": "minWidth",
288
+ "type": {
289
+ "text": "number"
290
+ },
291
+ "default": "220",
292
+ "attribute": "min-width"
293
+ },
294
+ {
295
+ "kind": "field",
296
+ "name": "minHeight",
297
+ "type": {
298
+ "text": "number"
299
+ },
300
+ "default": "140",
301
+ "attribute": "min-height"
302
+ },
303
+ {
304
+ "kind": "field",
305
+ "name": "maxWidth",
306
+ "default": "Infinity",
307
+ "attribute": "max-width"
308
+ },
309
+ {
310
+ "kind": "field",
311
+ "name": "maxHeight",
312
+ "default": "Infinity",
313
+ "attribute": "max-height"
314
+ },
315
+ {
316
+ "kind": "field",
317
+ "name": "autoSaveId",
318
+ "type": {
319
+ "text": "string"
320
+ },
321
+ "default": "\"\"",
322
+ "description": "Persists position/size to `localStorage` under this key across reloads.",
323
+ "attribute": "auto-save-id"
324
+ },
325
+ {
326
+ "kind": "field",
327
+ "name": "rect",
328
+ "type": {
329
+ "text": "Rect | null"
330
+ },
331
+ "privacy": "private",
332
+ "default": "null",
333
+ "description": "Explicit pixel rect once the panel has been dragged/resized (or restored); `null` while it's still following the `top`/`left`/`width`/`height` attributes (or centered)."
334
+ },
335
+ {
336
+ "kind": "field",
337
+ "name": "hasLoadedPersisted",
338
+ "type": {
339
+ "text": "boolean"
340
+ },
341
+ "privacy": "private",
342
+ "default": "false"
343
+ },
344
+ {
345
+ "kind": "field",
346
+ "name": "previouslyFocused",
347
+ "type": {
348
+ "text": "HTMLElement | null"
349
+ },
350
+ "privacy": "private",
351
+ "default": "null",
352
+ "description": "The element focused before `show()` was called, restored when the panel closes."
353
+ },
354
+ {
355
+ "kind": "field",
356
+ "name": "originalParent",
357
+ "type": {
358
+ "text": "Node | null"
359
+ },
360
+ "privacy": "private",
361
+ "default": "null"
362
+ },
363
+ {
364
+ "kind": "field",
365
+ "name": "originalNextSibling",
366
+ "type": {
367
+ "text": "ChildNode | null"
368
+ },
369
+ "privacy": "private",
370
+ "default": "null"
371
+ },
372
+ {
373
+ "kind": "method",
374
+ "name": "show",
375
+ "return": {
376
+ "type": {
377
+ "text": "void"
378
+ }
379
+ }
380
+ },
381
+ {
382
+ "kind": "method",
383
+ "name": "hide",
384
+ "return": {
385
+ "type": {
386
+ "text": "void"
387
+ }
388
+ }
389
+ },
390
+ {
391
+ "kind": "field",
392
+ "name": "bringToFront",
393
+ "privacy": "private"
394
+ },
395
+ {
396
+ "kind": "method",
397
+ "name": "moveToDocumentBody",
398
+ "privacy": "private",
399
+ "return": {
400
+ "type": {
401
+ "text": "void"
402
+ }
403
+ }
404
+ },
405
+ {
406
+ "kind": "method",
407
+ "name": "restoreOriginalPosition",
408
+ "privacy": "private",
409
+ "return": {
410
+ "type": {
411
+ "text": "void"
412
+ }
413
+ }
414
+ },
415
+ {
416
+ "kind": "method",
417
+ "name": "storageKey",
418
+ "privacy": "private",
419
+ "return": {
420
+ "type": {
421
+ "text": "string | null"
422
+ }
423
+ }
424
+ },
425
+ {
426
+ "kind": "method",
427
+ "name": "loadPersistedRect",
428
+ "privacy": "private",
429
+ "return": {
430
+ "type": {
431
+ "text": "Rect | null"
432
+ }
433
+ }
434
+ },
435
+ {
436
+ "kind": "method",
437
+ "name": "persistRect",
438
+ "privacy": "private",
439
+ "return": {
440
+ "type": {
441
+ "text": "void"
442
+ }
443
+ }
444
+ },
445
+ {
446
+ "kind": "method",
447
+ "name": "syncPosition",
448
+ "privacy": "private",
449
+ "return": {
450
+ "type": {
451
+ "text": "void"
452
+ }
453
+ },
454
+ "description": "Applies `rect` (once the panel has moved/resized) or the raw `top`/`left`/`width`/`height` attributes directly to the host's inline style — the host itself is the visible, positioned box."
455
+ },
456
+ {
457
+ "kind": "method",
458
+ "name": "containsFocus",
459
+ "privacy": "private",
460
+ "return": {
461
+ "type": {
462
+ "text": "boolean"
463
+ }
464
+ }
465
+ },
466
+ {
467
+ "kind": "field",
468
+ "name": "onKey",
469
+ "privacy": "private"
470
+ },
471
+ {
472
+ "kind": "field",
473
+ "name": "toggleMinimize",
474
+ "privacy": "private",
475
+ "description": "Toggles the collapsed-to-title-bar state; turns off `maximized` first if it was on."
476
+ },
477
+ {
478
+ "kind": "field",
479
+ "name": "toggleMaximize",
480
+ "privacy": "private",
481
+ "description": "Toggles the fill-the-viewport state; turns off `minimized` first if it was on."
482
+ },
483
+ {
484
+ "kind": "field",
485
+ "name": "onHeaderDoubleClick",
486
+ "privacy": "private"
487
+ },
488
+ {
489
+ "kind": "field",
490
+ "name": "onHeaderPointerDown",
491
+ "privacy": "private"
492
+ },
493
+ {
494
+ "kind": "field",
495
+ "name": "onHeaderKeyDown",
496
+ "privacy": "private"
497
+ },
498
+ {
499
+ "kind": "method",
500
+ "name": "computeResizedRect",
501
+ "privacy": "private",
502
+ "return": {
503
+ "type": {
504
+ "text": "Rect"
505
+ }
506
+ },
507
+ "parameters": [
508
+ {
509
+ "name": "dir",
510
+ "type": {
511
+ "text": "ResizeDir"
512
+ }
513
+ },
514
+ {
515
+ "name": "start",
516
+ "type": {
517
+ "text": "Rect"
518
+ }
519
+ },
520
+ {
521
+ "name": "dx",
522
+ "type": {
523
+ "text": "number"
524
+ }
525
+ },
526
+ {
527
+ "name": "dy",
528
+ "type": {
529
+ "text": "number"
530
+ }
531
+ }
532
+ ],
533
+ "description": "Resizes from `start` by pointer/keyboard delta `(dx, dy)`, re-anchoring the edge opposite the drag direction so it doesn't move once width/height clamp."
534
+ },
535
+ {
536
+ "kind": "field",
537
+ "name": "onResizePointerDown",
538
+ "privacy": "private"
539
+ },
540
+ {
541
+ "kind": "field",
542
+ "name": "onResizeKeyDown",
543
+ "privacy": "private"
544
+ }
545
+ ],
546
+ "events": [
547
+ {
548
+ "name": "open",
549
+ "type": {
550
+ "text": "Event"
551
+ },
552
+ "description": "Shown. @fires close - Dismissed."
553
+ },
554
+ {
555
+ "name": "close",
556
+ "type": {
557
+ "text": "Event"
558
+ }
559
+ },
560
+ {
561
+ "description": "`detail: { top, left }` after the panel is moved.",
562
+ "name": "loomi-drag"
563
+ },
564
+ {
565
+ "description": "`detail: { top, left, width, height }` after the panel is resized.",
566
+ "name": "loomi-resize"
567
+ },
568
+ {
569
+ "description": "`detail: { minimized }` when the minimize button is toggled.",
570
+ "name": "loomi-minimize"
571
+ },
572
+ {
573
+ "description": "`detail: { maximized }` when the maximize button (or header double-click) is toggled.",
574
+ "name": "loomi-maximize"
575
+ }
576
+ ],
577
+ "attributes": [
578
+ {
579
+ "name": "name",
580
+ "type": {
581
+ "text": "string"
582
+ },
583
+ "default": "\"\"",
584
+ "fieldName": "name"
585
+ },
586
+ {
587
+ "name": "title",
588
+ "type": {
589
+ "text": "string"
590
+ },
591
+ "default": "\"\"",
592
+ "fieldName": "title"
593
+ },
594
+ {
595
+ "name": "locale",
596
+ "type": {
597
+ "text": "string"
598
+ },
599
+ "default": "\"\"",
600
+ "fieldName": "locale"
601
+ },
602
+ {
603
+ "name": "open",
604
+ "type": {
605
+ "text": "boolean"
606
+ },
607
+ "default": "false",
608
+ "fieldName": "open"
609
+ },
610
+ {
611
+ "name": "show-close-icon",
612
+ "type": {
613
+ "text": "boolean"
614
+ },
615
+ "default": "true",
616
+ "fieldName": "showCloseIcon"
617
+ },
618
+ {
619
+ "name": "resizable",
620
+ "type": {
621
+ "text": "boolean"
622
+ },
623
+ "default": "true",
624
+ "description": "Enables the eight drag handles along the edges/corners.",
625
+ "fieldName": "resizable"
626
+ },
627
+ {
628
+ "name": "no-drag",
629
+ "type": {
630
+ "text": "boolean"
631
+ },
632
+ "default": "false",
633
+ "description": "Disables moving the panel by dragging (or arrow-keying) its header.",
634
+ "fieldName": "noDrag"
635
+ },
636
+ {
637
+ "name": "bounded",
638
+ "type": {
639
+ "text": "boolean"
640
+ },
641
+ "default": "true",
642
+ "description": "Keeps the panel's edges within the viewport while dragging/resizing.",
643
+ "fieldName": "bounded"
644
+ },
645
+ {
646
+ "name": "minimize",
647
+ "type": {
648
+ "text": "boolean"
649
+ },
650
+ "default": "false",
651
+ "description": "Shows a header button that collapses the panel to just its title bar.",
652
+ "fieldName": "minimize"
653
+ },
654
+ {
655
+ "name": "maximize",
656
+ "type": {
657
+ "text": "boolean"
658
+ },
659
+ "default": "false",
660
+ "description": "Shows a header button that expands the panel to fill the viewport.",
661
+ "fieldName": "maximize"
662
+ },
663
+ {
664
+ "name": "drag-handle",
665
+ "type": {
666
+ "text": "boolean"
667
+ },
668
+ "default": "false",
669
+ "description": "Restricts dragging to a dedicated grip in the header instead of the whole header.",
670
+ "fieldName": "dragHandle"
671
+ },
672
+ {
673
+ "name": "minimized",
674
+ "type": {
675
+ "text": "boolean"
676
+ },
677
+ "default": "false",
678
+ "description": "Whether the panel is currently collapsed to its title bar.",
679
+ "fieldName": "minimized"
680
+ },
681
+ {
682
+ "name": "maximized",
683
+ "type": {
684
+ "text": "boolean"
685
+ },
686
+ "default": "false",
687
+ "description": "Whether the panel is currently filling the viewport.",
688
+ "fieldName": "maximized"
689
+ },
690
+ {
691
+ "name": "top",
692
+ "type": {
693
+ "text": "string"
694
+ },
695
+ "default": "\"\"",
696
+ "description": "Initial position; any CSS length. Left unset, the panel opens centered.",
697
+ "fieldName": "top"
698
+ },
699
+ {
700
+ "name": "left",
701
+ "type": {
702
+ "text": "string"
703
+ },
704
+ "default": "\"\"",
705
+ "fieldName": "left"
706
+ },
707
+ {
708
+ "name": "width",
709
+ "type": {
710
+ "text": "string"
711
+ },
712
+ "default": "\"\"",
713
+ "description": "Initial size; any CSS length. Left unset, falls back to the stylesheet default.",
714
+ "fieldName": "width"
715
+ },
716
+ {
717
+ "name": "height",
718
+ "type": {
719
+ "text": "string"
720
+ },
721
+ "default": "\"\"",
722
+ "fieldName": "height"
723
+ },
724
+ {
725
+ "name": "min-width",
726
+ "type": {
727
+ "text": "number"
728
+ },
729
+ "default": "220",
730
+ "fieldName": "minWidth"
731
+ },
732
+ {
733
+ "name": "min-height",
734
+ "type": {
735
+ "text": "number"
736
+ },
737
+ "default": "140",
738
+ "fieldName": "minHeight"
739
+ },
740
+ {
741
+ "name": "max-width",
742
+ "default": "Infinity",
743
+ "fieldName": "maxWidth"
744
+ },
745
+ {
746
+ "name": "max-height",
747
+ "default": "Infinity",
748
+ "fieldName": "maxHeight"
749
+ },
750
+ {
751
+ "name": "auto-save-id",
752
+ "type": {
753
+ "text": "string"
754
+ },
755
+ "default": "\"\"",
756
+ "description": "Persists position/size to `localStorage` under this key across reloads.",
757
+ "fieldName": "autoSaveId"
758
+ }
759
+ ],
760
+ "superclass": {
761
+ "name": "LoomiElement",
762
+ "package": "@loomidev/core"
763
+ },
764
+ "tagName": "loomi-floating-panel",
765
+ "customElement": true
766
+ }
767
+ ],
768
+ "exports": [
769
+ {
770
+ "kind": "js",
771
+ "name": "showLoomiFloatingPanel",
772
+ "declaration": {
773
+ "name": "showLoomiFloatingPanel",
774
+ "module": "src/loomi-floating-panel.ts"
775
+ }
776
+ },
777
+ {
778
+ "kind": "js",
779
+ "name": "hideLoomiFloatingPanel",
780
+ "declaration": {
781
+ "name": "hideLoomiFloatingPanel",
782
+ "module": "src/loomi-floating-panel.ts"
783
+ }
784
+ },
785
+ {
786
+ "kind": "js",
787
+ "name": "LoomiFloatingPanel",
788
+ "declaration": {
789
+ "name": "LoomiFloatingPanel",
790
+ "module": "src/loomi-floating-panel.ts"
791
+ }
792
+ },
793
+ {
794
+ "kind": "custom-element-definition",
795
+ "name": "loomi-floating-panel",
796
+ "declaration": {
797
+ "name": "LoomiFloatingPanel",
798
+ "module": "src/loomi-floating-panel.ts"
799
+ }
800
+ }
801
+ ]
802
+ }
803
+ ]
804
+ }