@septkit/shell-lib 0.0.38 → 0.0.40
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/dist/index.js +740 -28
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function a(e) {
|
|
|
9
9
|
return i.some((t) => e.startsWith(t));
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region node_modules/.pnpm/@dialecte+core@0.
|
|
12
|
+
//#region node_modules/.pnpm/@dialecte+core@0.12.1/node_modules/@dialecte/core/dist/utils-Q5zsKl3Y.js
|
|
13
13
|
var o = "https://dialecte.github.io/core", s = /* @__PURE__ */ new Set([
|
|
14
14
|
"throwDialecteError",
|
|
15
15
|
"createDialecteError",
|
|
@@ -218,9 +218,9 @@ var o = "https://dialecte.github.io/core", s = /* @__PURE__ */ new Set([
|
|
|
218
218
|
code: "D3001",
|
|
219
219
|
message: "Invalid parent-child relationship",
|
|
220
220
|
explanation: {
|
|
221
|
-
when: "
|
|
222
|
-
fix: "Read the parent's children in the definition (`query.getDefinition`) and
|
|
223
|
-
docs: `${o}/api/transaction#
|
|
221
|
+
when: "`tx.move` was given a new parent whose definition does not hold the moved element's tag; a dialecte or app code raises it too when an element is placed under a parent the schema does not admit.",
|
|
222
|
+
fix: "Read the parent's children in the definition (`query.getDefinition`) and place the element under an admitted parent.",
|
|
223
|
+
docs: `${o}/api/transaction#move`
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
INVALID_ATTRIBUTE: {
|
|
@@ -234,13 +234,40 @@ var o = "https://dialecte.github.io/core", s = /* @__PURE__ */ new Set([
|
|
|
234
234
|
},
|
|
235
235
|
PROTECTED_ROOT: {
|
|
236
236
|
code: "D3003",
|
|
237
|
-
message: "Root element cannot be deleted",
|
|
237
|
+
message: "Root element cannot be deleted or moved",
|
|
238
238
|
explanation: {
|
|
239
|
-
when: "A transaction tried to delete the document's root element.",
|
|
240
|
-
fix: "Delete the root's children instead, or remove the whole document with `project.removeDocument`.",
|
|
239
|
+
when: "A transaction tried to delete or move the document's root element.",
|
|
240
|
+
fix: "Delete or move the root's children instead, or remove the whole document with `project.removeDocument`.",
|
|
241
241
|
docs: `${o}/api/transaction#delete`
|
|
242
242
|
}
|
|
243
243
|
},
|
|
244
|
+
MAX_OCCURRENCES_REACHED: {
|
|
245
|
+
code: "D3014",
|
|
246
|
+
message: "The parent already holds as many children of that tag as it may",
|
|
247
|
+
explanation: {
|
|
248
|
+
when: "`tx.move` was given a new parent that already holds the most children of the moved element's tag its definition allows (`maxOccurs`).",
|
|
249
|
+
fix: "Move or delete one of those children first, or choose another parent.",
|
|
250
|
+
docs: `${o}/api/transaction#move`
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
MOVE_INTO_OWN_SUBTREE: {
|
|
254
|
+
code: "D3015",
|
|
255
|
+
message: "An element cannot be moved under itself or one of its descendants",
|
|
256
|
+
explanation: {
|
|
257
|
+
when: "`tx.move` was given a new parent that is the moved element or lies inside its subtree.",
|
|
258
|
+
fix: "Choose a parent outside the moved subtree.",
|
|
259
|
+
docs: `${o}/api/transaction#move`
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
MOVE_BEFORE_NOT_SIBLING: {
|
|
263
|
+
code: "D3016",
|
|
264
|
+
message: "The element to move before is no child of the new parent with the same tag",
|
|
265
|
+
explanation: {
|
|
266
|
+
when: "`tx.move` was given a `before` that is not a child of the new parent with the moved element's tag.",
|
|
267
|
+
fix: "Pass as `before` a child of the new parent with the moved element's tag, or leave it out to place the element after the last one.",
|
|
268
|
+
docs: `${o}/api/transaction#move`
|
|
269
|
+
}
|
|
270
|
+
},
|
|
244
271
|
REQUIRED_ATTRIBUTE_MISSING: {
|
|
245
272
|
code: "D3004",
|
|
246
273
|
message: "Required attribute is missing",
|
|
@@ -268,6 +295,15 @@ var o = "https://dialecte.github.io/core", s = /* @__PURE__ */ new Set([
|
|
|
268
295
|
docs: `${o}/api/transaction#addchild`
|
|
269
296
|
}
|
|
270
297
|
},
|
|
298
|
+
NAMESPACE_DECLARATION_NOT_ALLOWED: {
|
|
299
|
+
code: "D3013",
|
|
300
|
+
message: "A namespace declaration cannot be written as an attribute",
|
|
301
|
+
explanation: {
|
|
302
|
+
when: "A write gave an attribute named `xmlns` or `xmlns:<prefix>`: a document declares its namespaces on export, from what its records use.",
|
|
303
|
+
fix: "Remove the declaration; give the name its namespace in full: `{ name, namespace: { prefix, uri } }`.",
|
|
304
|
+
docs: `${o}/api/transaction#addchild`
|
|
305
|
+
}
|
|
306
|
+
},
|
|
271
307
|
PREFIXED_ATTRIBUTE_NAME: {
|
|
272
308
|
code: "D3007",
|
|
273
309
|
message: "Authored attribute name must be a local name — pass the namespace separately as { name, namespace }, not a prefixed name",
|
|
@@ -578,16 +614,692 @@ function d(e) {
|
|
|
578
614
|
function f(e) {
|
|
579
615
|
return e ? s.has(e.slice(e.lastIndexOf(".") + 1)) : !1;
|
|
580
616
|
}
|
|
617
|
+
var p = [
|
|
618
|
+
[58, 58],
|
|
619
|
+
[65, 90],
|
|
620
|
+
[95, 95],
|
|
621
|
+
[97, 122],
|
|
622
|
+
[192, 214],
|
|
623
|
+
[216, 246],
|
|
624
|
+
[248, 305],
|
|
625
|
+
[308, 318],
|
|
626
|
+
[321, 328],
|
|
627
|
+
[330, 382],
|
|
628
|
+
[384, 451],
|
|
629
|
+
[461, 496],
|
|
630
|
+
[500, 501],
|
|
631
|
+
[506, 535],
|
|
632
|
+
[592, 680],
|
|
633
|
+
[699, 705],
|
|
634
|
+
[902, 902],
|
|
635
|
+
[904, 906],
|
|
636
|
+
[908, 908],
|
|
637
|
+
[910, 929],
|
|
638
|
+
[931, 974],
|
|
639
|
+
[976, 982],
|
|
640
|
+
[986, 986],
|
|
641
|
+
[988, 988],
|
|
642
|
+
[990, 990],
|
|
643
|
+
[992, 992],
|
|
644
|
+
[994, 1011],
|
|
645
|
+
[1025, 1036],
|
|
646
|
+
[1038, 1103],
|
|
647
|
+
[1105, 1116],
|
|
648
|
+
[1118, 1153],
|
|
649
|
+
[1168, 1220],
|
|
650
|
+
[1223, 1224],
|
|
651
|
+
[1227, 1228],
|
|
652
|
+
[1232, 1259],
|
|
653
|
+
[1262, 1269],
|
|
654
|
+
[1272, 1273],
|
|
655
|
+
[1329, 1366],
|
|
656
|
+
[1369, 1369],
|
|
657
|
+
[1377, 1414],
|
|
658
|
+
[1488, 1514],
|
|
659
|
+
[1520, 1522],
|
|
660
|
+
[1569, 1594],
|
|
661
|
+
[1601, 1610],
|
|
662
|
+
[1649, 1719],
|
|
663
|
+
[1722, 1726],
|
|
664
|
+
[1728, 1742],
|
|
665
|
+
[1744, 1747],
|
|
666
|
+
[1749, 1749],
|
|
667
|
+
[1765, 1766],
|
|
668
|
+
[2309, 2361],
|
|
669
|
+
[2365, 2365],
|
|
670
|
+
[2392, 2401],
|
|
671
|
+
[2437, 2444],
|
|
672
|
+
[2447, 2448],
|
|
673
|
+
[2451, 2472],
|
|
674
|
+
[2474, 2480],
|
|
675
|
+
[2482, 2482],
|
|
676
|
+
[2486, 2489],
|
|
677
|
+
[2524, 2525],
|
|
678
|
+
[2527, 2529],
|
|
679
|
+
[2544, 2545],
|
|
680
|
+
[2565, 2570],
|
|
681
|
+
[2575, 2576],
|
|
682
|
+
[2579, 2600],
|
|
683
|
+
[2602, 2608],
|
|
684
|
+
[2610, 2611],
|
|
685
|
+
[2613, 2614],
|
|
686
|
+
[2616, 2617],
|
|
687
|
+
[2649, 2652],
|
|
688
|
+
[2654, 2654],
|
|
689
|
+
[2674, 2676],
|
|
690
|
+
[2693, 2699],
|
|
691
|
+
[2701, 2701],
|
|
692
|
+
[2703, 2705],
|
|
693
|
+
[2707, 2728],
|
|
694
|
+
[2730, 2736],
|
|
695
|
+
[2738, 2739],
|
|
696
|
+
[2741, 2745],
|
|
697
|
+
[2749, 2749],
|
|
698
|
+
[2784, 2784],
|
|
699
|
+
[2821, 2828],
|
|
700
|
+
[2831, 2832],
|
|
701
|
+
[2835, 2856],
|
|
702
|
+
[2858, 2864],
|
|
703
|
+
[2866, 2867],
|
|
704
|
+
[2870, 2873],
|
|
705
|
+
[2877, 2877],
|
|
706
|
+
[2908, 2909],
|
|
707
|
+
[2911, 2913],
|
|
708
|
+
[2949, 2954],
|
|
709
|
+
[2958, 2960],
|
|
710
|
+
[2962, 2965],
|
|
711
|
+
[2969, 2970],
|
|
712
|
+
[2972, 2972],
|
|
713
|
+
[2974, 2975],
|
|
714
|
+
[2979, 2980],
|
|
715
|
+
[2984, 2986],
|
|
716
|
+
[2990, 2997],
|
|
717
|
+
[2999, 3001],
|
|
718
|
+
[3077, 3084],
|
|
719
|
+
[3086, 3088],
|
|
720
|
+
[3090, 3112],
|
|
721
|
+
[3114, 3123],
|
|
722
|
+
[3125, 3129],
|
|
723
|
+
[3168, 3169],
|
|
724
|
+
[3205, 3212],
|
|
725
|
+
[3214, 3216],
|
|
726
|
+
[3218, 3240],
|
|
727
|
+
[3242, 3251],
|
|
728
|
+
[3253, 3257],
|
|
729
|
+
[3294, 3294],
|
|
730
|
+
[3296, 3297],
|
|
731
|
+
[3333, 3340],
|
|
732
|
+
[3342, 3344],
|
|
733
|
+
[3346, 3368],
|
|
734
|
+
[3370, 3385],
|
|
735
|
+
[3424, 3425],
|
|
736
|
+
[3585, 3630],
|
|
737
|
+
[3632, 3632],
|
|
738
|
+
[3634, 3635],
|
|
739
|
+
[3648, 3653],
|
|
740
|
+
[3713, 3714],
|
|
741
|
+
[3716, 3716],
|
|
742
|
+
[3719, 3720],
|
|
743
|
+
[3722, 3722],
|
|
744
|
+
[3725, 3725],
|
|
745
|
+
[3732, 3735],
|
|
746
|
+
[3737, 3743],
|
|
747
|
+
[3745, 3747],
|
|
748
|
+
[3749, 3749],
|
|
749
|
+
[3751, 3751],
|
|
750
|
+
[3754, 3755],
|
|
751
|
+
[3757, 3758],
|
|
752
|
+
[3760, 3760],
|
|
753
|
+
[3762, 3763],
|
|
754
|
+
[3773, 3773],
|
|
755
|
+
[3776, 3780],
|
|
756
|
+
[3904, 3911],
|
|
757
|
+
[3913, 3945],
|
|
758
|
+
[4256, 4293],
|
|
759
|
+
[4304, 4342],
|
|
760
|
+
[4352, 4352],
|
|
761
|
+
[4354, 4355],
|
|
762
|
+
[4357, 4359],
|
|
763
|
+
[4361, 4361],
|
|
764
|
+
[4363, 4364],
|
|
765
|
+
[4366, 4370],
|
|
766
|
+
[4412, 4412],
|
|
767
|
+
[4414, 4414],
|
|
768
|
+
[4416, 4416],
|
|
769
|
+
[4428, 4428],
|
|
770
|
+
[4430, 4430],
|
|
771
|
+
[4432, 4432],
|
|
772
|
+
[4436, 4437],
|
|
773
|
+
[4441, 4441],
|
|
774
|
+
[4447, 4449],
|
|
775
|
+
[4451, 4451],
|
|
776
|
+
[4453, 4453],
|
|
777
|
+
[4455, 4455],
|
|
778
|
+
[4457, 4457],
|
|
779
|
+
[4461, 4462],
|
|
780
|
+
[4466, 4467],
|
|
781
|
+
[4469, 4469],
|
|
782
|
+
[4510, 4510],
|
|
783
|
+
[4520, 4520],
|
|
784
|
+
[4523, 4523],
|
|
785
|
+
[4526, 4527],
|
|
786
|
+
[4535, 4536],
|
|
787
|
+
[4538, 4538],
|
|
788
|
+
[4540, 4546],
|
|
789
|
+
[4587, 4587],
|
|
790
|
+
[4592, 4592],
|
|
791
|
+
[4601, 4601],
|
|
792
|
+
[7680, 7835],
|
|
793
|
+
[7840, 7929],
|
|
794
|
+
[7936, 7957],
|
|
795
|
+
[7960, 7965],
|
|
796
|
+
[7968, 8005],
|
|
797
|
+
[8008, 8013],
|
|
798
|
+
[8016, 8023],
|
|
799
|
+
[8025, 8025],
|
|
800
|
+
[8027, 8027],
|
|
801
|
+
[8029, 8029],
|
|
802
|
+
[8031, 8061],
|
|
803
|
+
[8064, 8116],
|
|
804
|
+
[8118, 8124],
|
|
805
|
+
[8126, 8126],
|
|
806
|
+
[8130, 8132],
|
|
807
|
+
[8134, 8140],
|
|
808
|
+
[8144, 8147],
|
|
809
|
+
[8150, 8155],
|
|
810
|
+
[8160, 8172],
|
|
811
|
+
[8178, 8180],
|
|
812
|
+
[8182, 8188],
|
|
813
|
+
[8486, 8486],
|
|
814
|
+
[8490, 8491],
|
|
815
|
+
[8494, 8494],
|
|
816
|
+
[8576, 8578],
|
|
817
|
+
[12295, 12295],
|
|
818
|
+
[12321, 12329],
|
|
819
|
+
[12353, 12436],
|
|
820
|
+
[12449, 12538],
|
|
821
|
+
[12549, 12588],
|
|
822
|
+
[19968, 40869],
|
|
823
|
+
[44032, 55203]
|
|
824
|
+
], m = [
|
|
825
|
+
[45, 46],
|
|
826
|
+
[48, 58],
|
|
827
|
+
[65, 90],
|
|
828
|
+
[95, 95],
|
|
829
|
+
[97, 122],
|
|
830
|
+
[183, 183],
|
|
831
|
+
[192, 214],
|
|
832
|
+
[216, 246],
|
|
833
|
+
[248, 305],
|
|
834
|
+
[308, 318],
|
|
835
|
+
[321, 328],
|
|
836
|
+
[330, 382],
|
|
837
|
+
[384, 451],
|
|
838
|
+
[461, 496],
|
|
839
|
+
[500, 501],
|
|
840
|
+
[506, 535],
|
|
841
|
+
[592, 680],
|
|
842
|
+
[699, 705],
|
|
843
|
+
[720, 721],
|
|
844
|
+
[768, 837],
|
|
845
|
+
[864, 865],
|
|
846
|
+
[902, 906],
|
|
847
|
+
[908, 908],
|
|
848
|
+
[910, 929],
|
|
849
|
+
[931, 974],
|
|
850
|
+
[976, 982],
|
|
851
|
+
[986, 986],
|
|
852
|
+
[988, 988],
|
|
853
|
+
[990, 990],
|
|
854
|
+
[992, 992],
|
|
855
|
+
[994, 1011],
|
|
856
|
+
[1025, 1036],
|
|
857
|
+
[1038, 1103],
|
|
858
|
+
[1105, 1116],
|
|
859
|
+
[1118, 1153],
|
|
860
|
+
[1155, 1158],
|
|
861
|
+
[1168, 1220],
|
|
862
|
+
[1223, 1224],
|
|
863
|
+
[1227, 1228],
|
|
864
|
+
[1232, 1259],
|
|
865
|
+
[1262, 1269],
|
|
866
|
+
[1272, 1273],
|
|
867
|
+
[1329, 1366],
|
|
868
|
+
[1369, 1369],
|
|
869
|
+
[1377, 1414],
|
|
870
|
+
[1425, 1441],
|
|
871
|
+
[1443, 1465],
|
|
872
|
+
[1467, 1469],
|
|
873
|
+
[1471, 1471],
|
|
874
|
+
[1473, 1474],
|
|
875
|
+
[1476, 1476],
|
|
876
|
+
[1488, 1514],
|
|
877
|
+
[1520, 1522],
|
|
878
|
+
[1569, 1594],
|
|
879
|
+
[1600, 1618],
|
|
880
|
+
[1632, 1641],
|
|
881
|
+
[1648, 1719],
|
|
882
|
+
[1722, 1726],
|
|
883
|
+
[1728, 1742],
|
|
884
|
+
[1744, 1747],
|
|
885
|
+
[1749, 1768],
|
|
886
|
+
[1770, 1773],
|
|
887
|
+
[1776, 1785],
|
|
888
|
+
[2305, 2307],
|
|
889
|
+
[2309, 2361],
|
|
890
|
+
[2364, 2381],
|
|
891
|
+
[2385, 2388],
|
|
892
|
+
[2392, 2403],
|
|
893
|
+
[2406, 2415],
|
|
894
|
+
[2433, 2435],
|
|
895
|
+
[2437, 2444],
|
|
896
|
+
[2447, 2448],
|
|
897
|
+
[2451, 2472],
|
|
898
|
+
[2474, 2480],
|
|
899
|
+
[2482, 2482],
|
|
900
|
+
[2486, 2489],
|
|
901
|
+
[2492, 2492],
|
|
902
|
+
[2494, 2500],
|
|
903
|
+
[2503, 2504],
|
|
904
|
+
[2507, 2509],
|
|
905
|
+
[2519, 2519],
|
|
906
|
+
[2524, 2525],
|
|
907
|
+
[2527, 2531],
|
|
908
|
+
[2534, 2545],
|
|
909
|
+
[2562, 2562],
|
|
910
|
+
[2565, 2570],
|
|
911
|
+
[2575, 2576],
|
|
912
|
+
[2579, 2600],
|
|
913
|
+
[2602, 2608],
|
|
914
|
+
[2610, 2611],
|
|
915
|
+
[2613, 2614],
|
|
916
|
+
[2616, 2617],
|
|
917
|
+
[2620, 2620],
|
|
918
|
+
[2622, 2626],
|
|
919
|
+
[2631, 2632],
|
|
920
|
+
[2635, 2637],
|
|
921
|
+
[2649, 2652],
|
|
922
|
+
[2654, 2654],
|
|
923
|
+
[2662, 2676],
|
|
924
|
+
[2689, 2691],
|
|
925
|
+
[2693, 2699],
|
|
926
|
+
[2701, 2701],
|
|
927
|
+
[2703, 2705],
|
|
928
|
+
[2707, 2728],
|
|
929
|
+
[2730, 2736],
|
|
930
|
+
[2738, 2739],
|
|
931
|
+
[2741, 2745],
|
|
932
|
+
[2748, 2757],
|
|
933
|
+
[2759, 2761],
|
|
934
|
+
[2763, 2765],
|
|
935
|
+
[2784, 2784],
|
|
936
|
+
[2790, 2799],
|
|
937
|
+
[2817, 2819],
|
|
938
|
+
[2821, 2828],
|
|
939
|
+
[2831, 2832],
|
|
940
|
+
[2835, 2856],
|
|
941
|
+
[2858, 2864],
|
|
942
|
+
[2866, 2867],
|
|
943
|
+
[2870, 2873],
|
|
944
|
+
[2876, 2883],
|
|
945
|
+
[2887, 2888],
|
|
946
|
+
[2891, 2893],
|
|
947
|
+
[2902, 2903],
|
|
948
|
+
[2908, 2909],
|
|
949
|
+
[2911, 2913],
|
|
950
|
+
[2918, 2927],
|
|
951
|
+
[2946, 2947],
|
|
952
|
+
[2949, 2954],
|
|
953
|
+
[2958, 2960],
|
|
954
|
+
[2962, 2965],
|
|
955
|
+
[2969, 2970],
|
|
956
|
+
[2972, 2972],
|
|
957
|
+
[2974, 2975],
|
|
958
|
+
[2979, 2980],
|
|
959
|
+
[2984, 2986],
|
|
960
|
+
[2990, 2997],
|
|
961
|
+
[2999, 3001],
|
|
962
|
+
[3006, 3010],
|
|
963
|
+
[3014, 3016],
|
|
964
|
+
[3018, 3021],
|
|
965
|
+
[3031, 3031],
|
|
966
|
+
[3047, 3055],
|
|
967
|
+
[3073, 3075],
|
|
968
|
+
[3077, 3084],
|
|
969
|
+
[3086, 3088],
|
|
970
|
+
[3090, 3112],
|
|
971
|
+
[3114, 3123],
|
|
972
|
+
[3125, 3129],
|
|
973
|
+
[3134, 3140],
|
|
974
|
+
[3142, 3144],
|
|
975
|
+
[3146, 3149],
|
|
976
|
+
[3157, 3158],
|
|
977
|
+
[3168, 3169],
|
|
978
|
+
[3174, 3183],
|
|
979
|
+
[3202, 3203],
|
|
980
|
+
[3205, 3212],
|
|
981
|
+
[3214, 3216],
|
|
982
|
+
[3218, 3240],
|
|
983
|
+
[3242, 3251],
|
|
984
|
+
[3253, 3257],
|
|
985
|
+
[3262, 3268],
|
|
986
|
+
[3270, 3272],
|
|
987
|
+
[3274, 3277],
|
|
988
|
+
[3285, 3286],
|
|
989
|
+
[3294, 3294],
|
|
990
|
+
[3296, 3297],
|
|
991
|
+
[3302, 3311],
|
|
992
|
+
[3330, 3331],
|
|
993
|
+
[3333, 3340],
|
|
994
|
+
[3342, 3344],
|
|
995
|
+
[3346, 3368],
|
|
996
|
+
[3370, 3385],
|
|
997
|
+
[3390, 3395],
|
|
998
|
+
[3398, 3400],
|
|
999
|
+
[3402, 3405],
|
|
1000
|
+
[3415, 3415],
|
|
1001
|
+
[3424, 3425],
|
|
1002
|
+
[3430, 3439],
|
|
1003
|
+
[3585, 3630],
|
|
1004
|
+
[3632, 3642],
|
|
1005
|
+
[3648, 3662],
|
|
1006
|
+
[3664, 3673],
|
|
1007
|
+
[3713, 3714],
|
|
1008
|
+
[3716, 3716],
|
|
1009
|
+
[3719, 3720],
|
|
1010
|
+
[3722, 3722],
|
|
1011
|
+
[3725, 3725],
|
|
1012
|
+
[3732, 3735],
|
|
1013
|
+
[3737, 3743],
|
|
1014
|
+
[3745, 3747],
|
|
1015
|
+
[3749, 3749],
|
|
1016
|
+
[3751, 3751],
|
|
1017
|
+
[3754, 3755],
|
|
1018
|
+
[3757, 3758],
|
|
1019
|
+
[3760, 3769],
|
|
1020
|
+
[3771, 3773],
|
|
1021
|
+
[3776, 3780],
|
|
1022
|
+
[3782, 3782],
|
|
1023
|
+
[3784, 3789],
|
|
1024
|
+
[3792, 3801],
|
|
1025
|
+
[3864, 3865],
|
|
1026
|
+
[3872, 3881],
|
|
1027
|
+
[3893, 3893],
|
|
1028
|
+
[3895, 3895],
|
|
1029
|
+
[3897, 3897],
|
|
1030
|
+
[3902, 3911],
|
|
1031
|
+
[3913, 3945],
|
|
1032
|
+
[3953, 3972],
|
|
1033
|
+
[3974, 3979],
|
|
1034
|
+
[3984, 3989],
|
|
1035
|
+
[3991, 3991],
|
|
1036
|
+
[3993, 4013],
|
|
1037
|
+
[4017, 4023],
|
|
1038
|
+
[4025, 4025],
|
|
1039
|
+
[4256, 4293],
|
|
1040
|
+
[4304, 4342],
|
|
1041
|
+
[4352, 4352],
|
|
1042
|
+
[4354, 4355],
|
|
1043
|
+
[4357, 4359],
|
|
1044
|
+
[4361, 4361],
|
|
1045
|
+
[4363, 4364],
|
|
1046
|
+
[4366, 4370],
|
|
1047
|
+
[4412, 4412],
|
|
1048
|
+
[4414, 4414],
|
|
1049
|
+
[4416, 4416],
|
|
1050
|
+
[4428, 4428],
|
|
1051
|
+
[4430, 4430],
|
|
1052
|
+
[4432, 4432],
|
|
1053
|
+
[4436, 4437],
|
|
1054
|
+
[4441, 4441],
|
|
1055
|
+
[4447, 4449],
|
|
1056
|
+
[4451, 4451],
|
|
1057
|
+
[4453, 4453],
|
|
1058
|
+
[4455, 4455],
|
|
1059
|
+
[4457, 4457],
|
|
1060
|
+
[4461, 4462],
|
|
1061
|
+
[4466, 4467],
|
|
1062
|
+
[4469, 4469],
|
|
1063
|
+
[4510, 4510],
|
|
1064
|
+
[4520, 4520],
|
|
1065
|
+
[4523, 4523],
|
|
1066
|
+
[4526, 4527],
|
|
1067
|
+
[4535, 4536],
|
|
1068
|
+
[4538, 4538],
|
|
1069
|
+
[4540, 4546],
|
|
1070
|
+
[4587, 4587],
|
|
1071
|
+
[4592, 4592],
|
|
1072
|
+
[4601, 4601],
|
|
1073
|
+
[7680, 7835],
|
|
1074
|
+
[7840, 7929],
|
|
1075
|
+
[7936, 7957],
|
|
1076
|
+
[7960, 7965],
|
|
1077
|
+
[7968, 8005],
|
|
1078
|
+
[8008, 8013],
|
|
1079
|
+
[8016, 8023],
|
|
1080
|
+
[8025, 8025],
|
|
1081
|
+
[8027, 8027],
|
|
1082
|
+
[8029, 8029],
|
|
1083
|
+
[8031, 8061],
|
|
1084
|
+
[8064, 8116],
|
|
1085
|
+
[8118, 8124],
|
|
1086
|
+
[8126, 8126],
|
|
1087
|
+
[8130, 8132],
|
|
1088
|
+
[8134, 8140],
|
|
1089
|
+
[8144, 8147],
|
|
1090
|
+
[8150, 8155],
|
|
1091
|
+
[8160, 8172],
|
|
1092
|
+
[8178, 8180],
|
|
1093
|
+
[8182, 8188],
|
|
1094
|
+
[8400, 8412],
|
|
1095
|
+
[8417, 8417],
|
|
1096
|
+
[8486, 8486],
|
|
1097
|
+
[8490, 8491],
|
|
1098
|
+
[8494, 8494],
|
|
1099
|
+
[8576, 8578],
|
|
1100
|
+
[12293, 12293],
|
|
1101
|
+
[12295, 12295],
|
|
1102
|
+
[12321, 12335],
|
|
1103
|
+
[12337, 12341],
|
|
1104
|
+
[12353, 12436],
|
|
1105
|
+
[12441, 12442],
|
|
1106
|
+
[12445, 12446],
|
|
1107
|
+
[12449, 12538],
|
|
1108
|
+
[12540, 12542],
|
|
1109
|
+
[12549, 12588],
|
|
1110
|
+
[19968, 40869],
|
|
1111
|
+
[44032, 55203]
|
|
1112
|
+
];
|
|
1113
|
+
RegExp(`^${h(p)}${h(m)}*$`, "u"), RegExp(`^${h(m)}+$`, "u");
|
|
1114
|
+
function h(e) {
|
|
1115
|
+
return `[${e.map(([e, t]) => e === t ? g(e) : `${g(e)}-${g(t)}`).join("")}]`;
|
|
1116
|
+
}
|
|
1117
|
+
function g(e) {
|
|
1118
|
+
return `\\u{${e.toString(16)}}`;
|
|
1119
|
+
}
|
|
581
1120
|
`${{
|
|
582
1121
|
uri: "http://dialecte.dev/XML/DEV",
|
|
583
1122
|
prefix: "dev"
|
|
584
1123
|
}.prefix}`;
|
|
585
|
-
var
|
|
1124
|
+
var _ = {
|
|
586
1125
|
uri: "http://www.w3.org/2001/XMLSchema-instance",
|
|
587
1126
|
prefix: "xsi"
|
|
588
1127
|
};
|
|
589
|
-
`${
|
|
590
|
-
|
|
1128
|
+
`${_.prefix}${_.uri}`;
|
|
1129
|
+
var v = /^([+-]?)([0-9]*)(?:\.([0-9]*))?$/, y = /^[+-]?[0-9]+$/, b = /^(?:[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?|-?INF|NaN)$/, x = "(?<year>-?(?:[1-9][0-9]{3,}|0[0-9]{3}))", S = "(?<month>[0-9]{2})", C = "(?<day>[0-9]{2})", w = "(?<hour>[0-9]{2}):(?<minute>[0-9]{2}):(?<second>[0-9]{2}(?:\\.[0-9]+)?)", T = "(?<zone>Z|[+-][0-9]{2}:[0-9]{2})?";
|
|
1130
|
+
function E(e) {
|
|
1131
|
+
return RegExp(`^${e}${T}$`);
|
|
1132
|
+
}
|
|
1133
|
+
var D = {
|
|
1134
|
+
dateTime: E(`${x}-${S}-${C}T${w}`),
|
|
1135
|
+
date: E(`${x}-${S}-${C}`),
|
|
1136
|
+
time: E(w),
|
|
1137
|
+
gYearMonth: E(`${x}-${S}`),
|
|
1138
|
+
gYear: E(x),
|
|
1139
|
+
gMonthDay: E(`--${S}-${C}`),
|
|
1140
|
+
gMonth: E(`--${S}`),
|
|
1141
|
+
gDay: E(`---${C}`)
|
|
1142
|
+
}, O = BigInt(1972);
|
|
1143
|
+
function k(e) {
|
|
1144
|
+
let t = v.exec(e);
|
|
1145
|
+
if (t === null) return;
|
|
1146
|
+
let [, n, r = "", i = ""] = t;
|
|
1147
|
+
if (r === "" && i === "") return;
|
|
1148
|
+
let a = i.replace(/0+$/, ""), o = BigInt(`${r}${a}` || "0");
|
|
1149
|
+
return {
|
|
1150
|
+
unscaled: n === "-" ? -o : o,
|
|
1151
|
+
scale: a.length
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
function A(e) {
|
|
1155
|
+
if (y.test(e)) return {
|
|
1156
|
+
unscaled: BigInt(e),
|
|
1157
|
+
scale: 0
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
function j(e) {
|
|
1161
|
+
let { left: t, right: n } = e, r = Math.max(t.scale, n.scale), i = t.unscaled * BigInt(10) ** BigInt(r - t.scale), a = n.unscaled * BigInt(10) ** BigInt(r - n.scale);
|
|
1162
|
+
return i === a ? 0 : i < a ? -1 : 1;
|
|
1163
|
+
}
|
|
1164
|
+
function M(e) {
|
|
1165
|
+
let { value: t, min: n, max: r } = e;
|
|
1166
|
+
return !(n !== void 0 && j({
|
|
1167
|
+
left: t,
|
|
1168
|
+
right: {
|
|
1169
|
+
unscaled: n,
|
|
1170
|
+
scale: 0
|
|
1171
|
+
}
|
|
1172
|
+
}) < 0 || r !== void 0 && j({
|
|
1173
|
+
left: t,
|
|
1174
|
+
right: {
|
|
1175
|
+
unscaled: r,
|
|
1176
|
+
scale: 0
|
|
1177
|
+
}
|
|
1178
|
+
}) > 0);
|
|
1179
|
+
}
|
|
1180
|
+
function N(e) {
|
|
1181
|
+
let { terms: t } = e, n = Math.max(0, ...t.map((e) => e.scale));
|
|
1182
|
+
return {
|
|
1183
|
+
unscaled: t.reduce((e, t) => e + t.unscaled * BigInt(10) ** BigInt(n - t.scale), BigInt(0)),
|
|
1184
|
+
scale: n
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
function P(e) {
|
|
1188
|
+
return {
|
|
1189
|
+
unscaled: e,
|
|
1190
|
+
scale: 0
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
function F(e) {
|
|
1194
|
+
let t = e.min === void 0 ? void 0 : BigInt(e.min), n = e.max === void 0 ? void 0 : BigInt(e.max);
|
|
1195
|
+
return function({ lexical: e }) {
|
|
1196
|
+
let r = A(e);
|
|
1197
|
+
if (r !== void 0 && M({
|
|
1198
|
+
value: r,
|
|
1199
|
+
min: t,
|
|
1200
|
+
max: n
|
|
1201
|
+
})) return {
|
|
1202
|
+
kind: "decimal",
|
|
1203
|
+
value: r
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function I(e) {
|
|
1208
|
+
let { primitive: t } = e, n = D[t];
|
|
1209
|
+
return function({ lexical: e }) {
|
|
1210
|
+
let r = n?.exec(e)?.groups;
|
|
1211
|
+
if (r !== void 0) return z({
|
|
1212
|
+
primitive: t,
|
|
1213
|
+
parts: r
|
|
1214
|
+
});
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
function L(e) {
|
|
1218
|
+
let { year: t, month: n } = e;
|
|
1219
|
+
return n === 2 ? V(t) ? 29 : 28 : [
|
|
1220
|
+
4,
|
|
1221
|
+
6,
|
|
1222
|
+
9,
|
|
1223
|
+
11
|
|
1224
|
+
].includes(n) ? 30 : 31;
|
|
1225
|
+
}
|
|
1226
|
+
function R(e) {
|
|
1227
|
+
let { year: t, month: n, day: r, seconds: i } = e;
|
|
1228
|
+
return N({ terms: [P(H({
|
|
1229
|
+
year: t,
|
|
1230
|
+
month: n,
|
|
1231
|
+
day: r
|
|
1232
|
+
}) * BigInt(86400)), i] });
|
|
1233
|
+
}
|
|
1234
|
+
function z(e) {
|
|
1235
|
+
let { primitive: t, parts: n } = e, r = n.year === void 0 ? O : BigInt(n.year), i = n.month === void 0 ? 1 : Number(n.month), a = n.day === void 0 ? 1 : Number(n.day), o = Number(n.hour ?? 0), s = Number(n.minute ?? 0), c = k(n.second ?? "0");
|
|
1236
|
+
if (r === BigInt(0) || i < 1 || i > 12 || c === void 0 || a < 1 || a > L({
|
|
1237
|
+
year: r,
|
|
1238
|
+
month: i
|
|
1239
|
+
}) || s > 59 || c.unscaled >= BigInt(60) * BigInt(10) ** BigInt(c.scale) || o > 24 || o === 24 && (s !== 0 || c.unscaled !== BigInt(0))) return;
|
|
1240
|
+
let l = B(n.zone);
|
|
1241
|
+
return l === null ? void 0 : {
|
|
1242
|
+
kind: "dateTime",
|
|
1243
|
+
primitive: t,
|
|
1244
|
+
seconds: R({
|
|
1245
|
+
year: r,
|
|
1246
|
+
month: i,
|
|
1247
|
+
day: a,
|
|
1248
|
+
seconds: N({ terms: [P(BigInt(o * 3600 + s * 60 - (l ?? 0) * 60)), c] })
|
|
1249
|
+
}),
|
|
1250
|
+
zoned: l !== void 0
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
function B(e) {
|
|
1254
|
+
if (e === void 0) return;
|
|
1255
|
+
if (e === "Z") return 0;
|
|
1256
|
+
let t = Number(e.slice(1, 3)), n = Number(e.slice(4, 6));
|
|
1257
|
+
return n > 59 || t > 14 || t === 14 && n !== 0 ? null : (e.startsWith("-") ? -1 : 1) * (t * 60 + n);
|
|
1258
|
+
}
|
|
1259
|
+
function V(e) {
|
|
1260
|
+
return e % BigInt(4) === BigInt(0) && (e % BigInt(100) !== BigInt(0) || e % BigInt(400) === BigInt(0));
|
|
1261
|
+
}
|
|
1262
|
+
function H(e) {
|
|
1263
|
+
let { month: t, day: n } = e, r = t <= 2 ? e.year - BigInt(1) : e.year, i = (r >= BigInt(0) ? r : r - BigInt(399)) / BigInt(400), a = r - i * BigInt(400), o = BigInt(Math.floor((153 * (t > 2 ? t - 3 : t + 9) + 2) / 5) + n - 1), s = a * BigInt(365) + a / BigInt(4) - a / BigInt(100) + o;
|
|
1264
|
+
return i * BigInt(146097) + s - BigInt(719468);
|
|
1265
|
+
}
|
|
1266
|
+
function U(e) {
|
|
1267
|
+
let { single: t } = e;
|
|
1268
|
+
return function({ lexical: e }) {
|
|
1269
|
+
if (!b.test(e)) return;
|
|
1270
|
+
let n = e.endsWith("INF") ? e.startsWith("-") ? -Infinity : Infinity : Number(e);
|
|
1271
|
+
return {
|
|
1272
|
+
kind: "float",
|
|
1273
|
+
value: t ? Math.fround(n) : n
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
U({ single: !0 }), U({ single: !1 }), I({ primitive: "dateTime" }), I({ primitive: "date" }), I({ primitive: "time" }), I({ primitive: "gYearMonth" }), I({ primitive: "gYear" }), I({ primitive: "gMonthDay" }), I({ primitive: "gMonth" }), I({ primitive: "gDay" }), F({}), F({ max: "0" }), F({ max: "-1" }), F({ min: "0" }), F({ min: "1" }), F({
|
|
1278
|
+
min: "-9223372036854775808",
|
|
1279
|
+
max: "9223372036854775807"
|
|
1280
|
+
}), F({
|
|
1281
|
+
min: "-2147483648",
|
|
1282
|
+
max: "2147483647"
|
|
1283
|
+
}), F({
|
|
1284
|
+
min: "-32768",
|
|
1285
|
+
max: "32767"
|
|
1286
|
+
}), F({
|
|
1287
|
+
min: "-128",
|
|
1288
|
+
max: "127"
|
|
1289
|
+
}), F({
|
|
1290
|
+
min: "0",
|
|
1291
|
+
max: "18446744073709551615"
|
|
1292
|
+
}), F({
|
|
1293
|
+
min: "0",
|
|
1294
|
+
max: "4294967295"
|
|
1295
|
+
}), F({
|
|
1296
|
+
min: "0",
|
|
1297
|
+
max: "65535"
|
|
1298
|
+
}), F({
|
|
1299
|
+
min: "0",
|
|
1300
|
+
max: "255"
|
|
1301
|
+
}), BigInt(14) * BigInt(3600), `${_.prefix}`;
|
|
1302
|
+
function W(e, t) {
|
|
591
1303
|
if (e) return;
|
|
592
1304
|
let { detail: n, key: r = "ASSERTION_FAILED", ref: i, meta: a } = t;
|
|
593
1305
|
l(r, {
|
|
@@ -598,30 +1310,30 @@ function m(e, t) {
|
|
|
598
1310
|
}
|
|
599
1311
|
//#endregion
|
|
600
1312
|
//#region src/shell-context.ts
|
|
601
|
-
var
|
|
602
|
-
function
|
|
603
|
-
|
|
1313
|
+
var G = null;
|
|
1314
|
+
function K(e) {
|
|
1315
|
+
G = e;
|
|
604
1316
|
}
|
|
605
|
-
function
|
|
606
|
-
|
|
1317
|
+
function q() {
|
|
1318
|
+
G = null;
|
|
607
1319
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
1320
|
+
function J() {
|
|
1321
|
+
return W(G, { detail: "getProject: shell context not set. Call setShellContext(api) before app.mount()." }), G.project;
|
|
610
1322
|
}
|
|
611
|
-
function
|
|
612
|
-
return
|
|
1323
|
+
function Y() {
|
|
1324
|
+
return W(G, { detail: "getActiveDocumentId: shell context not set. Call setShellContext(api) before app.mount()." }), G.activeDocumentId;
|
|
613
1325
|
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
1326
|
+
function X() {
|
|
1327
|
+
return W(G, { detail: "getCommands: shell context not set. Call setShellContext(api) before app.mount()." }), G.commands;
|
|
616
1328
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
1329
|
+
function Z() {
|
|
1330
|
+
return W(G, { detail: "getStorageSources: shell context not set. Call setShellContext(api) before app.mount()." }), W(G.storageSources, { detail: "getStorageSources: no storage sources provided by the shell." }), G.storageSources;
|
|
619
1331
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
1332
|
+
function Q() {
|
|
1333
|
+
return W(G, { detail: "getPwa: shell context not set. Call setShellContext(api) before app.mount()." }), W(G.pwa, { detail: "getPwa: no PWA surface provided by the shell." }), G.pwa;
|
|
622
1334
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
1335
|
+
function $() {
|
|
1336
|
+
return G?.projectStorage ?? { type: "local" };
|
|
625
1337
|
}
|
|
626
1338
|
//#endregion
|
|
627
|
-
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX,
|
|
1339
|
+
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX, q as clearShellContext, Y as getActiveDocumentId, X as getCommands, J as getProject, $ as getProjectStorage, Q as getPwa, Z as getStorageSources, a as isReservedDatabaseName, K as setShellContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@septkit/shell-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dialecte/core": "0.
|
|
17
|
-
"@dialecte/scl": "0.
|
|
16
|
+
"@dialecte/core": "0.12.1",
|
|
17
|
+
"@dialecte/scl": "0.22.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"oxlint": "~1.6.0",
|