Repository navigation
Expand file tree
/
Copy pathcustom-elements.json
More file actions
10000 lines (10000 loc) · 388 KB
/
Copy pathcustom-elements.json
File metadata and controls
10000 lines (10000 loc) · 388 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/defineShellWidgets.js",
"declarations": [
{
"kind": "function",
"name": "defineShellWidgets",
"return": {
"type": {
"text": "void"
}
},
"description": "Registers every element connectShell draws, under its default name: the widgets the documents,\nthe folder and a project are shown in, the shell's parts, the modules' views, the shell's\ninternal elements, and `<dex-app-shell>` with its views and actions. Call it once before\nconnectShell; a second call does nothing."
}
],
"exports": [
{
"kind": "js",
"name": "defineShellWidgets",
"declaration": {
"name": "defineShellWidgets",
"module": "dist/widgets/app-shell/defineShellWidgets.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/dex-about-panel.js",
"declarations": [
{
"kind": "class",
"description": "The shell's About popover, opened from the (i) button of an activity bar: a heading (the app's\nname) and the lines the app hands it, each a label and its value (the app's version, the\nversions it is built on). A line may name a section (`section: 'Built on'`): the lines with none\ncome first, under the app's name, then each section under its own heading, in the order its\nfirst line has. The app's words are drawn as text, never as markup.\n\nshow() opens it beside the button that opened it, as `<dex-settings-panel>` opens; Escape, a\npress outside it, or close() closes it, and focus goes back to the button. It sends nothing.",
"name": "DexAboutPanel",
"members": [
{
"kind": "field",
"name": "heading",
"type": {
"text": "string"
},
"default": "'Data Explorer'",
"description": "The heading, the app's name, drawn in capitals as the Settings title is; also the dialog's accessible name.",
"attribute": "heading"
},
{
"kind": "field",
"name": "lines",
"type": {
"text": "AboutLine[]"
},
"default": "[]",
"description": "The lines under the heading, in order: a label (Version) and its value (1.0.0), and the heading\nof the section the line is in (`section`), if any. The lines with no section are drawn first;\neach section follows, once, where its first line is."
},
{
"kind": "field",
"name": "open",
"type": {
"text": "boolean"
},
"description": "Whether it is open: from show() until close(), Escape or a press outside it. The `open` attribute says the same, for styling.",
"readonly": true
},
{
"kind": "method",
"name": "show",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "anchor",
"type": {
"text": "Rect"
}
}
],
"description": "Opens the popover beside `anchor`, the button that opened it, in viewport px (its\ngetBoundingClientRect()): to its right with their bottoms in line, or to its left when the\nright has no room, and inside the window. Open already, it moves; not on the page, it does\nnot open."
},
{
"kind": "method",
"name": "close",
"return": {
"type": {
"text": "void"
}
},
"description": "Closes the popover; focus goes back to the button when the popover held it."
}
],
"attributes": [
{
"name": "heading",
"type": {
"text": "string"
},
"default": "'Data Explorer'",
"description": "The heading, the app's name, drawn in capitals as the Settings title is; also the dialog's accessible name.",
"fieldName": "heading"
}
],
"superclass": {
"name": "LitElement",
"package": "lit"
},
"tagName": "dex-about-panel",
"customElement": true,
"cssProperties": [
{
"name": "--dex-bg-primary",
"default": "#fff"
},
{
"name": "--dex-border-color",
"default": "#d0d0d0"
},
{
"name": "--dex-border-color-light",
"default": "#e0e0e0"
},
{
"name": "--dex-color-text",
"default": "#333"
},
{
"name": "--dex-color-text-secondary",
"default": "#555"
},
{
"name": "--dex-font-family",
"default": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
}
]
},
{
"kind": "function",
"name": "defineAboutPanel",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "tag",
"default": "'dex-about-panel'"
}
],
"description": "Registers the widget as `<dex-about-panel>`, or under `tag`."
}
],
"exports": [
{
"kind": "js",
"name": "DexAboutPanel",
"declaration": {
"name": "DexAboutPanel",
"module": "dist/widgets/app-shell/dex-about-panel.js"
}
},
{
"kind": "js",
"name": "defineAboutPanel",
"declaration": {
"name": "defineAboutPanel",
"module": "dist/widgets/app-shell/dex-about-panel.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/dex-app-shell.js",
"declarations": [
{
"kind": "class",
"description": "The frame of an app: a toolbar and a location bar across the top, a\nsidebar on each side with an activity bar beyond it, the documents in the center with a bottom\npanel under them, and a status bar at the foot of the center. The page fills it: its toolbar,\nlocation bar and status text as children in the `toolbar`, `location` and `status` slots, its\ndocuments as plain children, and the sides from `<dex-shell-view>` children, each a view with\nan activity button, and `<dex-shell-action>` children, buttons it answers itself.\n\nEach side shows one of its views and hides the rest. A press of a view's activity button, its\nshortcut, or toggleView shows the view, or closes its side when the view is the one shown; a\nview its shortcut shows takes the focus, and the focus in a view that is hidden goes to the\nview's button. A side's separator resizes it, dragged or by the arrow keys, and every side is\ndrawn no larger than the window leaves room for. A side with no views has no sidebar, and an\nactivity bar only for its actions. A change of the view shown, or of a side open or closed,\nsends `dex-shell-view-changed`; a press of an action sends `dex-shell-action`. With a\n`storage-key` the layout the person chose is kept in localStorage and read back by the next\nshell with that key.",
"name": "DexAppShell",
"members": [
{
"kind": "field",
"name": "storageKey",
"type": {
"text": "string"
},
"default": "''",
"description": "The localStorage key the layout is kept under (which view each side shows, which sides are\nopen, and their sizes), read back as each side's views first arrive. Empty, the default,\nkeeps nothing. Attribute `storage-key`.",
"attribute": "storage-key"
},
{
"kind": "field",
"name": "mono",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the icons of the buttons the shell draws (the activity bars' and the status bar's) in\none colour, the buttons' ink (`--dex-activity-fg`, through `<dex-icon mono>`), as the\nprototype's bars drew their glyphs; off, the default, draws them in their files' colours. The\npage's own children are its own to draw. Attribute `mono`, reflected so a page's stylesheet\ncan follow it.",
"attribute": "mono",
"reflects": true
},
{
"kind": "field",
"name": "layout",
"type": {
"text": "ShellLayoutState"
},
"description": "Which view each side shows, whether it is open, and its width or height, as drawn. A size the\nwindow has no room for is drawn smaller than the one the person chose, and as chosen again\nonce there is room; the size kept is the one chosen. Read-only: the buttons, the separators,\nshowView and toggleView change it.",
"readonly": true
},
{
"kind": "method",
"name": "showView",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "view",
"type": {
"text": "string"
}
}
],
"description": "Shows the view with this id, opening its side if it was closed: what a command that brings a\nview forward does. Never closes a side. Sends `dex-shell-view-changed`, and keeps the layout,\nwhen that changes anything. A view appended in the same task is one too; an id no view has\ndoes nothing."
},
{
"kind": "method",
"name": "toggleView",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "view",
"type": {
"text": "string"
}
}
],
"description": "What a press of the view's activity button does: shows it, or closes its side when it is the\nview shown. Sends `dex-shell-view-changed` and keeps the layout. An id no view has does nothing."
},
{
"kind": "method",
"name": "anchorOf",
"return": {
"type": {
"text": "DOMRect | null"
}
},
"parameters": [
{
"name": "id",
"type": {
"text": "string"
}
}
],
"description": "The box of the activity button of the view or the action with this id, in viewport px, for a\npopover to open against; null when the shell draws no button for the id."
}
],
"events": [
{
"name": "dex-shell-view-changed",
"type": {
"text": "CustomEvent<ShellViewChangedDetail>"
},
"description": "A side shows another view, or was opened or closed: by its activity button, its chord, or\nshowView / toggleView. The side as it is now. Not sent for a resize, nor when the page's own\nchange of the views moves the layout."
},
{
"name": "dex-shell-action",
"type": {
"text": "CustomEvent<ShellActionDetail>"
},
"description": "An action's button, or its chord, was pressed: open what it stands for, against `anchor`."
}
],
"attributes": [
{
"name": "storage-key",
"type": {
"text": "string"
},
"default": "''",
"description": "The localStorage key the layout is kept under (which view each side shows, which sides are\nopen, and their sizes), read back as each side's views first arrive. Empty, the default,\nkeeps nothing. Attribute `storage-key`.",
"fieldName": "storageKey"
},
{
"name": "mono",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the icons of the buttons the shell draws (the activity bars' and the status bar's) in\none colour, the buttons' ink (`--dex-activity-fg`, through `<dex-icon mono>`), as the\nprototype's bars drew their glyphs; off, the default, draws them in their files' colours. The\npage's own children are its own to draw. Attribute `mono`, reflected so a page's stylesheet\ncan follow it.",
"fieldName": "mono"
}
],
"superclass": {
"name": "LitElement",
"package": "lit"
},
"tagName": "dex-app-shell",
"customElement": true,
"cssProperties": [
{
"name": "--dex-activity-active",
"default": "#0078d4"
},
{
"name": "--dex-activity-fg",
"default": "#616161"
},
{
"name": "--dex-bg-activity-bar",
"description": "The app shell (data-explorer-view/app-shell): its activity bars, toolbar row, tab bar and the line a resizer shows under the pointer.",
"default": "#f0f0f0"
},
{
"name": "--dex-bg-primary",
"default": "#fff"
},
{
"name": "--dex-bg-secondary",
"default": "#f8f8f8"
},
{
"name": "--dex-bg-tertiary",
"default": "#f5f5f5"
},
{
"name": "--dex-bg-toolbar",
"default": "#fff"
},
{
"name": "--dex-border-color",
"default": "#d0d0d0"
},
{
"name": "--dex-border-color-light",
"default": "#e0e0e0"
},
{
"name": "--dex-color-text",
"default": "#333"
},
{
"name": "--dex-color-text-muted",
"default": "#666"
},
{
"name": "--dex-color-text-secondary",
"default": "#555"
},
{
"name": "--dex-focus-ring",
"default": "0 0 0 2px rgba(0, 120, 212, 0.4)"
},
{
"name": "--dex-font-family",
"default": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
},
{
"name": "--dex-font-size",
"default": "13px"
},
{
"name": "--dex-shell-resizer-hover",
"default": "#0078d4"
}
]
},
{
"kind": "function",
"name": "defineAppShell",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "tag",
"default": "'dex-app-shell'"
}
],
"description": "Registers the widget as `<dex-app-shell>`, or under `tag`, and the parts it is given and draws:\n`<dex-shell-view>`, `<dex-shell-action>` and `<dex-icon>`. The parts first, so the views of a\npage are upgraded before the shell reads them. The layout's alone: what connectShell builds in it\nis defined, this with it, by defineShellWidgets()."
}
],
"exports": [
{
"kind": "js",
"name": "DexAppShell",
"declaration": {
"name": "DexAppShell",
"module": "dist/widgets/app-shell/dex-app-shell.js"
}
},
{
"kind": "js",
"name": "defineAppShell",
"declaration": {
"name": "defineAppShell",
"module": "dist/widgets/app-shell/dex-app-shell.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/dex-compare-view.js",
"declarations": [
{
"kind": "class",
"description": "Two files compared line by line: a header (what differs, \"Show only differences\", Previous and\nNext Change) over two read-only tables side by side, whose rows share ids line for line. A row\nopened, scrolled to or selected in one is in the other; a line one file lacks is a gap row there.\n\nThe app gives each side its rows, a row per line under the line's id, the same ids in the same\norder and tree on both, with a blank row where a file lacks the line, and each line's mark on\nthat side; and it lays them out again when \"Show only differences\" is toggled\n(`dex-compare-filter-changed`) or a file changes. The view keeps the two tables one picture: a\nline opened in one is opened in the other, a scroll of one scrolls the other to the same place,\nand a selection in one is the other's, said in `dex-compare-selected`. The tables keep their rows\nas given (a sort or a search on one side alone would break the lines) and take no edit; a row's\nmenu is asked for in `dex-compare-menu`, with the side it was asked on, for the app to offer Copy\nto Left or Right. Only vertical scroll follows: each table keeps its own column widths and\nchoices, so the same sideways scroll would put different columns under each other. Previous and\nNext Change send `dex-compare-step` for the app to say which line that is (`select`). The tables'\nown events stay inside the view.\n\nIt fills the box it is given, a column: the header, then the two sides, each a caption (the\nfile's name, ● while it is unsaved, \"Read-only\" where no copy can go into it) over its table.",
"name": "DexCompareView",
"members": [
{
"kind": "field",
"name": "left",
"type": {
"text": "CompareSide | null"
},
"default": "null",
"description": "The left side: its caption and its table's rows."
},
{
"kind": "field",
"name": "right",
"type": {
"text": "CompareSide | null"
},
"default": "null",
"description": "The right side, the same lines as the left."
},
{
"kind": "field",
"name": "summary",
"type": {
"text": "string"
},
"default": "''",
"description": "The header's words for what differs (\"3 changed, 1 added, 2 removed\"), said politely to a screen reader as it changes.",
"attribute": "summary"
},
{
"kind": "field",
"name": "onlyDifferences",
"type": {
"text": "boolean"
},
"default": "true",
"description": "The header's checkbox: lines with no difference in or under them are left out (the app gives rows to match). Default true. Attribute `only-differences`.",
"attribute": "only-differences"
},
{
"kind": "field",
"name": "hasChanges",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Whether there is a change to go to: Previous and Next Change are enabled. Attribute `has-changes`.",
"attribute": "has-changes"
},
{
"kind": "field",
"name": "empty",
"type": {
"text": "string"
},
"default": "''",
"description": "Said in place of the tables while both have no rows (\"No differences\"); '' shows the tables.",
"attribute": "empty"
},
{
"kind": "field",
"name": "tableStyle",
"type": {
"text": "'normal' | 'light'"
},
"default": "'normal'",
"description": "Both tables' style. Attribute `table-style`.",
"attribute": "table-style"
},
{
"kind": "field",
"name": "storageKey",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Both tables' `storageKey` (their column choices, shared). Default null: kept for the element's life only. Attribute `storage-key`.",
"attribute": "storage-key"
},
{
"kind": "field",
"name": "expandedIds",
"type": {
"text": "Set<string>"
},
"description": "The lines shown open, both tables'; setting it sends nothing."
},
{
"kind": "field",
"name": "selectedIds",
"type": {
"text": "string[]"
},
"description": "The selected lines.",
"readonly": true
},
{
"kind": "method",
"name": "select",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "lineIds",
"type": {
"text": "readonly string[]"
}
}
],
"description": "Select these lines in both tables, opening their parents and bringing the first into view; sends nothing."
},
{
"kind": "method",
"name": "focus",
"return": {
"type": {
"text": "void"
}
},
"description": "The keyboard to the left table's grid."
}
],
"events": [
{
"name": "dex-compare-selected",
"type": {
"text": "CustomEvent<CompareSelectedDetail>"
},
"description": "The selection changed, in either table: both select `lineIds` now."
},
{
"name": "dex-compare-menu",
"type": {
"text": "CustomEvent<CompareMenuDetail>"
},
"description": "A row's menu was asked for (right-click, Shift+F10, ContextMenu key), the right-clicked row selected first."
},
{
"name": "dex-compare-step",
"type": {
"text": "CustomEvent<CompareStepDetail>"
},
"description": "Previous (-1) or Next (+1) Change was pressed."
},
{
"name": "dex-compare-filter-changed",
"type": {
"text": "CustomEvent<CompareFilterChangedDetail>"
},
"description": "\"Show only differences\" was toggled; `onlyDifferences` follows it already."
}
],
"attributes": [
{
"name": "summary",
"type": {
"text": "string"
},
"default": "''",
"description": "The header's words for what differs (\"3 changed, 1 added, 2 removed\"), said politely to a screen reader as it changes.",
"fieldName": "summary"
},
{
"name": "only-differences",
"type": {
"text": "boolean"
},
"default": "true",
"description": "The header's checkbox: lines with no difference in or under them are left out (the app gives rows to match). Default true. Attribute `only-differences`.",
"fieldName": "onlyDifferences"
},
{
"name": "has-changes",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Whether there is a change to go to: Previous and Next Change are enabled. Attribute `has-changes`.",
"fieldName": "hasChanges"
},
{
"name": "empty",
"type": {
"text": "string"
},
"default": "''",
"description": "Said in place of the tables while both have no rows (\"No differences\"); '' shows the tables.",
"fieldName": "empty"
},
{
"name": "table-style",
"type": {
"text": "'normal' | 'light'"
},
"default": "'normal'",
"description": "Both tables' style. Attribute `table-style`.",
"fieldName": "tableStyle"
},
{
"name": "storage-key",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Both tables' `storageKey` (their column choices, shared). Default null: kept for the element's life only. Attribute `storage-key`.",
"fieldName": "storageKey"
}
],
"superclass": {
"name": "LitElement",
"package": "lit"
},
"tagName": "dex-compare-view",
"customElement": true,
"cssProperties": [
{
"name": "--dex-bg-active",
"default": "#e0e0e0"
},
{
"name": "--dex-bg-hover",
"default": "#e8e8e8"
},
{
"name": "--dex-bg-primary",
"default": "#fff"
},
{
"name": "--dex-bg-secondary",
"default": "#f8f8f8"
},
{
"name": "--dex-bg-toolbar",
"default": "#fff"
},
{
"name": "--dex-border-color",
"default": "#d0d0d0"
},
{
"name": "--dex-border-color-light",
"default": "#e0e0e0"
},
{
"name": "--dex-color-text",
"default": "#333"
},
{
"name": "--dex-color-text-muted",
"default": "#666"
},
{
"name": "--dex-focus-ring",
"default": "0 0 0 2px rgba(0, 120, 212, 0.4)"
},
{
"name": "--dex-font-family",
"default": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
},
{
"name": "--dex-font-size",
"default": "13px"
},
{
"name": "--dex-tag-bg",
"default": "#e0e0e0"
},
{
"name": "--dex-tag-fg",
"description": "A label on a row naming what kind of thing it is (the project page's \"interface\").",
"default": "#333"
}
]
},
{
"kind": "function",
"name": "defineCompareView",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "tag",
"default": "'dex-compare-view'"
}
],
"description": "Registers the widget as `<dex-compare-view>`, or under `tag`, with the icons and the tables it draws."
}
],
"exports": [
{
"kind": "js",
"name": "DexCompareView",
"declaration": {
"name": "DexCompareView",
"module": "dist/widgets/app-shell/dex-compare-view.js"
}
},
{
"kind": "js",
"name": "defineCompareView",
"declaration": {
"name": "defineCompareView",
"module": "dist/widgets/app-shell/dex-compare-view.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/dex-confirm-dialog.js",
"declarations": [
{
"kind": "class",
"description": "A question with buttons, asked in the page for a host that has no dialogs of its own (a\nbrowser page): \"Save changes to x before closing?\", \"x changed on disk\". show() opens it and\nresolves to the id of the button pressed; Escape, a click outside it and close() resolve to the\nquestion's `cancelId`, and focus goes back where it was. It opens focused on the primary\nbutton, never on a danger one, and Tab stays among its buttons while it is open. prompt() asks\nfor a line of text in the same dialog (\"Open from URL\"), a host having no prompt of its own\neither: it resolves to the text typed, or null, opens focused on the field and keeps Tab among\nthe field and its buttons. One question is open at a time, of either kind. It sends no events:\nthe promise is the answer.\n\nIt paints at z-index 10000, as `<dex-error-dialog>` does, so where both are open the one later\nin the document is on top: append it last in the body, outside any element that makes a\nstacking context of its own.",
"name": "DexConfirmDialog",
"members": [
{
"kind": "method",
"name": "show",
"return": {
"type": {
"text": "Promise<string>"
}
},
"parameters": [
{
"name": "options",
"type": {
"text": "ConfirmOptions"
}
}
],
"description": "Opens the dialog with `options` and resolves to the id of the button pressed, or to\n`options.cancelId` on Escape, a click on the backdrop, close(), or the element leaving the\npage. A second show() while one is open answers the first with the first's `cancelId` and\nasks the second in its place. Focus opens on the first primary button, or with none on the\nfirst that is not a danger one, and returns, when the dialog closes, to the element that had\nit when the first of these questions was asked. On an element that is not on the page it\nresolves to `cancelId` at once."
},
{
"kind": "method",
"name": "prompt",
"return": {
"type": {
"text": "Promise<string | null>"
}
},
"parameters": [
{
"name": "options",
"type": {
"text": "PromptOptions"
}
}
],
"description": "Opens the dialog with a text field and resolves to the text typed, trimmed, when the primary\nbutton is pressed or Enter is pressed in the field (never blank); null on Cancel, Escape, a\nclick on the backdrop, close(), a show() or prompt() asked in its place, or the element leaving\nthe page. As show(), it answers a question still open with that question's cancel, opens\nfocused (on the field), keeps Tab inside, and gives the focus back when it closes."
},
{
"kind": "method",
"name": "close",
"return": {
"type": {
"text": "void"
}
},
"description": "Closes the dialog, answering show() with its `cancelId` and prompt() with null; does nothing while closed."
}
],
"superclass": {
"name": "LitElement",
"package": "lit"
},
"tagName": "dex-confirm-dialog",
"customElement": true,
"cssProperties": [
{
"name": "--dex-bg-hover",
"default": "#e8e8e8"
},
{
"name": "--dex-bg-primary",
"default": "#fff"
},
{
"name": "--dex-border-color",
"default": "#d0d0d0"
},
{
"name": "--dex-border-color-light",
"default": "#e0e0e0"
},
{
"name": "--dex-color-accent",
"default": "#0078d4"
},
{
"name": "--dex-color-accent-hover",
"default": "#005a9e"
},
{
"name": "--dex-color-error",
"default": "#d32f2f"
},
{
"name": "--dex-color-text",
"default": "#333"
},
{
"name": "--dex-color-text-secondary",
"default": "#555"
},
{
"name": "--dex-focus-ring",
"default": "0 0 0 2px rgba(0, 120, 212, 0.4)"
},
{
"name": "--dex-font-family",
"default": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
}
]
},
{
"kind": "function",
"name": "defineConfirmDialog",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "tag",
"default": "'dex-confirm-dialog'"
}
],
"description": "Registers the widget as `<dex-confirm-dialog>`, or under `tag`."
}
],
"exports": [
{
"kind": "js",
"name": "DexConfirmDialog",
"declaration": {
"name": "DexConfirmDialog",
"module": "dist/widgets/app-shell/dex-confirm-dialog.js"
}
},
{
"kind": "js",
"name": "defineConfirmDialog",
"declaration": {
"name": "defineConfirmDialog",
"module": "dist/widgets/app-shell/dex-confirm-dialog.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "dist/widgets/app-shell/dex-doc-tabs.js",
"declarations": [
{
"kind": "variable",
"name": "TAB_DRAG_TYPE",
"type": {
"text": "string"
},
"default": "'application/x-dex-tab'",
"description": "The type a tab's drag carries its id under. One of the app's own, so a drag of anything else (a\nfile from the desktop, text from another page) never reads as a tab. Exported for the part of an\napp that takes a tab dropped elsewhere (the documents' area of the shell, to split it)."
},
{
"kind": "class",
"description": "The row of tabs above an app's documents, one per open file, as `tabs` lists them, `active`\nmarking the one shown. It draws them and asks for everything else: a click (or Enter or Space)\nsends `dex-tab-select`, × (or a middle click, Delete or Backspace) `dex-tab-close`, a double-click\n`dex-tab-pin`, and a tab dropped on another `dex-tab-move`. Which tabs there are, in what\norder, and which is active stay the app's: nothing here changes `tabs` or `active`. A tab\ndropped on the row's empty end goes to its end. Rows of the same `group` (an app's two panes)\ntake each other's tabs: one dropped on a tab of the other lands before or after it, by the half\nof the tab the pointer is over, and the row it lands in sends `dex-tab-move`.\n\nA tab's menu is the app's too: a right-click on a tab (its × included), or Shift+F10 or the\nContextMenu key on the focused one, sends `dex-tab-menu` with where to show it, at the pointer or\nunder the tab, and the row draws no menu of its own. The browser's menu is kept off the tabs, and\nthe one a browser fires after a menu key asks nothing more; the row's empty end and the … button\nkeep the browser's.\n\nA tab's subtitle, when it has one, is drawn before its icon and label, smaller and muted: the\nfile, while the label names a part of it. A preview tab's label is italic; an unsaved one shows ●\nwhere its × is, until the pointer or the keyboard comes onto it. A row too long for its width\nscrolls sideways (a wheel scrolls it too), keeps the active tab in view, clear of the … button it\nthen offers, which lists every tab, as the row is drawn and as it is resized; a tab scrolled partly\nout past the row's start hides its ×, and no tab is wider than the row. The arrow keys move the\nfocus along the tabs, and Home and End to either end. A row `unfocused` (the row of a pane the\nuser is not in) marks its active tab in a muted grey rather than the accent.",
"name": "DexDocTabs",
"members": [
{
"kind": "field",
"name": "tabs",
"type": {
"text": "DocTab[]"
},
"default": "[]",
"description": "The tabs, in order: plain data, which the app replaces as files open, close and move. Default none."
},
{
"kind": "field",
"name": "active",
"type": {
"text": "string"
},
"default": "''",
"description": "The id of the tab shown, which is marked selected and scrolled into view. Default none. Attribute `active`.",
"attribute": "active",
"reflects": true
},
{
"kind": "field",
"name": "group",
"type": {
"text": "string"
},
"default": "''",
"description": "Rows of one page with the same group take each other's tabs (an app's two panes, side by\nside): a tab dragged from one and dropped on the other is that row's `dex-tab-move`, with an id\nnot in its `tabs`. Empty, the default: the row takes only its own tabs. Attribute `group`.",
"attribute": "group",
"reflects": true
},
{
"kind": "field",
"name": "unfocused",
"type": {
"text": "boolean"
},
"default": "false",
"description": "The row is of a pane the user is not in: its active tab's mark is drawn in a muted grey, the\naccent kept for the focused pane's row. Default false. Attribute `unfocused`.",
"attribute": "unfocused",
"reflects": true
},
{
"kind": "method",
"name": "focusActive",
"return": {
"type": {
"text": "void"
}
},
"description": "Puts the keyboard on the active tab, once it is drawn: an app's chord that takes the user to\nthis row's pane. Nothing for a row with no active tab."
}
],
"events": [
{
"name": "dex-tab-select",
"type": {
"text": "CustomEvent<TabSelectDetail>"
},
"description": "Show this tab: a click on it, Enter or Space on it, or its item in the … menu. Sent for the active tab too."
},
{
"name": "dex-tab-close",
"type": {
"text": "CustomEvent<TabCloseDetail>"
},
"description": "Close this tab: its ×, a middle click on it, or Delete (or Backspace) on it."
},
{
"name": "dex-tab-pin",
"type": {
"text": "CustomEvent<TabPinDetail>"
},
"description": "Keep this tab, no longer a preview: a double-click on it, whether it is a preview or not. Its\ntwo clicks have each sent `dex-tab-select` first."
},
{
"name": "dex-tab-move",
"type": {
"text": "CustomEvent<TabMoveDetail>"
},
"description": "Move this tab: it was dropped on the tab at `index`, or at the row's end. Remove it from\n`tabs`, then insert it at `index`; a tab of another row of the group, not in `tabs`, insert."
},
{
"name": "dex-tab-menu",
"type": {
"text": "CustomEvent<TabMenuDetail>"
},
"description": "A right-click on a tab, or Shift+F10 or the ContextMenu key on the focused one: show its menu. The browser's own menu is prevented."
}
],
"attributes": [
{
"name": "active",
"type": {
"text": "string"
},
"default": "''",
"description": "The id of the tab shown, which is marked selected and scrolled into view. Default none. Attribute `active`.",
"fieldName": "active"
},