@albi_scando/as-const-lib 1.0.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/README.md +12 -0
- package/dist/as-const-lib.es.js +158 -0
- package/dist/as-const-lib.umd.js +15 -0
- package/dist/types/constants/application.constant.d.ts +4 -0
- package/dist/types/constants/constants.d.ts +24 -0
- package/dist/types/constants/cursor.constant.d.ts +42 -0
- package/dist/types/constants/events/custom-events.constant.d.ts +11 -0
- package/dist/types/constants/events/drag-events.constant.d.ts +12 -0
- package/dist/types/constants/events/keyboard-events.constant.d.ts +7 -0
- package/dist/types/constants/events/media-stream-events.constant.d.ts +10 -0
- package/dist/types/constants/events/mouse-events.constant.d.ts +13 -0
- package/dist/types/constants/events/picture-in-picture-events.constant.d.ts +8 -0
- package/dist/types/constants/events/pointer/buttons.d.ts +5 -0
- package/dist/types/constants/events/pointer/value.d.ts +8 -0
- package/dist/types/constants/events/pointer-events.constant.d.ts +16 -0
- package/dist/types/constants/events/touch-events.constant.d.ts +9 -0
- package/dist/types/constants/events/wheel-events.constant.d.ts +6 -0
- package/dist/types/constants/insert-adjacent-html.constant.d.ts +9 -0
- package/dist/types/constants/svg.constant.d.ts +35 -0
- package/dist/types/constants/themes.contant.d.ts +10 -0
- package/dist/types/constants/typeof.constant.d.ts +13 -0
- package/dist/types/main.d.ts +29 -0
- package/dist/types/types/cursor.type.d.ts +5 -0
- package/dist/types/types/events/custom-events.type.d.ts +5 -0
- package/dist/types/types/events/drag-events.type.d.ts +5 -0
- package/dist/types/types/events/keyboard-events.type.d.ts +5 -0
- package/dist/types/types/events/media-stream-events.type.d.ts +5 -0
- package/dist/types/types/events/mouse-events.type.d.ts +5 -0
- package/dist/types/types/events/picture-in-picture-events.type.d.ts +5 -0
- package/dist/types/types/events/pointer-events.type.d.ts +5 -0
- package/dist/types/types/events/touch-events.type.d.ts +5 -0
- package/dist/types/types/events/wheel-events.type.d.ts +5 -0
- package/dist/types/types/insert-adjacent-html.type.d.ts +5 -0
- package/dist/types/types/svg.type.d.ts +5 -0
- package/dist/types/types/themes.type.d.ts +5 -0
- package/dist/types/types/typeof.type.d.ts +5 -0
- package/package.json +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# `as-const-lib`
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
A TypeScript library providing **strongly typed constants** and event names for browsers, CSS cursors, SVGs, themes, and more.
|
|
6
|
+
This library is designed to be **fully typed**, making it safe and convenient for TypeScript projects.
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [License](documentation/pages/LICENSE.md)
|
|
11
|
+
- [Contributing](documentation/pages/CONTRIBUTING.md)
|
|
12
|
+
- [Changelog](CHANGELOG.md)
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
const l = "&", i = 1e-6, t = "px", r = "", s = "deliberately-not-set", e = {
|
|
2
|
+
ADD: '<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_227-add" serif:id="227-add" d="M3.887,10.53l6.543,0l0,-6.543l3,0l0,6.543l6.543,0l0,3l-6.543,0l0,6.543l-3,0l0,-6.543l-6.543,0l0,-3Z"/></svg>',
|
|
3
|
+
ARROW_LEFT: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_038-arrow-left" serif:id="038-arrow-left" d="M15.53,6.53l-5.469,5.47l5.469,5.47l-1.06,1.06l-6.531,-6.53l6.531,-6.53c0.353,0.353 0.707,0.707 1.06,1.06Z" style="fill-rule:nonzero;"/></svg>',
|
|
4
|
+
ARROW_RIGHT: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_039-arrow-right" serif:id="039-arrow-right" d="M8.205,6.53l5.469,5.47l-5.469,5.47l1.06,1.06l6.53,-6.53l-6.53,-6.53c-0.353,0.353 -0.707,0.707 -1.06,1.06Z" style="fill-rule:nonzero;"/></svg>',
|
|
5
|
+
ARROW_DOWN: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_068-arrow-down" serif:id="068-arrow-down" d="M11.988,12.815l4.822,-4.822l1.547,1.547l-4.822,4.822l-0,-0l-1.547,1.547l-0,-0l-0,-0l-1.547,-1.547l-0,-0l-4.822,-4.822l1.547,-1.547l4.822,4.822Z"/></svg>',
|
|
6
|
+
ARROW_UP: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_069-arrow-up" serif:id="069-arrow-up" d="M11.93,10.994l4.822,4.822l1.547,-1.547l-4.822,-4.822l0,-0l-1.547,-1.547l0,-0l0,-0l-1.547,1.547l0,-0l-4.822,4.822l1.547,1.547l4.822,-4.822Z"/></svg>',
|
|
7
|
+
BIN: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_102-bin" serif:id="102-bin" d="M18.612,4.44l-3.284,-0l-0.976,-0.932l-4.704,0l-0.976,0.932l-3.284,-0l0,1.908l13.224,-0l-0,-1.908Zm-12.292,14.199c0,0.533 0.185,0.984 0.555,1.354c0.37,0.369 0.821,0.554 1.353,0.554l7.544,0c0.532,0 0.983,-0.185 1.353,-0.554c0.37,-0.37 0.555,-0.821 0.555,-1.354l-0,-11.359l-11.36,-0l0,11.359Z" style="fill-rule:nonzero;"/></svg>',
|
|
8
|
+
CHECKED: '<svg width="100%" height="100%" viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_246-checked" serif:id="246-checked" d="M9.937,18.439l-5.92,-6.421l2.508,-2.508l3.412,3.709l7.512,-7.595l2.621,2.682l-10.133,10.133Z" style="fill-rule:nonzero;"/></svg>',
|
|
9
|
+
CLOSE: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_206-close" serif:id="206-close" d="M21.164,4.583l-1.846,-1.846l-7.324,7.323l-7.324,-7.323l-1.846,1.846l7.324,7.324l-7.324,7.324l1.846,1.846l7.324,-7.324l7.324,7.324l1.846,-1.846l-7.324,-7.324l7.324,-7.324Z" style="fill-rule:nonzero;"/></svg>',
|
|
10
|
+
CLOSE_OUTLINED: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_222-close-outlined" serif:id="222-close-outlined" d="M11.773,3.406c3.929,0.038 7.543,3.136 8.293,7.045c1.026,5.353 -3.898,11.104 -9.919,9.982c-3.668,-0.683 -6.408,-3.671 -6.923,-7.189c-0.697,-4.754 3.171,-9.722 8.328,-9.836c0.074,-0.001 0.147,-0.002 0.221,-0.002Zm-0.101,1.497c-3.252,0.031 -6.299,2.528 -6.916,5.747c-0.854,4.449 3.333,9.296 8.39,8.286c2.403,-0.479 5.149,-3.126 5.52,-6.041c0.502,-3.95 -2.709,-8.006 -6.994,-7.992Zm0.041,6.102l3.078,-3.078l1.127,1.128l-3.078,3.078l3.078,3.077l-1.127,1.128l-3.078,-3.078l-3.078,3.078l-1.127,-1.128l3.078,-3.077l-3.078,-3.078l1.127,-1.128l3.078,3.078Z" style="fill-rule:nonzero;"/></svg>',
|
|
11
|
+
CUSTOM_CROSSHAIR: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
12
|
+
<!-- White border (underneath) -->
|
|
13
|
+
<line x1="16" y1="2" x2="16" y2="30" stroke="white" stroke-width="5"/>
|
|
14
|
+
<line x1="2" y1="16" x2="30" y2="16" stroke="white" stroke-width="5"/>
|
|
15
|
+
|
|
16
|
+
<!-- Black crosshair lines (on top) -->
|
|
17
|
+
<line x1="16" y1="2" x2="16" y2="30" stroke="black" stroke-width="2"/>
|
|
18
|
+
<line x1="2" y1="16" x2="30" y2="16" stroke="black" stroke-width="2"/>
|
|
19
|
+
</svg>`,
|
|
20
|
+
EDIT: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_234-edit" serif:id="234-edit" d="M4.089,16.719l-0,3.391l3.39,-0l10,-10l-3.391,-3.391l-9.999,10Zm16.012,-9.231c0.353,-0.353 0.353,-0.922 0,-1.275l-2.116,-2.116c-0.352,-0.352 -0.922,-0.352 -1.275,0l-1.654,1.655l3.39,3.39l1.655,-1.654Z" style="fill-rule:nonzero;"/></svg>',
|
|
21
|
+
EXPORT: `<svg width="100%" height="100%" viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
22
|
+
<g transform="matrix(1,0,0,1,-2280,-72)">
|
|
23
|
+
<g id="_396-export" transform="matrix(1.25,0,0,1.25,2277,69)">
|
|
24
|
+
<path d="M6,20C5.45,20 4.979,19.804 4.588,19.413C4.196,19.021 4,18.55 4,18L4,15L6,15L6,18L18,18L18,15L20,15L20,18C20,18.55 19.804,19.021 19.413,19.413C19.021,19.804 18.55,20 18,20L6,20ZM12,16L7,11L8.4,9.55L11,12.15L11,4L13,4L13,12.15L15.6,9.55L17,11L12,16Z" style="fill-rule:nonzero;"/>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>`,
|
|
28
|
+
INFO: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_223-info" serif:id="223-info" d="M13.684,3.24c0.512,-0 0.943,0.177 1.294,0.532c0.351,0.355 0.526,0.785 0.526,1.288c0,0.504 -0.177,0.933 -0.532,1.288c-0.355,0.355 -0.785,0.532 -1.288,0.532c-0.495,0 -0.92,-0.177 -1.275,-0.532c-0.355,-0.355 -0.533,-0.784 -0.533,-1.288c0,-0.503 0.176,-0.933 0.526,-1.288c0.351,-0.355 0.778,-0.532 1.282,-0.532Zm0.768,5.696l-2.539,8.803c-0.14,0.503 -0.21,0.834 -0.21,0.99c-0,0.091 0.037,0.176 0.111,0.254c0.075,0.079 0.153,0.118 0.236,0.118c0.14,-0 0.28,-0.062 0.421,-0.186c0.371,-0.305 0.817,-0.858 1.337,-1.659l0.421,0.248c-1.247,2.171 -2.572,3.256 -3.975,3.256c-0.536,0 -0.964,-0.151 -1.281,-0.452c-0.318,-0.301 -0.477,-0.683 -0.477,-1.145c-0,-0.306 0.07,-0.694 0.21,-1.164l1.722,-5.919c0.165,-0.569 0.247,-0.998 0.247,-1.287c0,-0.182 -0.078,-0.343 -0.235,-0.483c-0.157,-0.14 -0.372,-0.211 -0.644,-0.211c-0.124,0 -0.272,0.005 -0.446,0.013l0.161,-0.495l4.198,-0.681l0.743,-0Z" style="fill-rule:nonzero;"/></svg>',
|
|
29
|
+
SAVE: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_010-save" serif:id="010-save" d="M14.942,9.325l-9.792,-0l0,-3.908l9.792,-0l0,3.908Zm-2.942,9.792c-0.827,-0 -1.517,-0.276 -2.069,-0.828c-0.551,-0.552 -0.827,-1.249 -0.827,-2.092c-0,-0.843 0.276,-1.54 0.827,-2.091c0.552,-0.552 1.242,-0.828 2.069,-0.828c0.827,0 1.517,0.276 2.069,0.828c0.551,0.551 0.827,1.248 0.827,2.091c0,0.843 -0.276,1.54 -0.827,2.092c-0.552,0.552 -1.242,0.828 -2.069,0.828Zm4.919,-15.677l-11.769,0c-0.582,0 -1.057,0.192 -1.425,0.575c-0.368,0.383 -0.552,0.85 -0.552,1.402l0,13.7c0,0.551 0.192,1.019 0.575,1.402c0.383,0.383 0.851,0.574 1.402,0.574l13.7,0c0.551,0 1.019,-0.191 1.402,-0.574c0.383,-0.383 0.575,-0.851 0.575,-1.402l-0,-11.769l-3.908,-3.908Z" style="fill-rule:nonzero;"/></svg>',
|
|
30
|
+
SETTINGS: '<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_063-settings" serif:id="063-settings" d="M11.977,15.153c-0.868,-0.028 -1.587,-0.326 -2.157,-0.896c-0.569,-0.569 -0.854,-1.288 -0.854,-2.156c-0,-0.868 0.285,-1.587 0.854,-2.157c0.57,-0.569 1.289,-0.854 2.157,-0.854c0.868,0 1.587,0.285 2.156,0.854c0.57,0.57 0.855,1.289 0.855,2.157c-0,0.868 -0.285,1.587 -0.855,2.156c-0.569,0.57 -1.288,0.868 -2.156,0.896Zm6.469,-2.198c0.027,-0.271 0.041,-0.556 0.041,-0.854c-0,-0.298 -0.014,-0.583 -0.041,-0.855l1.831,-1.424c0.163,-0.162 0.19,-0.352 0.082,-0.569l-1.75,-3.011c-0.108,-0.19 -0.285,-0.244 -0.529,-0.163l-2.156,0.855c-0.434,-0.353 -0.923,-0.638 -1.465,-0.855l-0.326,-2.278c-0.054,-0.245 -0.19,-0.367 -0.407,-0.367l-3.499,0c-0.217,0 -0.352,0.122 -0.407,0.367l-0.325,2.278c-0.543,0.217 -1.031,0.502 -1.465,0.855l-2.156,-0.855c-0.244,-0.081 -0.421,-0.027 -0.529,0.163l-1.75,3.011c-0.108,0.217 -0.081,0.407 0.082,0.569l1.83,1.424c-0.027,0.272 -0.04,0.557 -0.04,0.855c-0,0.298 0.013,0.583 0.04,0.854l-1.83,1.424c-0.163,0.163 -0.19,0.353 -0.082,0.57l1.75,3.011c0.108,0.19 0.285,0.244 0.529,0.163l2.156,-0.855c0.434,0.353 0.922,0.638 1.465,0.855l0.325,2.278c0.055,0.244 0.19,0.367 0.407,0.367l3.499,-0c0.217,-0 0.353,-0.123 0.407,-0.367l0.326,-2.278c0.542,-0.217 1.031,-0.502 1.465,-0.855l2.156,0.855c0.244,0.081 0.421,0.027 0.529,-0.163l1.75,-3.011c0.108,-0.217 0.081,-0.407 -0.082,-0.57l-1.831,-1.424Z" style="fill-rule:nonzero;"/></svg>'
|
|
31
|
+
}, o = {
|
|
32
|
+
ALIAS: "alias",
|
|
33
|
+
ALL_SCROLL: "all-scroll",
|
|
34
|
+
AUTO: "auto",
|
|
35
|
+
CELL: "cell",
|
|
36
|
+
COL_RESIZE: "col-resize",
|
|
37
|
+
CONTEXT_MENU: "context-menu",
|
|
38
|
+
COPY: "copy",
|
|
39
|
+
CROSSHAIR: "crosshair",
|
|
40
|
+
DEFAULT: "default",
|
|
41
|
+
E_RESIZE: "e-resize",
|
|
42
|
+
EW_RESIZE: "ew-resize",
|
|
43
|
+
GRAB: "grab",
|
|
44
|
+
GRABBING: "grabbing",
|
|
45
|
+
HELP: "help",
|
|
46
|
+
MOVE: "move",
|
|
47
|
+
N_RESIZE: "n-resize",
|
|
48
|
+
NE_RESIZE: "ne-resize",
|
|
49
|
+
NESW_RESIZE: "nesw-resize",
|
|
50
|
+
NS_RESIZE: "ns-resize",
|
|
51
|
+
NW_RESIZE: "nw-resize",
|
|
52
|
+
NWSE_RESIZE: "nwse-resize",
|
|
53
|
+
NO_DROP: "no-drop",
|
|
54
|
+
NONE: "none",
|
|
55
|
+
NOT_ALLOWED: "not-allowed",
|
|
56
|
+
POINTER: "pointer",
|
|
57
|
+
PROGRESS: "progress",
|
|
58
|
+
ROW_RESIZE: "row-resize",
|
|
59
|
+
S_RESIZE: "s-resize",
|
|
60
|
+
SE_RESIZE: "se-resize",
|
|
61
|
+
SW_RESIZE: "sw-resize",
|
|
62
|
+
TEXT: "text",
|
|
63
|
+
URL: "url(myBall.cur),auto",
|
|
64
|
+
W_RESIZE: "w-resize",
|
|
65
|
+
WAIT: "wait",
|
|
66
|
+
ZOOM_IN: "zoom-in",
|
|
67
|
+
ZOOM_OUT: "zoom-out",
|
|
68
|
+
CUSTOM_CROSSHAIR: `url("data:image/svg+xml;base64,${btoa(e.CUSTOM_CROSSHAIR)}") 16 16, auto`
|
|
69
|
+
}, n = {
|
|
70
|
+
CHANGE_LANGUAGE: "changeLanguage"
|
|
71
|
+
}, w = {
|
|
72
|
+
DRAG: "drag",
|
|
73
|
+
DRAG_END: "dragend",
|
|
74
|
+
DRAG_ENTER: "dragenter",
|
|
75
|
+
DRAG_LEAVE: "dragleave",
|
|
76
|
+
DRAG_OVER: "dragover",
|
|
77
|
+
DRAG_START: "dragstart",
|
|
78
|
+
DROP: "drop"
|
|
79
|
+
}, c = {
|
|
80
|
+
BEFORE_BEGIN: "beforebegin",
|
|
81
|
+
AFTER_BEGIN: "afterbegin",
|
|
82
|
+
BEFORE_END: "beforeend",
|
|
83
|
+
AFTER_END: "afterend"
|
|
84
|
+
}, d = {
|
|
85
|
+
KEY_DOWN: "keydown",
|
|
86
|
+
KEY_UP: "keyup"
|
|
87
|
+
}, E = {
|
|
88
|
+
ADD_TRACK: "addtrack",
|
|
89
|
+
ENDED: "ended",
|
|
90
|
+
MUTE: "mute",
|
|
91
|
+
REMOVE_TRACK: "removetrack",
|
|
92
|
+
UNMUTE: "unmute"
|
|
93
|
+
}, p = {
|
|
94
|
+
MOUSE_DOWN: "mousedown",
|
|
95
|
+
MOUSE_UP: "mouseup",
|
|
96
|
+
MOUSE_OVER: "mouseover",
|
|
97
|
+
MOUSE_OUT: "mouseout",
|
|
98
|
+
MOUSE_MOVE: "mousemove",
|
|
99
|
+
CLICK: "click",
|
|
100
|
+
DOUBLE_CLICK: "dblclick",
|
|
101
|
+
CONTEXT_MENU: "contextmenu"
|
|
102
|
+
}, m = {
|
|
103
|
+
ENTER_PICTURE_IN_PICTURE: "enterpictureinpicture",
|
|
104
|
+
LEAVE_PICTURE_IN_PICTURE: "leavepictureinpicture",
|
|
105
|
+
RESIZE: "resize"
|
|
106
|
+
}, h = {
|
|
107
|
+
POINTER_OVER: "pointerover",
|
|
108
|
+
POINTER_ENTER: "pointerenter",
|
|
109
|
+
POINTER_DOWN: "pointerdown",
|
|
110
|
+
POINTER_MOVE: "pointermove",
|
|
111
|
+
POINTER_RAW_UPDATE: "pointerrawupdate",
|
|
112
|
+
POINTER_UP: "pointerup",
|
|
113
|
+
POINTER_CANCEL: "pointercancel",
|
|
114
|
+
POINTER_OUT: "pointerout",
|
|
115
|
+
POINTER_LEAVE: "pointerleave",
|
|
116
|
+
POINTER_CAPTURE: "gotpointercapture",
|
|
117
|
+
LOST_POINTER_CAPTURE: "lostpointercapture"
|
|
118
|
+
}, g = {
|
|
119
|
+
DARK: "dark",
|
|
120
|
+
LIGHT: "light"
|
|
121
|
+
}, v = {
|
|
122
|
+
TOUCH_START: "touchstart",
|
|
123
|
+
TOUCH_END: "touchend",
|
|
124
|
+
TOUCH_MOVE: "touchmove",
|
|
125
|
+
TOUCH_CANCEL: "touchcancel"
|
|
126
|
+
}, x = {
|
|
127
|
+
BIGINT: "bigint",
|
|
128
|
+
BOOLEAN: "boolean",
|
|
129
|
+
FUNCTION: "function",
|
|
130
|
+
NULL: "null",
|
|
131
|
+
NUMBER: "number",
|
|
132
|
+
STRING: "string",
|
|
133
|
+
SYMBOL: "symbol",
|
|
134
|
+
UNDEFINED: "undefined"
|
|
135
|
+
}, _ = {
|
|
136
|
+
WHEEL: "wheel"
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
l as AMPERSAND,
|
|
140
|
+
o as CURSOR,
|
|
141
|
+
n as CUSTOM_EVENTS,
|
|
142
|
+
w as DRAG_EVENTS,
|
|
143
|
+
i as FLOAT_TOLERANCE,
|
|
144
|
+
c as INSERT_ADJACENT_HTML,
|
|
145
|
+
d as KEYBOARD_EVENTS,
|
|
146
|
+
E as MEDIA_STREAM_EVENTS,
|
|
147
|
+
p as MOUSE_EVENTS,
|
|
148
|
+
m as PICTURE_IN_PICTURE_EVENTS,
|
|
149
|
+
h as POINTER_EVENTS,
|
|
150
|
+
t as PX,
|
|
151
|
+
r as STRING_EMPTY,
|
|
152
|
+
e as SVG,
|
|
153
|
+
g as THEMES,
|
|
154
|
+
v as TOUCH_EVENTS,
|
|
155
|
+
s as TRANSLATION_DELIBERATELY_UNSET,
|
|
156
|
+
x as TYPEOF,
|
|
157
|
+
_ as WHEEL_EVENTS
|
|
158
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(function(e,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(e=typeof globalThis<"u"?globalThis:e||self,l(e["as-design-system-lib"]={}))})(this,(function(e){"use strict";const t="deliberately-not-set",i={ADD:'<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_227-add" serif:id="227-add" d="M3.887,10.53l6.543,0l0,-6.543l3,0l0,6.543l6.543,0l0,3l-6.543,0l0,6.543l-3,0l0,-6.543l-6.543,0l0,-3Z"/></svg>',ARROW_LEFT:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_038-arrow-left" serif:id="038-arrow-left" d="M15.53,6.53l-5.469,5.47l5.469,5.47l-1.06,1.06l-6.531,-6.53l6.531,-6.53c0.353,0.353 0.707,0.707 1.06,1.06Z" style="fill-rule:nonzero;"/></svg>',ARROW_RIGHT:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_039-arrow-right" serif:id="039-arrow-right" d="M8.205,6.53l5.469,5.47l-5.469,5.47l1.06,1.06l6.53,-6.53l-6.53,-6.53c-0.353,0.353 -0.707,0.707 -1.06,1.06Z" style="fill-rule:nonzero;"/></svg>',ARROW_DOWN:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_068-arrow-down" serif:id="068-arrow-down" d="M11.988,12.815l4.822,-4.822l1.547,1.547l-4.822,4.822l-0,-0l-1.547,1.547l-0,-0l-0,-0l-1.547,-1.547l-0,-0l-4.822,-4.822l1.547,-1.547l4.822,4.822Z"/></svg>',ARROW_UP:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_069-arrow-up" serif:id="069-arrow-up" d="M11.93,10.994l4.822,4.822l1.547,-1.547l-4.822,-4.822l0,-0l-1.547,-1.547l0,-0l0,-0l-1.547,1.547l0,-0l-4.822,4.822l1.547,1.547l4.822,-4.822Z"/></svg>',BIN:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_102-bin" serif:id="102-bin" d="M18.612,4.44l-3.284,-0l-0.976,-0.932l-4.704,0l-0.976,0.932l-3.284,-0l0,1.908l13.224,-0l-0,-1.908Zm-12.292,14.199c0,0.533 0.185,0.984 0.555,1.354c0.37,0.369 0.821,0.554 1.353,0.554l7.544,0c0.532,0 0.983,-0.185 1.353,-0.554c0.37,-0.37 0.555,-0.821 0.555,-1.354l-0,-11.359l-11.36,-0l0,11.359Z" style="fill-rule:nonzero;"/></svg>',CHECKED:'<svg width="100%" height="100%" viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_246-checked" serif:id="246-checked" d="M9.937,18.439l-5.92,-6.421l2.508,-2.508l3.412,3.709l7.512,-7.595l2.621,2.682l-10.133,10.133Z" style="fill-rule:nonzero;"/></svg>',CLOSE:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_206-close" serif:id="206-close" d="M21.164,4.583l-1.846,-1.846l-7.324,7.323l-7.324,-7.323l-1.846,1.846l7.324,7.324l-7.324,7.324l1.846,1.846l7.324,-7.324l7.324,7.324l1.846,-1.846l-7.324,-7.324l7.324,-7.324Z" style="fill-rule:nonzero;"/></svg>',CLOSE_OUTLINED:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_222-close-outlined" serif:id="222-close-outlined" d="M11.773,3.406c3.929,0.038 7.543,3.136 8.293,7.045c1.026,5.353 -3.898,11.104 -9.919,9.982c-3.668,-0.683 -6.408,-3.671 -6.923,-7.189c-0.697,-4.754 3.171,-9.722 8.328,-9.836c0.074,-0.001 0.147,-0.002 0.221,-0.002Zm-0.101,1.497c-3.252,0.031 -6.299,2.528 -6.916,5.747c-0.854,4.449 3.333,9.296 8.39,8.286c2.403,-0.479 5.149,-3.126 5.52,-6.041c0.502,-3.95 -2.709,-8.006 -6.994,-7.992Zm0.041,6.102l3.078,-3.078l1.127,1.128l-3.078,3.078l3.078,3.077l-1.127,1.128l-3.078,-3.078l-3.078,3.078l-1.127,-1.128l3.078,-3.077l-3.078,-3.078l1.127,-1.128l3.078,3.078Z" style="fill-rule:nonzero;"/></svg>',CUSTOM_CROSSHAIR:`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
+
<!-- White border (underneath) -->
|
|
3
|
+
<line x1="16" y1="2" x2="16" y2="30" stroke="white" stroke-width="5"/>
|
|
4
|
+
<line x1="2" y1="16" x2="30" y2="16" stroke="white" stroke-width="5"/>
|
|
5
|
+
|
|
6
|
+
<!-- Black crosshair lines (on top) -->
|
|
7
|
+
<line x1="16" y1="2" x2="16" y2="30" stroke="black" stroke-width="2"/>
|
|
8
|
+
<line x1="2" y1="16" x2="30" y2="16" stroke="black" stroke-width="2"/>
|
|
9
|
+
</svg>`,EDIT:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_234-edit" serif:id="234-edit" d="M4.089,16.719l-0,3.391l3.39,-0l10,-10l-3.391,-3.391l-9.999,10Zm16.012,-9.231c0.353,-0.353 0.353,-0.922 0,-1.275l-2.116,-2.116c-0.352,-0.352 -0.922,-0.352 -1.275,0l-1.654,1.655l3.39,3.39l1.655,-1.654Z" style="fill-rule:nonzero;"/></svg>',EXPORT:`<svg width="100%" height="100%" viewBox="0 0 24 24"xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
10
|
+
<g transform="matrix(1,0,0,1,-2280,-72)">
|
|
11
|
+
<g id="_396-export" transform="matrix(1.25,0,0,1.25,2277,69)">
|
|
12
|
+
<path d="M6,20C5.45,20 4.979,19.804 4.588,19.413C4.196,19.021 4,18.55 4,18L4,15L6,15L6,18L18,18L18,15L20,15L20,18C20,18.55 19.804,19.021 19.413,19.413C19.021,19.804 18.55,20 18,20L6,20ZM12,16L7,11L8.4,9.55L11,12.15L11,4L13,4L13,12.15L15.6,9.55L17,11L12,16Z" style="fill-rule:nonzero;"/>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>`,INFO:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_223-info" serif:id="223-info" d="M13.684,3.24c0.512,-0 0.943,0.177 1.294,0.532c0.351,0.355 0.526,0.785 0.526,1.288c0,0.504 -0.177,0.933 -0.532,1.288c-0.355,0.355 -0.785,0.532 -1.288,0.532c-0.495,0 -0.92,-0.177 -1.275,-0.532c-0.355,-0.355 -0.533,-0.784 -0.533,-1.288c0,-0.503 0.176,-0.933 0.526,-1.288c0.351,-0.355 0.778,-0.532 1.282,-0.532Zm0.768,5.696l-2.539,8.803c-0.14,0.503 -0.21,0.834 -0.21,0.99c-0,0.091 0.037,0.176 0.111,0.254c0.075,0.079 0.153,0.118 0.236,0.118c0.14,-0 0.28,-0.062 0.421,-0.186c0.371,-0.305 0.817,-0.858 1.337,-1.659l0.421,0.248c-1.247,2.171 -2.572,3.256 -3.975,3.256c-0.536,0 -0.964,-0.151 -1.281,-0.452c-0.318,-0.301 -0.477,-0.683 -0.477,-1.145c-0,-0.306 0.07,-0.694 0.21,-1.164l1.722,-5.919c0.165,-0.569 0.247,-0.998 0.247,-1.287c0,-0.182 -0.078,-0.343 -0.235,-0.483c-0.157,-0.14 -0.372,-0.211 -0.644,-0.211c-0.124,0 -0.272,0.005 -0.446,0.013l0.161,-0.495l4.198,-0.681l0.743,-0Z" style="fill-rule:nonzero;"/></svg>',SAVE:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_010-save" serif:id="010-save" d="M14.942,9.325l-9.792,-0l0,-3.908l9.792,-0l0,3.908Zm-2.942,9.792c-0.827,-0 -1.517,-0.276 -2.069,-0.828c-0.551,-0.552 -0.827,-1.249 -0.827,-2.092c-0,-0.843 0.276,-1.54 0.827,-2.091c0.552,-0.552 1.242,-0.828 2.069,-0.828c0.827,0 1.517,0.276 2.069,0.828c0.551,0.551 0.827,1.248 0.827,2.091c0,0.843 -0.276,1.54 -0.827,2.092c-0.552,0.552 -1.242,0.828 -2.069,0.828Zm4.919,-15.677l-11.769,0c-0.582,0 -1.057,0.192 -1.425,0.575c-0.368,0.383 -0.552,0.85 -0.552,1.402l0,13.7c0,0.551 0.192,1.019 0.575,1.402c0.383,0.383 0.851,0.574 1.402,0.574l13.7,0c0.551,0 1.019,-0.191 1.402,-0.574c0.383,-0.383 0.575,-0.851 0.575,-1.402l-0,-11.769l-3.908,-3.908Z" style="fill-rule:nonzero;"/></svg>',SETTINGS:'<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path id="_063-settings" serif:id="063-settings" d="M11.977,15.153c-0.868,-0.028 -1.587,-0.326 -2.157,-0.896c-0.569,-0.569 -0.854,-1.288 -0.854,-2.156c-0,-0.868 0.285,-1.587 0.854,-2.157c0.57,-0.569 1.289,-0.854 2.157,-0.854c0.868,0 1.587,0.285 2.156,0.854c0.57,0.57 0.855,1.289 0.855,2.157c-0,0.868 -0.285,1.587 -0.855,2.156c-0.569,0.57 -1.288,0.868 -2.156,0.896Zm6.469,-2.198c0.027,-0.271 0.041,-0.556 0.041,-0.854c-0,-0.298 -0.014,-0.583 -0.041,-0.855l1.831,-1.424c0.163,-0.162 0.19,-0.352 0.082,-0.569l-1.75,-3.011c-0.108,-0.19 -0.285,-0.244 -0.529,-0.163l-2.156,0.855c-0.434,-0.353 -0.923,-0.638 -1.465,-0.855l-0.326,-2.278c-0.054,-0.245 -0.19,-0.367 -0.407,-0.367l-3.499,0c-0.217,0 -0.352,0.122 -0.407,0.367l-0.325,2.278c-0.543,0.217 -1.031,0.502 -1.465,0.855l-2.156,-0.855c-0.244,-0.081 -0.421,-0.027 -0.529,0.163l-1.75,3.011c-0.108,0.217 -0.081,0.407 0.082,0.569l1.83,1.424c-0.027,0.272 -0.04,0.557 -0.04,0.855c-0,0.298 0.013,0.583 0.04,0.854l-1.83,1.424c-0.163,0.163 -0.19,0.353 -0.082,0.57l1.75,3.011c0.108,0.19 0.285,0.244 0.529,0.163l2.156,-0.855c0.434,0.353 0.922,0.638 1.465,0.855l0.325,2.278c0.055,0.244 0.19,0.367 0.407,0.367l3.499,-0c0.217,-0 0.353,-0.123 0.407,-0.367l0.326,-2.278c0.542,-0.217 1.031,-0.502 1.465,-0.855l2.156,0.855c0.244,0.081 0.421,0.027 0.529,-0.163l1.75,-3.011c0.108,-0.217 0.081,-0.407 -0.082,-0.57l-1.831,-1.424Z" style="fill-rule:nonzero;"/></svg>'},r={ALIAS:"alias",ALL_SCROLL:"all-scroll",AUTO:"auto",CELL:"cell",COL_RESIZE:"col-resize",CONTEXT_MENU:"context-menu",COPY:"copy",CROSSHAIR:"crosshair",DEFAULT:"default",E_RESIZE:"e-resize",EW_RESIZE:"ew-resize",GRAB:"grab",GRABBING:"grabbing",HELP:"help",MOVE:"move",N_RESIZE:"n-resize",NE_RESIZE:"ne-resize",NESW_RESIZE:"nesw-resize",NS_RESIZE:"ns-resize",NW_RESIZE:"nw-resize",NWSE_RESIZE:"nwse-resize",NO_DROP:"no-drop",NONE:"none",NOT_ALLOWED:"not-allowed",POINTER:"pointer",PROGRESS:"progress",ROW_RESIZE:"row-resize",S_RESIZE:"s-resize",SE_RESIZE:"se-resize",SW_RESIZE:"sw-resize",TEXT:"text",URL:"url(myBall.cur),auto",W_RESIZE:"w-resize",WAIT:"wait",ZOOM_IN:"zoom-in",ZOOM_OUT:"zoom-out",CUSTOM_CROSSHAIR:`url("data:image/svg+xml;base64,${btoa(i.CUSTOM_CROSSHAIR)}") 16 16, auto`},s={CHANGE_LANGUAGE:"changeLanguage"},n={DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DRAG_START:"dragstart",DROP:"drop"},o={BEFORE_BEGIN:"beforebegin",AFTER_BEGIN:"afterbegin",BEFORE_END:"beforeend",AFTER_END:"afterend"},w={KEY_DOWN:"keydown",KEY_UP:"keyup"},E={ADD_TRACK:"addtrack",ENDED:"ended",MUTE:"mute",REMOVE_TRACK:"removetrack",UNMUTE:"unmute"},c={MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",MOUSE_MOVE:"mousemove",CLICK:"click",DOUBLE_CLICK:"dblclick",CONTEXT_MENU:"contextmenu"},d={ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture",RESIZE:"resize"},m={POINTER_OVER:"pointerover",POINTER_ENTER:"pointerenter",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_RAW_UPDATE:"pointerrawupdate",POINTER_UP:"pointerup",POINTER_CANCEL:"pointercancel",POINTER_OUT:"pointerout",POINTER_LEAVE:"pointerleave",POINTER_CAPTURE:"gotpointercapture",LOST_POINTER_CAPTURE:"lostpointercapture"},T={DARK:"dark",LIGHT:"light"},h={TOUCH_START:"touchstart",TOUCH_END:"touchend",TOUCH_MOVE:"touchmove",TOUCH_CANCEL:"touchcancel"},g={BIGINT:"bigint",BOOLEAN:"boolean",FUNCTION:"function",NULL:"null",NUMBER:"number",STRING:"string",SYMBOL:"symbol",UNDEFINED:"undefined"},_={WHEEL:"wheel"};e.AMPERSAND="&",e.CURSOR=r,e.CUSTOM_EVENTS=s,e.DRAG_EVENTS=n,e.FLOAT_TOLERANCE=1e-6,e.INSERT_ADJACENT_HTML=o,e.KEYBOARD_EVENTS=w,e.MEDIA_STREAM_EVENTS=E,e.MOUSE_EVENTS=c,e.PICTURE_IN_PICTURE_EVENTS=d,e.POINTER_EVENTS=m,e.PX="px",e.STRING_EMPTY="",e.SVG=i,e.THEMES=T,e.TOUCH_EVENTS=h,e.TRANSLATION_DELIBERATELY_UNSET=t,e.TYPEOF=g,e.WHEEL_EVENTS=_,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ampersand symbol (`&`).
|
|
3
|
+
*/
|
|
4
|
+
export declare const AMPERSAND: string;
|
|
5
|
+
/**
|
|
6
|
+
* The floating-point tolerance value used for comparisons of very small numbers.
|
|
7
|
+
* Useful to prevent issues with floating-point precision.
|
|
8
|
+
* Example: If you want to check if two floating-point numbers are equal within a small tolerance.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FLOAT_TOLERANCE: number;
|
|
11
|
+
/**
|
|
12
|
+
* The 'px' string.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PX: string;
|
|
15
|
+
/**
|
|
16
|
+
* An empty string (`""`).
|
|
17
|
+
* Useful for cases where you need a default empty string value.
|
|
18
|
+
*/
|
|
19
|
+
export declare const STRING_EMPTY: string;
|
|
20
|
+
/**
|
|
21
|
+
* A deliberately unset translation string.
|
|
22
|
+
* This value is used to indicate that a translation has been deliberately left unset.
|
|
23
|
+
*/
|
|
24
|
+
export declare const TRANSLATION_DELIBERATELY_UNSET: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/cursor | MDN Cursor}
|
|
3
|
+
*/
|
|
4
|
+
export declare const CURSOR: {
|
|
5
|
+
readonly ALIAS: "alias";
|
|
6
|
+
readonly ALL_SCROLL: "all-scroll";
|
|
7
|
+
readonly AUTO: "auto";
|
|
8
|
+
readonly CELL: "cell";
|
|
9
|
+
readonly COL_RESIZE: "col-resize";
|
|
10
|
+
readonly CONTEXT_MENU: "context-menu";
|
|
11
|
+
readonly COPY: "copy";
|
|
12
|
+
readonly CROSSHAIR: "crosshair";
|
|
13
|
+
readonly DEFAULT: "default";
|
|
14
|
+
readonly E_RESIZE: "e-resize";
|
|
15
|
+
readonly EW_RESIZE: "ew-resize";
|
|
16
|
+
readonly GRAB: "grab";
|
|
17
|
+
readonly GRABBING: "grabbing";
|
|
18
|
+
readonly HELP: "help";
|
|
19
|
+
readonly MOVE: "move";
|
|
20
|
+
readonly N_RESIZE: "n-resize";
|
|
21
|
+
readonly NE_RESIZE: "ne-resize";
|
|
22
|
+
readonly NESW_RESIZE: "nesw-resize";
|
|
23
|
+
readonly NS_RESIZE: "ns-resize";
|
|
24
|
+
readonly NW_RESIZE: "nw-resize";
|
|
25
|
+
readonly NWSE_RESIZE: "nwse-resize";
|
|
26
|
+
readonly NO_DROP: "no-drop";
|
|
27
|
+
readonly NONE: "none";
|
|
28
|
+
readonly NOT_ALLOWED: "not-allowed";
|
|
29
|
+
readonly POINTER: "pointer";
|
|
30
|
+
readonly PROGRESS: "progress";
|
|
31
|
+
readonly ROW_RESIZE: "row-resize";
|
|
32
|
+
readonly S_RESIZE: "s-resize";
|
|
33
|
+
readonly SE_RESIZE: "se-resize";
|
|
34
|
+
readonly SW_RESIZE: "sw-resize";
|
|
35
|
+
readonly TEXT: "text";
|
|
36
|
+
readonly URL: "url(myBall.cur),auto";
|
|
37
|
+
readonly W_RESIZE: "w-resize";
|
|
38
|
+
readonly WAIT: "wait";
|
|
39
|
+
readonly ZOOM_IN: "zoom-in";
|
|
40
|
+
readonly ZOOM_OUT: "zoom-out";
|
|
41
|
+
readonly CUSTOM_CROSSHAIR: `url("data:image/svg+xml;base64,${string}") 16 16, auto`;
|
|
42
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom DOM event names frequently used in applications.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* element.dispatchEvent(new CustomEvent(CUSTOM_EVENTS.CHANGE_LANGUAGE));
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare const CUSTOM_EVENTS: {
|
|
10
|
+
readonly CHANGE_LANGUAGE: "changeLanguage";
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API | MDN Drag and Drop API}
|
|
3
|
+
*/
|
|
4
|
+
export declare const DRAG_EVENTS: {
|
|
5
|
+
readonly DRAG: "drag";
|
|
6
|
+
readonly DRAG_END: "dragend";
|
|
7
|
+
readonly DRAG_ENTER: "dragenter";
|
|
8
|
+
readonly DRAG_LEAVE: "dragleave";
|
|
9
|
+
readonly DRAG_OVER: "dragover";
|
|
10
|
+
readonly DRAG_START: "dragstart";
|
|
11
|
+
readonly DROP: "drop";
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Touch_events | MDN Media stream}
|
|
3
|
+
*/
|
|
4
|
+
export declare const MEDIA_STREAM_EVENTS: {
|
|
5
|
+
readonly ADD_TRACK: "addtrack";
|
|
6
|
+
readonly ENDED: "ended";
|
|
7
|
+
readonly MUTE: "mute";
|
|
8
|
+
readonly REMOVE_TRACK: "removetrack";
|
|
9
|
+
readonly UNMUTE: "unmute";
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent | MDN MouseEvent}
|
|
3
|
+
*/
|
|
4
|
+
export declare const MOUSE_EVENTS: {
|
|
5
|
+
readonly MOUSE_DOWN: "mousedown";
|
|
6
|
+
readonly MOUSE_UP: "mouseup";
|
|
7
|
+
readonly MOUSE_OVER: "mouseover";
|
|
8
|
+
readonly MOUSE_OUT: "mouseout";
|
|
9
|
+
readonly MOUSE_MOVE: "mousemove";
|
|
10
|
+
readonly CLICK: "click";
|
|
11
|
+
readonly DOUBLE_CLICK: "dblclick";
|
|
12
|
+
readonly CONTEXT_MENU: "contextmenu";
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Picture-in-Picture_API | MDN Picture-in-Picture API}
|
|
3
|
+
*/
|
|
4
|
+
export declare const PICTURE_IN_PICTURE_EVENTS: {
|
|
5
|
+
readonly ENTER_PICTURE_IN_PICTURE: "enterpictureinpicture";
|
|
6
|
+
readonly LEAVE_PICTURE_IN_PICTURE: "leavepictureinpicture";
|
|
7
|
+
readonly RESIZE: "resize";
|
|
8
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent | MDN PointerEvent}
|
|
3
|
+
*/
|
|
4
|
+
export declare const POINTER_EVENTS: {
|
|
5
|
+
readonly POINTER_OVER: "pointerover";
|
|
6
|
+
readonly POINTER_ENTER: "pointerenter";
|
|
7
|
+
readonly POINTER_DOWN: "pointerdown";
|
|
8
|
+
readonly POINTER_MOVE: "pointermove";
|
|
9
|
+
readonly POINTER_RAW_UPDATE: "pointerrawupdate";
|
|
10
|
+
readonly POINTER_UP: "pointerup";
|
|
11
|
+
readonly POINTER_CANCEL: "pointercancel";
|
|
12
|
+
readonly POINTER_OUT: "pointerout";
|
|
13
|
+
readonly POINTER_LEAVE: "pointerleave";
|
|
14
|
+
readonly POINTER_CAPTURE: "gotpointercapture";
|
|
15
|
+
readonly LOST_POINTER_CAPTURE: "lostpointercapture";
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Touch_events | MDN Touch events}
|
|
3
|
+
*/
|
|
4
|
+
export declare const TOUCH_EVENTS: {
|
|
5
|
+
readonly TOUCH_START: "touchstart";
|
|
6
|
+
readonly TOUCH_END: "touchend";
|
|
7
|
+
readonly TOUCH_MOVE: "touchmove";
|
|
8
|
+
readonly TOUCH_CANCEL: "touchcancel";
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@see https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML}
|
|
3
|
+
*/
|
|
4
|
+
export declare const INSERT_ADJACENT_HTML: {
|
|
5
|
+
readonly BEFORE_BEGIN: "beforebegin";
|
|
6
|
+
readonly AFTER_BEGIN: "afterbegin";
|
|
7
|
+
readonly BEFORE_END: "beforeend";
|
|
8
|
+
readonly AFTER_END: "afterend";
|
|
9
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of inline SVG icons used throughout the application.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Each property is a raw SVG string that can be injected into the DOM
|
|
6
|
+
* (e.g. via `innerHTML`) or used in components requiring inline icons.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { SVG } from './svg.constant';
|
|
11
|
+
*
|
|
12
|
+
* // Inject into an element
|
|
13
|
+
* element.innerHTML = SVG.ADD;
|
|
14
|
+
*
|
|
15
|
+
* // Use as typed keys
|
|
16
|
+
* type SvgKey = keyof typeof SVG; // "ADD" | "ARROW_LEFT" | "ARROW_RIGHT" | ...
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const SVG: {
|
|
20
|
+
readonly ADD: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_227-add\" serif:id=\"227-add\" d=\"M3.887,10.53l6.543,0l0,-6.543l3,0l0,6.543l6.543,0l0,3l-6.543,0l0,6.543l-3,0l0,-6.543l-6.543,0l0,-3Z\"/></svg>";
|
|
21
|
+
readonly ARROW_LEFT: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_038-arrow-left\" serif:id=\"038-arrow-left\" d=\"M15.53,6.53l-5.469,5.47l5.469,5.47l-1.06,1.06l-6.531,-6.53l6.531,-6.53c0.353,0.353 0.707,0.707 1.06,1.06Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
22
|
+
readonly ARROW_RIGHT: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_039-arrow-right\" serif:id=\"039-arrow-right\" d=\"M8.205,6.53l5.469,5.47l-5.469,5.47l1.06,1.06l6.53,-6.53l-6.53,-6.53c-0.353,0.353 -0.707,0.707 -1.06,1.06Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
23
|
+
readonly ARROW_DOWN: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_068-arrow-down\" serif:id=\"068-arrow-down\" d=\"M11.988,12.815l4.822,-4.822l1.547,1.547l-4.822,4.822l-0,-0l-1.547,1.547l-0,-0l-0,-0l-1.547,-1.547l-0,-0l-4.822,-4.822l1.547,-1.547l4.822,4.822Z\"/></svg>";
|
|
24
|
+
readonly ARROW_UP: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_069-arrow-up\" serif:id=\"069-arrow-up\" d=\"M11.93,10.994l4.822,4.822l1.547,-1.547l-4.822,-4.822l0,-0l-1.547,-1.547l0,-0l0,-0l-1.547,1.547l0,-0l-4.822,4.822l1.547,1.547l4.822,-4.822Z\"/></svg>";
|
|
25
|
+
readonly BIN: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_102-bin\" serif:id=\"102-bin\" d=\"M18.612,4.44l-3.284,-0l-0.976,-0.932l-4.704,0l-0.976,0.932l-3.284,-0l0,1.908l13.224,-0l-0,-1.908Zm-12.292,14.199c0,0.533 0.185,0.984 0.555,1.354c0.37,0.369 0.821,0.554 1.353,0.554l7.544,0c0.532,0 0.983,-0.185 1.353,-0.554c0.37,-0.37 0.555,-0.821 0.555,-1.354l-0,-11.359l-11.36,-0l0,11.359Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
26
|
+
readonly CHECKED: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\"xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_246-checked\" serif:id=\"246-checked\" d=\"M9.937,18.439l-5.92,-6.421l2.508,-2.508l3.412,3.709l7.512,-7.595l2.621,2.682l-10.133,10.133Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
27
|
+
readonly CLOSE: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_206-close\" serif:id=\"206-close\" d=\"M21.164,4.583l-1.846,-1.846l-7.324,7.323l-7.324,-7.323l-1.846,1.846l7.324,7.324l-7.324,7.324l1.846,1.846l7.324,-7.324l7.324,7.324l1.846,-1.846l-7.324,-7.324l7.324,-7.324Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
28
|
+
readonly CLOSE_OUTLINED: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_222-close-outlined\" serif:id=\"222-close-outlined\" d=\"M11.773,3.406c3.929,0.038 7.543,3.136 8.293,7.045c1.026,5.353 -3.898,11.104 -9.919,9.982c-3.668,-0.683 -6.408,-3.671 -6.923,-7.189c-0.697,-4.754 3.171,-9.722 8.328,-9.836c0.074,-0.001 0.147,-0.002 0.221,-0.002Zm-0.101,1.497c-3.252,0.031 -6.299,2.528 -6.916,5.747c-0.854,4.449 3.333,9.296 8.39,8.286c2.403,-0.479 5.149,-3.126 5.52,-6.041c0.502,-3.95 -2.709,-8.006 -6.994,-7.992Zm0.041,6.102l3.078,-3.078l1.127,1.128l-3.078,3.078l3.078,3.077l-1.127,1.128l-3.078,-3.078l-3.078,3.078l-1.127,-1.128l3.078,-3.077l-3.078,-3.078l1.127,-1.128l3.078,3.078Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
29
|
+
readonly CUSTOM_CROSSHAIR: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n <!-- White border (underneath) -->\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"30\" stroke=\"white\" stroke-width=\"5\"/>\n <line x1=\"2\" y1=\"16\" x2=\"30\" y2=\"16\" stroke=\"white\" stroke-width=\"5\"/>\n\n <!-- Black crosshair lines (on top) -->\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"30\" stroke=\"black\" stroke-width=\"2\"/>\n <line x1=\"2\" y1=\"16\" x2=\"30\" y2=\"16\" stroke=\"black\" stroke-width=\"2\"/>\n </svg>";
|
|
30
|
+
readonly EDIT: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_234-edit\" serif:id=\"234-edit\" d=\"M4.089,16.719l-0,3.391l3.39,-0l10,-10l-3.391,-3.391l-9.999,10Zm16.012,-9.231c0.353,-0.353 0.353,-0.922 0,-1.275l-2.116,-2.116c-0.352,-0.352 -0.922,-0.352 -1.275,0l-1.654,1.655l3.39,3.39l1.655,-1.654Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
31
|
+
readonly EXPORT: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\"xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\">\n <g transform=\"matrix(1,0,0,1,-2280,-72)\">\n <g id=\"_396-export\" transform=\"matrix(1.25,0,0,1.25,2277,69)\">\n <path d=\"M6,20C5.45,20 4.979,19.804 4.588,19.413C4.196,19.021 4,18.55 4,18L4,15L6,15L6,18L18,18L18,15L20,15L20,18C20,18.55 19.804,19.021 19.413,19.413C19.021,19.804 18.55,20 18,20L6,20ZM12,16L7,11L8.4,9.55L11,12.15L11,4L13,4L13,12.15L15.6,9.55L17,11L12,16Z\" style=\"fill-rule:nonzero;\"/>\n </g>\n </g>\n </svg>";
|
|
32
|
+
readonly INFO: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_223-info\" serif:id=\"223-info\" d=\"M13.684,3.24c0.512,-0 0.943,0.177 1.294,0.532c0.351,0.355 0.526,0.785 0.526,1.288c0,0.504 -0.177,0.933 -0.532,1.288c-0.355,0.355 -0.785,0.532 -1.288,0.532c-0.495,0 -0.92,-0.177 -1.275,-0.532c-0.355,-0.355 -0.533,-0.784 -0.533,-1.288c0,-0.503 0.176,-0.933 0.526,-1.288c0.351,-0.355 0.778,-0.532 1.282,-0.532Zm0.768,5.696l-2.539,8.803c-0.14,0.503 -0.21,0.834 -0.21,0.99c-0,0.091 0.037,0.176 0.111,0.254c0.075,0.079 0.153,0.118 0.236,0.118c0.14,-0 0.28,-0.062 0.421,-0.186c0.371,-0.305 0.817,-0.858 1.337,-1.659l0.421,0.248c-1.247,2.171 -2.572,3.256 -3.975,3.256c-0.536,0 -0.964,-0.151 -1.281,-0.452c-0.318,-0.301 -0.477,-0.683 -0.477,-1.145c-0,-0.306 0.07,-0.694 0.21,-1.164l1.722,-5.919c0.165,-0.569 0.247,-0.998 0.247,-1.287c0,-0.182 -0.078,-0.343 -0.235,-0.483c-0.157,-0.14 -0.372,-0.211 -0.644,-0.211c-0.124,0 -0.272,0.005 -0.446,0.013l0.161,-0.495l4.198,-0.681l0.743,-0Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
33
|
+
readonly SAVE: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_010-save\" serif:id=\"010-save\" d=\"M14.942,9.325l-9.792,-0l0,-3.908l9.792,-0l0,3.908Zm-2.942,9.792c-0.827,-0 -1.517,-0.276 -2.069,-0.828c-0.551,-0.552 -0.827,-1.249 -0.827,-2.092c-0,-0.843 0.276,-1.54 0.827,-2.091c0.552,-0.552 1.242,-0.828 2.069,-0.828c0.827,0 1.517,0.276 2.069,0.828c0.551,0.551 0.827,1.248 0.827,2.091c0,0.843 -0.276,1.54 -0.827,2.092c-0.552,0.552 -1.242,0.828 -2.069,0.828Zm4.919,-15.677l-11.769,0c-0.582,0 -1.057,0.192 -1.425,0.575c-0.368,0.383 -0.552,0.85 -0.552,1.402l0,13.7c0,0.551 0.192,1.019 0.575,1.402c0.383,0.383 0.851,0.574 1.402,0.574l13.7,0c0.551,0 1.019,-0.191 1.402,-0.574c0.383,-0.383 0.575,-0.851 0.575,-1.402l-0,-11.769l-3.908,-3.908Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
34
|
+
readonly SETTINGS: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\" xmlns:serif=\"http://www.serif.com/\" style=\"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;\"><path id=\"_063-settings\" serif:id=\"063-settings\" d=\"M11.977,15.153c-0.868,-0.028 -1.587,-0.326 -2.157,-0.896c-0.569,-0.569 -0.854,-1.288 -0.854,-2.156c-0,-0.868 0.285,-1.587 0.854,-2.157c0.57,-0.569 1.289,-0.854 2.157,-0.854c0.868,0 1.587,0.285 2.156,0.854c0.57,0.57 0.855,1.289 0.855,2.157c-0,0.868 -0.285,1.587 -0.855,2.156c-0.569,0.57 -1.288,0.868 -2.156,0.896Zm6.469,-2.198c0.027,-0.271 0.041,-0.556 0.041,-0.854c-0,-0.298 -0.014,-0.583 -0.041,-0.855l1.831,-1.424c0.163,-0.162 0.19,-0.352 0.082,-0.569l-1.75,-3.011c-0.108,-0.19 -0.285,-0.244 -0.529,-0.163l-2.156,0.855c-0.434,-0.353 -0.923,-0.638 -1.465,-0.855l-0.326,-2.278c-0.054,-0.245 -0.19,-0.367 -0.407,-0.367l-3.499,0c-0.217,0 -0.352,0.122 -0.407,0.367l-0.325,2.278c-0.543,0.217 -1.031,0.502 -1.465,0.855l-2.156,-0.855c-0.244,-0.081 -0.421,-0.027 -0.529,0.163l-1.75,3.011c-0.108,0.217 -0.081,0.407 0.082,0.569l1.83,1.424c-0.027,0.272 -0.04,0.557 -0.04,0.855c-0,0.298 0.013,0.583 0.04,0.854l-1.83,1.424c-0.163,0.163 -0.19,0.353 -0.082,0.57l1.75,3.011c0.108,0.19 0.285,0.244 0.529,0.163l2.156,-0.855c0.434,0.353 0.922,0.638 1.465,0.855l0.325,2.278c0.055,0.244 0.19,0.367 0.407,0.367l3.499,-0c0.217,-0 0.353,-0.123 0.407,-0.367l0.326,-2.278c0.542,-0.217 1.031,-0.502 1.465,-0.855l2.156,0.855c0.244,0.081 0.421,0.027 0.529,-0.163l1.75,-3.011c0.108,-0.217 0.081,-0.407 -0.082,-0.57l-1.831,-1.424Z\" style=\"fill-rule:nonzero;\"/></svg>";
|
|
35
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof | MDN typeof}
|
|
3
|
+
*/
|
|
4
|
+
export declare const TYPEOF: {
|
|
5
|
+
readonly BIGINT: "bigint";
|
|
6
|
+
readonly BOOLEAN: "boolean";
|
|
7
|
+
readonly FUNCTION: "function";
|
|
8
|
+
readonly NULL: "null";
|
|
9
|
+
readonly NUMBER: "number";
|
|
10
|
+
readonly STRING: "string";
|
|
11
|
+
readonly SYMBOL: "symbol";
|
|
12
|
+
readonly UNDEFINED: "undefined";
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './constants/constants.ts';
|
|
2
|
+
export { CURSOR } from './constants/cursor.constant.ts';
|
|
3
|
+
export type { Cursor } from './types/cursor.type.ts';
|
|
4
|
+
export { CUSTOM_EVENTS } from './constants/events/custom-events.constant.ts';
|
|
5
|
+
export type { CustomEvents } from './types/events/custom-events.type.ts';
|
|
6
|
+
export { DRAG_EVENTS } from './constants/events/drag-events.constant.ts';
|
|
7
|
+
export type { DragEvents } from './types/events/drag-events.type.ts';
|
|
8
|
+
export { INSERT_ADJACENT_HTML } from './constants/insert-adjacent-html.constant.ts';
|
|
9
|
+
export type { InsertAdjacentHtml } from './types/insert-adjacent-html.type.ts';
|
|
10
|
+
export { KEYBOARD_EVENTS } from './constants/events/keyboard-events.constant.ts';
|
|
11
|
+
export type { KeyboardEvents } from './types/events/keyboard-events.type.ts';
|
|
12
|
+
export { MEDIA_STREAM_EVENTS } from './constants/events/media-stream-events.constant.ts';
|
|
13
|
+
export type { MediaStreamEvents } from './types/events/media-stream-events.type.ts';
|
|
14
|
+
export { MOUSE_EVENTS } from './constants/events/mouse-events.constant.ts';
|
|
15
|
+
export type { MouseEvents } from './types/events/mouse-events.type.ts';
|
|
16
|
+
export { PICTURE_IN_PICTURE_EVENTS } from './constants/events/picture-in-picture-events.constant.ts';
|
|
17
|
+
export type { PictureInPictureEvents } from './types/events/picture-in-picture-events.type.ts';
|
|
18
|
+
export { POINTER_EVENTS } from './constants/events/pointer-events.constant.ts';
|
|
19
|
+
export type { PointerEvents } from './types/events/pointer-events.type.ts';
|
|
20
|
+
export { SVG } from './constants/svg.constant.ts';
|
|
21
|
+
export type { Svg } from './types/svg.type.ts';
|
|
22
|
+
export { THEMES } from './constants/themes.contant.ts';
|
|
23
|
+
export type { Themes } from './types/themes.type.ts';
|
|
24
|
+
export { TOUCH_EVENTS } from './constants/events/touch-events.constant.ts';
|
|
25
|
+
export type { TouchEvents } from './types/events/touch-events.type.ts';
|
|
26
|
+
export { TYPEOF } from './constants/typeof.constant.ts';
|
|
27
|
+
export type { TypeOf } from './types/typeof.type.ts';
|
|
28
|
+
export { WHEEL_EVENTS } from './constants/events/wheel-events.constant.ts';
|
|
29
|
+
export type { WheelEvents } from './types/events/wheel-events.type.ts';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MEDIA_STREAM_EVENTS } from '../../constants/events/media-stream-events.constant.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Union type of all values in the {@link MEDIA_STREAM_EVENTS} constant.
|
|
4
|
+
*/
|
|
5
|
+
export type MediaStreamEvents = (typeof MEDIA_STREAM_EVENTS)[keyof typeof MEDIA_STREAM_EVENTS];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PICTURE_IN_PICTURE_EVENTS } from '../../constants/events/picture-in-picture-events.constant.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Union type of all values in the {@link PICTURE_IN_PICTURE_EVENTS} constant.
|
|
4
|
+
*/
|
|
5
|
+
export type PictureInPictureEvents = (typeof PICTURE_IN_PICTURE_EVENTS)[keyof typeof PICTURE_IN_PICTURE_EVENTS];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { INSERT_ADJACENT_HTML } from '../constants/insert-adjacent-html.constant.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Union type of all values in the {@link INSERT_ADJACENT_HTML} constant.
|
|
4
|
+
*/
|
|
5
|
+
export type InsertAdjacentHtml = (typeof INSERT_ADJACENT_HTML)[keyof typeof INSERT_ADJACENT_HTML];
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@albi_scando/as-const-lib",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A TypeScript library providing strongly typed constants and utility types for safer, more predictable code.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/albertoscandolara/as-const-lib"
|
|
12
|
+
},
|
|
13
|
+
"author": "Alberto Scandolara",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/albertoscandolara/as-const-lib/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/albertoscandolara/as-const-lib#readme",
|
|
19
|
+
"main": "./dist/as-const-lib.umd.js",
|
|
20
|
+
"module": "./dist/as-const-lib.es.js",
|
|
21
|
+
"typings": "./dist/types/main.d.ts",
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && vite build",
|
|
24
|
+
"dev": "vite serve ./src/playground",
|
|
25
|
+
"docs:build": "typedoc",
|
|
26
|
+
"docs:serve": "npx http-server docs -o",
|
|
27
|
+
"format": "prettier --write .",
|
|
28
|
+
"prepare": "husky",
|
|
29
|
+
"preview": "vite preview",
|
|
30
|
+
"prettier": "prettier . --check",
|
|
31
|
+
"prettier:fix": "prettier . --write",
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"lint:fix": "eslint . --fix",
|
|
34
|
+
"formatter": "npm run prettier && npm run lint",
|
|
35
|
+
"formatter:fix": "npm run prettier:fix && npm run lint:fix"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@commitlint/cli": "^19.8.1",
|
|
39
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
40
|
+
"@eslint/js": "^9.14.0",
|
|
41
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
42
|
+
"@semantic-release/git": "^10.0.1",
|
|
43
|
+
"@semantic-release/github": "^11.0.4",
|
|
44
|
+
"@semantic-release/npm": "^12.0.2",
|
|
45
|
+
"@types/node": "^22.8.6",
|
|
46
|
+
"@types/numeric": "^1.2.6",
|
|
47
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
48
|
+
"eslint": "^9.14.0",
|
|
49
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
50
|
+
"globals": "^15.11.0",
|
|
51
|
+
"http-server": "^14.1.1",
|
|
52
|
+
"husky": "^9.1.7",
|
|
53
|
+
"lint-staged": "^15.5.2",
|
|
54
|
+
"prettier": "^3.3.3",
|
|
55
|
+
"sass": "^1.81.0",
|
|
56
|
+
"semantic-release": "^24.2.7",
|
|
57
|
+
"typedoc": "^0.28.10",
|
|
58
|
+
"typescript": "^5.8.2",
|
|
59
|
+
"typescript-eslint": "^8.12.2",
|
|
60
|
+
"validate-branch-name": "^1.3.2",
|
|
61
|
+
"vite": "^7.1.2",
|
|
62
|
+
"vite-plugin-dts": "^4.5.4",
|
|
63
|
+
"vite-plugin-static-copy": "^3.1.1"
|
|
64
|
+
},
|
|
65
|
+
"packageManager": "pnpm@9.12.3",
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=22.11.0"
|
|
68
|
+
},
|
|
69
|
+
"lint-staged": {
|
|
70
|
+
"*.ts": "prettier --write",
|
|
71
|
+
"*.{js,scss,css,md}": [
|
|
72
|
+
"prettier --write",
|
|
73
|
+
"eslint --fix"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|