ziko 0.0.5 → 0.0.6
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/ziko.cjs +9999 -9853
- package/dist/ziko.js +10000 -9854
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +9999 -9853
- package/package.json +12 -4
- package/starter/bin/index.js +10 -0
- package/wrapper/react/README.md +26 -0
- package/wrapper/react/index.jsx +7 -1
- package/wrapper/svelte/ZikoUI.svelte +15 -0
- package/wrapper/vue/ZikoUI.vue +8 -2
- package/core/App/Accessibility/index.js +0 -0
- package/core/App/Globals/__Target__.js +0 -3
- package/core/App/Globals/__UI__.js +0 -38
- package/core/App/Globals/__init__.js +0 -8
- package/core/App/Globals/index.js +0 -18
- package/core/App/Router/index.js +0 -40
- package/core/App/Seo/index.js +0 -43
- package/core/App/Themes/dark.js +0 -885
- package/core/App/Themes/index.js +0 -11
- package/core/App/Themes/light.js +0 -255
- package/core/App/app.js +0 -46
- package/core/App/index.js +0 -12
- package/core/Data/Api/fetchdom.js +0 -14
- package/core/Data/Api/index.js +0 -4
- package/core/Data/Api/preload.js +0 -11
- package/core/Data/Converter/canvas.js +0 -25
- package/core/Data/Converter/csv.js +0 -33
- package/core/Data/Converter/index.js +0 -25
- package/core/Data/Converter/json.js +0 -80
- package/core/Data/Converter/markdown.js +0 -83
- package/core/Data/Converter/svg.js +0 -11
- package/core/Data/Parser/markdown.js +0 -0
- package/core/Data/Parser/xml.js +0 -47
- package/core/Data/Strings/index.js +0 -26
- package/core/Data/decorators.js +0 -0
- package/core/Data/index.js +0 -64
- package/core/Graphics/Canvas/Elements/Basic/arc.js +0 -43
- package/core/Graphics/Canvas/Elements/Basic/image.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/line.js +0 -26
- package/core/Graphics/Canvas/Elements/Basic/path.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/points.js +0 -48
- package/core/Graphics/Canvas/Elements/Basic/polygon.js +0 -7
- package/core/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/rect.js +0 -46
- package/core/Graphics/Canvas/Elements/Basic/text.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/plot.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/scatter.js +0 -2
- package/core/Graphics/Canvas/Elements/Chart/stem.js +0 -0
- package/core/Graphics/Canvas/Elements/Element.js +0 -115
- package/core/Graphics/Canvas/Elements/Groupe.js +0 -0
- package/core/Graphics/Canvas/Elements/grid.js +0 -0
- package/core/Graphics/Canvas/Elements/index.js +0 -13
- package/core/Graphics/Canvas/Filter/index.js +0 -0
- package/core/Graphics/Canvas/Paint/index.js +0 -0
- package/core/Graphics/Canvas/Utils/color.js +0 -8
- package/core/Graphics/Canvas/Utils/floodFill.js +0 -58
- package/core/Graphics/Canvas/_canvas_offscreen +0 -0
- package/core/Graphics/Canvas/canvas.js +0 -189
- package/core/Graphics/Canvas/index.js +0 -15
- package/core/Graphics/Svg/Elements/ZikoSvgElement.js +0 -28
- package/core/Graphics/Svg/Elements/circle.js +0 -34
- package/core/Graphics/Svg/Elements/ellipse.js +0 -29
- package/core/Graphics/Svg/Elements/foreignObject.js +0 -46
- package/core/Graphics/Svg/Elements/grid.js +0 -9
- package/core/Graphics/Svg/Elements/groupe.js +0 -29
- package/core/Graphics/Svg/Elements/image.js +0 -33
- package/core/Graphics/Svg/Elements/line.js +0 -29
- package/core/Graphics/Svg/Elements/path.js +0 -59
- package/core/Graphics/Svg/Elements/polygon.js +0 -31
- package/core/Graphics/Svg/Elements/polyline.js +0 -4
- package/core/Graphics/Svg/Elements/rect.js +0 -43
- package/core/Graphics/Svg/Elements/text.js +0 -26
- package/core/Graphics/Svg/index.js +0 -1
- package/core/Graphics/Svg/svg.js +0 -117
- package/core/Graphics/index.js +0 -61
- package/core/Math/Calculus/Special Functions/bessel.js +0 -31
- package/core/Math/Calculus/Special Functions/beta.js +0 -38
- package/core/Math/Calculus/Special Functions/gamma.js +0 -30
- package/core/Math/Calculus/Special Functions/index.js +0 -4
- package/core/Math/Calculus/index.js +0 -1
- package/core/Math/Complex/Fractals/julia.js +0 -0
- package/core/Math/Complex/index.js +0 -191
- package/core/Math/Discret/Combinaison/index.js +0 -34
- package/core/Math/Discret/Conversion/index.js +0 -86
- package/core/Math/Discret/Logic/index.js +0 -46
- package/core/Math/Discret/Permutation/index.js +0 -31
- package/core/Math/Discret/Set/index.js +0 -2
- package/core/Math/Discret/Set/powerSet.js +0 -15
- package/core/Math/Discret/Set/subSet.js +0 -10
- package/core/Math/Discret/index.js +0 -23
- package/core/Math/Functions/index.js +0 -182
- package/core/Math/Matrix/Decomposition.js +0 -90
- package/core/Math/Matrix/LinearSystem.js +0 -10
- package/core/Math/Matrix/Matrix.js +0 -712
- package/core/Math/Matrix/index.js +0 -3
- package/core/Math/Numeric/index.js +0 -0
- package/core/Math/Random/index.js +0 -173
- package/core/Math/Signal/__np.py.txt +0 -40
- package/core/Math/Signal/conv.js +0 -175
- package/core/Math/Signal/fft.js +0 -55
- package/core/Math/Signal/filter.js +0 -39
- package/core/Math/Signal/functions.js +0 -146
- package/core/Math/Signal/index.js +0 -110
- package/core/Math/Statistics/Functions/index.js +0 -100
- package/core/Math/Statistics/index.js +0 -16
- package/core/Math/Utils/arithmetic.js +0 -139
- package/core/Math/Utils/checkers.js +0 -11
- package/core/Math/Utils/comparaison.js +0 -1
- package/core/Math/Utils/conversions.js +0 -7
- package/core/Math/Utils/discret.js +0 -28
- package/core/Math/Utils/index.js +0 -102
- package/core/Math/Utils/mapfun.js +0 -43
- package/core/Math/absract.js +0 -1
- package/core/Math/const.js +0 -3
- package/core/Math/index.js +0 -193
- package/core/Reactivity/Events/Global/Click.js +0 -56
- package/core/Reactivity/Events/Global/Clipboard.js +0 -84
- package/core/Reactivity/Events/Global/CustomEvent.js +0 -53
- package/core/Reactivity/Events/Global/Drag.js +0 -137
- package/core/Reactivity/Events/Global/Focus.js +0 -56
- package/core/Reactivity/Events/Global/Key.js +0 -104
- package/core/Reactivity/Events/Global/Mouse.js +0 -230
- package/core/Reactivity/Events/Global/Pointer.js +0 -214
- package/core/Reactivity/Events/Global/Touch.js +0 -0
- package/core/Reactivity/Events/Global/Wheel.js +0 -44
- package/core/Reactivity/Events/Partiel/Hash.js +0 -44
- package/core/Reactivity/Events/Partiel/Input.js +0 -59
- package/core/Reactivity/Events/Partiel/MediaEvent.js +0 -1
- package/core/Reactivity/Events/ZikoEvent.js +0 -91
- package/core/Reactivity/Events/index.js +0 -60
- package/core/Reactivity/Observer/index.js +0 -3
- package/core/Reactivity/Observer/intersection.js +0 -40
- package/core/Reactivity/Observer/mutation.js +0 -90
- package/core/Reactivity/Observer/resize.js +0 -47
- package/core/Reactivity/Use/Contexte/index.js +0 -1
- package/core/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -14
- package/core/Reactivity/Use/Decorators/index.js +0 -4
- package/core/Reactivity/Use/Interactions/index.js +0 -4
- package/core/Reactivity/Use/Interactions/useBluetooth.js +0 -48
- package/core/Reactivity/Use/Interactions/useChannel.js +0 -50
- package/core/Reactivity/Use/Interactions/useEventEmmiter.js +0 -64
- package/core/Reactivity/Use/Interactions/useSerial.js +0 -0
- package/core/Reactivity/Use/Interactions/useThread.js +0 -44
- package/core/Reactivity/Use/Interactions/useUsb.js +0 -0
- package/core/Reactivity/Use/Sensors/index.js +0 -2
- package/core/Reactivity/Use/Sensors/useBattery.js +0 -36
- package/core/Reactivity/Use/Sensors/useCamera.js +0 -0
- package/core/Reactivity/Use/Sensors/useGeolocation.js +0 -17
- package/core/Reactivity/Use/Sensors/useMicro.js +0 -0
- package/core/Reactivity/Use/Sensors/useOrientation.js +0 -0
- package/core/Reactivity/Use/Storage/index.js +0 -1
- package/core/Reactivity/Use/Storage/useCookie.js +0 -0
- package/core/Reactivity/Use/Storage/useIndexedDb.js +0 -0
- package/core/Reactivity/Use/Storage/useStorage.js +0 -74
- package/core/Reactivity/Use/UI/index.js +0 -4
- package/core/Reactivity/Use/UI/useCssLink.js +0 -0
- package/core/Reactivity/Use/UI/useCssText.js +0 -21
- package/core/Reactivity/Use/UI/useFavIcon.js +0 -38
- package/core/Reactivity/Use/UI/useLinearGradient.js +0 -0
- package/core/Reactivity/Use/UI/useMediaQuery.js +0 -1
- package/core/Reactivity/Use/UI/useRadialGradient.js +0 -0
- package/core/Reactivity/Use/UI/useStyle.js +0 -54
- package/core/Reactivity/Use/UI/useTheme.js +0 -62
- package/core/Reactivity/Use/UI/useTitle.js +0 -30
- package/core/Reactivity/Use/index.js +0 -82
- package/core/Reactivity/Use/todo.md +0 -26
- package/core/Reactivity/index.js +0 -3
- package/core/Time/animation.js +0 -76
- package/core/Time/index.js +0 -54
- package/core/Time/loop.js +0 -83
- package/core/Time/utils/decorators.js +0 -17
- package/core/Time/utils/ease.js +0 -144
- package/core/Time/utils/index.js +0 -18
- package/core/Time/utils/performance.js +0 -16
- package/core/Time/utils/ui.js +0 -26
- package/core/UI/CustomElement/Elements/Accordion/index.js +0 -62
- package/core/UI/CustomElement/Elements/Carousel/index.js +0 -47
- package/core/UI/CustomElement/Elements/CodeNote/CodeCell.js +0 -176
- package/core/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -69
- package/core/UI/CustomElement/Elements/CodeNote/SubElements.js +0 -64
- package/core/UI/CustomElement/Elements/CodeNote/index.js +0 -2
- package/core/UI/CustomElement/Elements/Columns.js +0 -1
- package/core/UI/CustomElement/Elements/FAB.js +0 -0
- package/core/UI/CustomElement/Elements/Menu.js +0 -0
- package/core/UI/CustomElement/Elements/Notification.js +0 -0
- package/core/UI/CustomElement/Elements/Popover.js +0 -0
- package/core/UI/CustomElement/Elements/Popup.js +0 -0
- package/core/UI/CustomElement/Elements/Swipper.js +0 -4
- package/core/UI/CustomElement/Elements/Tabs/index.js +0 -111
- package/core/UI/CustomElement/Elements/Timeline.js +0 -0
- package/core/UI/CustomElement/Elements/Toast.js +0 -0
- package/core/UI/CustomElement/Elements/Treeview.js +0 -0
- package/core/UI/CustomElement/Elements/index.js +0 -4
- package/core/UI/CustomElement/Flex.js +0 -97
- package/core/UI/CustomElement/Grid.js +0 -30
- package/core/UI/CustomElement/index.js +0 -3
- package/core/UI/Embaded/index.js +0 -1
- package/core/UI/Inputs/Primitives/btn.js +0 -30
- package/core/UI/Inputs/Primitives/elements.js +0 -28
- package/core/UI/Inputs/Primitives/inputs.js +0 -324
- package/core/UI/Inputs/Primitives/select.js +0 -14
- package/core/UI/Inputs/Primitives/textarea.js +0 -15
- package/core/UI/Inputs/camera.js +0 -23
- package/core/UI/Inputs/index.js +0 -20
- package/core/UI/List/elements.js +0 -0
- package/core/UI/List/index.js +0 -127
- package/core/UI/Media/Audio/index.js +0 -38
- package/core/UI/Media/Image/figure.js +0 -16
- package/core/UI/Media/Image/image.js +0 -33
- package/core/UI/Media/Image/index.js +0 -2
- package/core/UI/Media/Video/index.js +0 -49
- package/core/UI/Media/index.js +0 -3
- package/core/UI/Misc/index.js +0 -45
- package/core/UI/Semantic/index.js +0 -61
- package/core/UI/Style/index.js +0 -499
- package/core/UI/Table/elements.js +0 -94
- package/core/UI/Table/index.js +0 -3
- package/core/UI/Table/table.js +0 -112
- package/core/UI/Table/utils.js +0 -12
- package/core/UI/Text/heading.js +0 -34
- package/core/UI/Text/index.js +0 -3
- package/core/UI/Text/p.js +0 -36
- package/core/UI/Text/pre.js +0 -0
- package/core/UI/Text/text.js +0 -65
- package/core/UI/Utils/index.js +0 -70
- package/core/UI/ZikoUIElement.js +0 -503
- package/core/UI/index.js +0 -154
- package/core/__proto__/Array.js +0 -74
- package/core/__proto__/Function.js +0 -0
- package/core/__proto__/Number.js +0 -76
- package/core/__proto__/Object.js +0 -0
- package/core/__proto__/String.js +0 -0
- package/core/index.js +0 -72
- package/wrapper/react/readme.md +0 -19
package/core/Math/index.js
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { __NumberProto__ } from "../__proto__/Number.js";
|
|
2
|
-
import { __ArrayProto__ } from "../__proto__/Array.js";
|
|
3
|
-
import {PI,E,EPSILON} from "./const.js"
|
|
4
|
-
import { Signal } from "./Signal";
|
|
5
|
-
// __NumberProto__()
|
|
6
|
-
// __ArrayProto__()
|
|
7
|
-
import{
|
|
8
|
-
cos,
|
|
9
|
-
sin,
|
|
10
|
-
tan,
|
|
11
|
-
sinc,
|
|
12
|
-
cot,
|
|
13
|
-
sec,
|
|
14
|
-
csc,
|
|
15
|
-
abs,
|
|
16
|
-
sqrt,
|
|
17
|
-
pow,
|
|
18
|
-
sqrtn,
|
|
19
|
-
e,
|
|
20
|
-
ln,
|
|
21
|
-
acos,
|
|
22
|
-
asin,
|
|
23
|
-
atan,
|
|
24
|
-
acot,
|
|
25
|
-
cosh,
|
|
26
|
-
sinh,
|
|
27
|
-
tanh,
|
|
28
|
-
coth,
|
|
29
|
-
acosh,
|
|
30
|
-
asinh,
|
|
31
|
-
atanh,
|
|
32
|
-
min,
|
|
33
|
-
max,
|
|
34
|
-
sign,
|
|
35
|
-
floor,
|
|
36
|
-
ceil,
|
|
37
|
-
round,
|
|
38
|
-
fact,
|
|
39
|
-
hypot,
|
|
40
|
-
sig,
|
|
41
|
-
atan2,
|
|
42
|
-
} from "./Functions";
|
|
43
|
-
import {Random} from "./Random";
|
|
44
|
-
//import { Derivation } from "./Numeric";
|
|
45
|
-
import {complex,Complex} from "./Complex";
|
|
46
|
-
import{Matrix,LinearSystem,matrix,matrix2,matrix3,matrix4}from "./Matrix"
|
|
47
|
-
import Discret from "./Discret";
|
|
48
|
-
import {Logic,Base,Permutation,Combinaison,powerSet,subSet} from "./Discret";
|
|
49
|
-
import {
|
|
50
|
-
Utils,
|
|
51
|
-
zeros,
|
|
52
|
-
ones,
|
|
53
|
-
nums,
|
|
54
|
-
sum,
|
|
55
|
-
prod,
|
|
56
|
-
add,
|
|
57
|
-
mul,
|
|
58
|
-
div,
|
|
59
|
-
sub,
|
|
60
|
-
modulo,
|
|
61
|
-
rad2deg,
|
|
62
|
-
deg2rad,
|
|
63
|
-
arange,
|
|
64
|
-
linspace,
|
|
65
|
-
logspace,
|
|
66
|
-
geomspace,
|
|
67
|
-
norm,
|
|
68
|
-
lerp,
|
|
69
|
-
map,
|
|
70
|
-
clamp,
|
|
71
|
-
pgcd,
|
|
72
|
-
ppcm,
|
|
73
|
-
isApproximatlyEqual,
|
|
74
|
-
inRange,
|
|
75
|
-
cartesianProduct,
|
|
76
|
-
mapfun
|
|
77
|
-
}from "./Utils"
|
|
78
|
-
const Math={
|
|
79
|
-
PI,
|
|
80
|
-
E,
|
|
81
|
-
EPSILON,
|
|
82
|
-
Random,
|
|
83
|
-
complex,
|
|
84
|
-
Complex,
|
|
85
|
-
Matrix,
|
|
86
|
-
LinearSystem,
|
|
87
|
-
matrix,
|
|
88
|
-
matrix2,
|
|
89
|
-
matrix3,
|
|
90
|
-
matrix4,
|
|
91
|
-
cos,
|
|
92
|
-
sin,
|
|
93
|
-
tan,
|
|
94
|
-
sinc,
|
|
95
|
-
sec,
|
|
96
|
-
csc,
|
|
97
|
-
cot,
|
|
98
|
-
abs,
|
|
99
|
-
sqrt,
|
|
100
|
-
pow,
|
|
101
|
-
sqrtn,
|
|
102
|
-
e,
|
|
103
|
-
ln,
|
|
104
|
-
acos,
|
|
105
|
-
asin,
|
|
106
|
-
atan,
|
|
107
|
-
acot,
|
|
108
|
-
cosh,
|
|
109
|
-
sinh,
|
|
110
|
-
tanh,
|
|
111
|
-
coth,
|
|
112
|
-
acosh,
|
|
113
|
-
asinh,
|
|
114
|
-
atanh,
|
|
115
|
-
min,
|
|
116
|
-
max,
|
|
117
|
-
sign,
|
|
118
|
-
floor,
|
|
119
|
-
ceil,
|
|
120
|
-
round,
|
|
121
|
-
fact,
|
|
122
|
-
hypot,
|
|
123
|
-
sig,
|
|
124
|
-
atan2,
|
|
125
|
-
// Derivation,
|
|
126
|
-
Utils,
|
|
127
|
-
mapfun,
|
|
128
|
-
nums,
|
|
129
|
-
zeros,
|
|
130
|
-
ones,
|
|
131
|
-
sum,
|
|
132
|
-
prod,
|
|
133
|
-
add,
|
|
134
|
-
mul,
|
|
135
|
-
div,
|
|
136
|
-
sub,
|
|
137
|
-
modulo,
|
|
138
|
-
rad2deg,
|
|
139
|
-
deg2rad,
|
|
140
|
-
arange,
|
|
141
|
-
linspace,
|
|
142
|
-
logspace,
|
|
143
|
-
geomspace,
|
|
144
|
-
norm,
|
|
145
|
-
lerp,
|
|
146
|
-
map,
|
|
147
|
-
clamp,
|
|
148
|
-
pgcd,
|
|
149
|
-
ppcm,
|
|
150
|
-
isApproximatlyEqual,
|
|
151
|
-
inRange,
|
|
152
|
-
cartesianProduct,
|
|
153
|
-
Discret,
|
|
154
|
-
Logic,
|
|
155
|
-
Base,
|
|
156
|
-
Permutation,
|
|
157
|
-
Combinaison,
|
|
158
|
-
powerSet,
|
|
159
|
-
subSet,
|
|
160
|
-
Signal,
|
|
161
|
-
ExtractAll: function () {
|
|
162
|
-
const keys = Object.keys(this);
|
|
163
|
-
for (let i = 0; i < keys.length; i++) {
|
|
164
|
-
const key = keys[i];
|
|
165
|
-
if (key !== 'ExtractAll' && key !== 'RemoveAll') {
|
|
166
|
-
globalThis[key] = this[key];
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
return this;
|
|
170
|
-
},
|
|
171
|
-
RemoveAll: function () {
|
|
172
|
-
const keys = Object.keys(this);
|
|
173
|
-
for (let i = 0; i < keys.length; i++) {
|
|
174
|
-
const key = keys[i];
|
|
175
|
-
if (key !== 'RemoveAll') {
|
|
176
|
-
delete globalThis[key];
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return this;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
export * from "./const.js"
|
|
183
|
-
export * from "./Functions"
|
|
184
|
-
export * from "./Complex"
|
|
185
|
-
export * from "./Matrix"
|
|
186
|
-
export * from "./Discret"
|
|
187
|
-
export * from "./Numeric"
|
|
188
|
-
export * from "./Random"
|
|
189
|
-
export * from "./Signal"
|
|
190
|
-
export * from "./Utils"
|
|
191
|
-
export * from "./Statistics"
|
|
192
|
-
export default Math;
|
|
193
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ZikoEvent , EVENT_CONTROLLER } from "../ZikoEvent.js";
|
|
2
|
-
function click_controller(e){
|
|
3
|
-
EVENT_CONTROLLER.call(this,e,"click",null,null)
|
|
4
|
-
}
|
|
5
|
-
function dbclick_controller(e){
|
|
6
|
-
EVENT_CONTROLLER.call(this,e,"dbclick",null,null)
|
|
7
|
-
}
|
|
8
|
-
class ZikoEventClick extends ZikoEvent{
|
|
9
|
-
constructor(target){
|
|
10
|
-
super(target);
|
|
11
|
-
this.event=null;
|
|
12
|
-
this.cache={
|
|
13
|
-
prefixe:"",
|
|
14
|
-
preventDefault:{
|
|
15
|
-
click:false,
|
|
16
|
-
dbclick:false,
|
|
17
|
-
},
|
|
18
|
-
paused:{
|
|
19
|
-
click:false,
|
|
20
|
-
dbclick:false,
|
|
21
|
-
},
|
|
22
|
-
stream:{
|
|
23
|
-
enabled:{
|
|
24
|
-
click:false,
|
|
25
|
-
dbclick:false,
|
|
26
|
-
},
|
|
27
|
-
clear:{
|
|
28
|
-
click:false,
|
|
29
|
-
dbclick:false,
|
|
30
|
-
},
|
|
31
|
-
history:{
|
|
32
|
-
click:[],
|
|
33
|
-
dbclick:[],
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
callbacks:{
|
|
37
|
-
click:[],
|
|
38
|
-
dbclick:[],
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
this.__controller={
|
|
42
|
-
click:click_controller.bind(this),
|
|
43
|
-
dbclick:dbclick_controller.bind(this),
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
onClick(...callbacks){
|
|
47
|
-
this.__onEvent("click",{},...callbacks)
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
onDbClick(...callbacks){
|
|
51
|
-
this.__onEvent("dbclick",{},...callbacks)
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const Click=Target=>new ZikoEventClick(Target);
|
|
56
|
-
export default Click
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ZikoEvent , EVENT_CONTROLLER } from "../ZikoEvent.js";
|
|
2
|
-
function copy_controller(e){
|
|
3
|
-
EVENT_CONTROLLER.call(this,e,"copy",null,null)
|
|
4
|
-
}
|
|
5
|
-
function cut_controller(e){
|
|
6
|
-
EVENT_CONTROLLER.call(this,e,"cut",null,null)
|
|
7
|
-
}
|
|
8
|
-
function paste_controller(e){
|
|
9
|
-
EVENT_CONTROLLER.call(this,e,"paste",null,null)
|
|
10
|
-
}
|
|
11
|
-
function select_controller(e){
|
|
12
|
-
EVENT_CONTROLLER.call(this,e,"select",null,null)
|
|
13
|
-
}
|
|
14
|
-
class ZikoEventClipboard extends ZikoEvent{
|
|
15
|
-
constructor(target){
|
|
16
|
-
super(target);
|
|
17
|
-
this.event=null;
|
|
18
|
-
this.cache={
|
|
19
|
-
prefixe:"",
|
|
20
|
-
preventDefault:{
|
|
21
|
-
copy:false,
|
|
22
|
-
cut:false,
|
|
23
|
-
paste:false,
|
|
24
|
-
select:false
|
|
25
|
-
},
|
|
26
|
-
paused:{
|
|
27
|
-
copy:false,
|
|
28
|
-
cut:false,
|
|
29
|
-
paste:false,
|
|
30
|
-
select:false
|
|
31
|
-
},
|
|
32
|
-
stream:{
|
|
33
|
-
enabled:{
|
|
34
|
-
copy:false,
|
|
35
|
-
cut:false,
|
|
36
|
-
paste:false,
|
|
37
|
-
select:false,
|
|
38
|
-
},
|
|
39
|
-
clear:{
|
|
40
|
-
copy:false,
|
|
41
|
-
cut:false,
|
|
42
|
-
paste:false,
|
|
43
|
-
select:false,
|
|
44
|
-
},
|
|
45
|
-
history:{
|
|
46
|
-
copy:[],
|
|
47
|
-
cut:[],
|
|
48
|
-
paste:[],
|
|
49
|
-
select:[]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
callbacks:{
|
|
53
|
-
copy:[],
|
|
54
|
-
cut:[],
|
|
55
|
-
paste:[],
|
|
56
|
-
select:[]
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
this.__controller={
|
|
60
|
-
copy:copy_controller.bind(this),
|
|
61
|
-
cut:cut_controller.bind(this),
|
|
62
|
-
paste:paste_controller.bind(this),
|
|
63
|
-
select:select_controller.bind(this)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
onCopy(...callbacks){
|
|
67
|
-
this.__onEvent("copy",{},...callbacks)
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
onCut(...callbacks){
|
|
71
|
-
this.__onEvent("cut",{},...callbacks)
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
onPaste(...callbacks){
|
|
75
|
-
this.__onEvent("paste",{},...callbacks)
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
onSelect(...callbacks){
|
|
79
|
-
this.__onEvent("select",{},...callbacks)
|
|
80
|
-
return this;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
const Clipboard=Target=>new ZikoEventClipboard(Target);
|
|
84
|
-
export default Clipboard
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ZikoEvent , EVENT_CONTROLLER } from "../ZikoEvent.js";
|
|
2
|
-
const custom_event_controller=event_name=>function(e){
|
|
3
|
-
EVENT_CONTROLLER.call(this,e,event_name,null,null)
|
|
4
|
-
}
|
|
5
|
-
class ZikoCustomEvent extends ZikoEvent{
|
|
6
|
-
constructor(target){
|
|
7
|
-
super(target);
|
|
8
|
-
this.event=null;
|
|
9
|
-
this.cache={
|
|
10
|
-
prefixe:"",
|
|
11
|
-
preventDefault:{
|
|
12
|
-
},
|
|
13
|
-
paused:{
|
|
14
|
-
},
|
|
15
|
-
stream:{
|
|
16
|
-
enabled:{
|
|
17
|
-
},
|
|
18
|
-
clear:{
|
|
19
|
-
},
|
|
20
|
-
history:{
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
callbacks:{
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
this.__controller={
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
#init(event_name){
|
|
30
|
-
this.cache.preventDefault[event_name]=false;
|
|
31
|
-
this.cache.paused[event_name]=false;
|
|
32
|
-
this.cache.stream.enabled=false;
|
|
33
|
-
this.cache.stream.clear=false;
|
|
34
|
-
this.cache.stream.history=[];
|
|
35
|
-
this.cache.callbacks[event_name]=[]
|
|
36
|
-
this.__controller[event_name]=custom_event_controller(event_name).bind(this);
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
on(event_name,...callbacks){
|
|
40
|
-
if(!(this.__controller[event_name]))this.#init(event_name);
|
|
41
|
-
this.__onEvent(event_name,{},...callbacks)
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
emit(event_name,detail={}){
|
|
45
|
-
if(!(this.__controller[event_name]))this.#init(event_name);
|
|
46
|
-
this.detail=detail;
|
|
47
|
-
const event=new Event(event_name);
|
|
48
|
-
this.targetElement.dispatchEvent(event);
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const customEvent=Target=>new customEvent(Target);
|
|
53
|
-
export default customEvent;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { ZikoEvent , EVENT_CONTROLLER } from "../ZikoEvent.js";
|
|
2
|
-
function dragstart_controller(e){
|
|
3
|
-
EVENT_CONTROLLER(this,e,"start",null,null)
|
|
4
|
-
}
|
|
5
|
-
function drag_controller(e){
|
|
6
|
-
EVENT_CONTROLLER.call(this,e,"drag",null,null)
|
|
7
|
-
}
|
|
8
|
-
function dragend_controller(e){
|
|
9
|
-
EVENT_CONTROLLER.call(this,e,"end",null,null)
|
|
10
|
-
}
|
|
11
|
-
function drop_controller(e){
|
|
12
|
-
EVENT_CONTROLLER.call(this,e,"drop",null,null)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
class ZikoEventDrag extends ZikoEvent{
|
|
16
|
-
constructor(Target){
|
|
17
|
-
super(Target)
|
|
18
|
-
this.target.setAttribute("draggable",true);
|
|
19
|
-
this.cache={
|
|
20
|
-
prefixe:"drag",
|
|
21
|
-
preventDefault:{
|
|
22
|
-
drag:false,
|
|
23
|
-
start:false,
|
|
24
|
-
end:false,
|
|
25
|
-
enter:false,
|
|
26
|
-
leave:false,
|
|
27
|
-
over:false,
|
|
28
|
-
},
|
|
29
|
-
paused:{
|
|
30
|
-
drag:false,
|
|
31
|
-
start:false,
|
|
32
|
-
end:false,
|
|
33
|
-
enter:false,
|
|
34
|
-
leave:false,
|
|
35
|
-
over:false,
|
|
36
|
-
},
|
|
37
|
-
enabled:{
|
|
38
|
-
drag:false,
|
|
39
|
-
start:false,
|
|
40
|
-
end:false,
|
|
41
|
-
enter:false,
|
|
42
|
-
leave:false,
|
|
43
|
-
over:false,
|
|
44
|
-
},
|
|
45
|
-
callbacks:{
|
|
46
|
-
drag:[],
|
|
47
|
-
start:[],
|
|
48
|
-
end:[],
|
|
49
|
-
enter:[],
|
|
50
|
-
leave:[],
|
|
51
|
-
over:[]
|
|
52
|
-
},
|
|
53
|
-
stream:{
|
|
54
|
-
enabled:{
|
|
55
|
-
drag:false,
|
|
56
|
-
start:false,
|
|
57
|
-
end:false,
|
|
58
|
-
enter:false,
|
|
59
|
-
leave:false,
|
|
60
|
-
over:false,
|
|
61
|
-
},
|
|
62
|
-
clear:{
|
|
63
|
-
drag:false,
|
|
64
|
-
start:false,
|
|
65
|
-
end:false,
|
|
66
|
-
enter:false,
|
|
67
|
-
leave:false,
|
|
68
|
-
over:false,
|
|
69
|
-
},
|
|
70
|
-
history:{
|
|
71
|
-
drag:[],
|
|
72
|
-
start:[],
|
|
73
|
-
end:[],
|
|
74
|
-
enter:[],
|
|
75
|
-
leave:[],
|
|
76
|
-
over:[],
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
this.__controller={
|
|
81
|
-
start:dragstart_controller.bind(this),
|
|
82
|
-
drag:drag_controller.bind(this),
|
|
83
|
-
end:dragend_controller.bind(this)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
onStart(...callbacks){
|
|
87
|
-
this.__onEvent("start",{},...callbacks);
|
|
88
|
-
return this;
|
|
89
|
-
}
|
|
90
|
-
onDrag(...callbacks){
|
|
91
|
-
this.__onEvent("drag",{},...callbacks);
|
|
92
|
-
return this;
|
|
93
|
-
}
|
|
94
|
-
onEnd(...callbacks){
|
|
95
|
-
this.__onEvent("end",{},...callbacks);
|
|
96
|
-
return this;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
class ZikoEventDrop extends ZikoEvent{
|
|
100
|
-
constructor(target){
|
|
101
|
-
super(target);
|
|
102
|
-
this.event=null;
|
|
103
|
-
this.cache={
|
|
104
|
-
prefixe:"",
|
|
105
|
-
preventDefault:{
|
|
106
|
-
drop:false,
|
|
107
|
-
},
|
|
108
|
-
paused:{
|
|
109
|
-
drop:false,
|
|
110
|
-
},
|
|
111
|
-
stream:{
|
|
112
|
-
enabled:{
|
|
113
|
-
drop:false,
|
|
114
|
-
},
|
|
115
|
-
clear:{
|
|
116
|
-
drop:false,
|
|
117
|
-
},
|
|
118
|
-
history:{
|
|
119
|
-
drop:[],
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
callbacks:{
|
|
123
|
-
drop:[(self)=>console.log({dx:self.dx,dy:self.dy,drop:self.drop,move:self.move,t:self.dt})],
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
this.__controller={
|
|
127
|
-
drop:drop_controller.bind(this),
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
onDrop(...callbacks){
|
|
131
|
-
this.__onEvent("drop",{},...callbacks);
|
|
132
|
-
return this;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
const Drag=Target=>new ZikoEventDrag(Target);
|
|
136
|
-
const Drop=Target=>new ZikoEventDrop(Target);
|
|
137
|
-
export {Drag,Drop}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ZikoEvent , EVENT_CONTROLLER } from "../ZikoEvent.js";
|
|
2
|
-
function focus_controller(e){
|
|
3
|
-
EVENT_CONTROLLER.call(this,e,"focus",null,null)
|
|
4
|
-
}
|
|
5
|
-
function blur_controller(e){
|
|
6
|
-
EVENT_CONTROLLER.call(this,e,"blur",null,null)
|
|
7
|
-
}
|
|
8
|
-
class ZikoEventFocus extends ZikoEvent{
|
|
9
|
-
constructor(target){
|
|
10
|
-
super(target);
|
|
11
|
-
this.event=null;
|
|
12
|
-
this.cache={
|
|
13
|
-
prefixe:"",
|
|
14
|
-
preventDefault:{
|
|
15
|
-
focus:false,
|
|
16
|
-
blur:false,
|
|
17
|
-
},
|
|
18
|
-
paused:{
|
|
19
|
-
focus:false,
|
|
20
|
-
blur:false,
|
|
21
|
-
},
|
|
22
|
-
stream:{
|
|
23
|
-
enabled:{
|
|
24
|
-
focus:false,
|
|
25
|
-
blur:false,
|
|
26
|
-
},
|
|
27
|
-
clear:{
|
|
28
|
-
focus:false,
|
|
29
|
-
blur:false,
|
|
30
|
-
},
|
|
31
|
-
history:{
|
|
32
|
-
focus:[],
|
|
33
|
-
blur:[],
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
callbacks:{
|
|
37
|
-
focus:[],
|
|
38
|
-
blur:[],
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
this.__controller={
|
|
42
|
-
focus:focus_controller.bind(this),
|
|
43
|
-
blur:blur_controller.bind(this),
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
onFocus(...callbacks){
|
|
47
|
-
this.__onEvent("focus",{},...callbacks)
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
onBlur(...callbacks){
|
|
51
|
-
this.__onEvent("blur",{},...callbacks)
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const Focus=Target=>new ZikoEventFocus(Target);
|
|
56
|
-
export default Focus
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import {ZikoEvent,EVENT_CONTROLLER} from "../ZikoEvent.js";
|
|
2
|
-
function keydown_controller(e){
|
|
3
|
-
EVENT_CONTROLLER.call(
|
|
4
|
-
this,
|
|
5
|
-
e,
|
|
6
|
-
"down",
|
|
7
|
-
()=>this.kd=e.key,
|
|
8
|
-
{key:e.key,t:10}
|
|
9
|
-
)
|
|
10
|
-
}
|
|
11
|
-
function keypress_controller(e){
|
|
12
|
-
EVENT_CONTROLLER.call(
|
|
13
|
-
this,
|
|
14
|
-
e,
|
|
15
|
-
"press",
|
|
16
|
-
()=>this.kp=e.key,
|
|
17
|
-
{key:e.key,t:10}
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
function keyup_controller(e){
|
|
21
|
-
EVENT_CONTROLLER.call(
|
|
22
|
-
this,
|
|
23
|
-
e,
|
|
24
|
-
"up",
|
|
25
|
-
()=>this.ku=e.key,
|
|
26
|
-
{key:e.key,t:10}
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
class ZikoEventKey extends ZikoEvent{
|
|
30
|
-
constructor(target){
|
|
31
|
-
super(target)
|
|
32
|
-
this.kp=null;
|
|
33
|
-
this.kd=null;
|
|
34
|
-
this.ku=null;
|
|
35
|
-
this.t=0;
|
|
36
|
-
this.cache={
|
|
37
|
-
prefixe:"key",
|
|
38
|
-
preventDefault:{
|
|
39
|
-
down:false,
|
|
40
|
-
press:false,
|
|
41
|
-
up:false,
|
|
42
|
-
},
|
|
43
|
-
paused:{
|
|
44
|
-
down:false,
|
|
45
|
-
press:false,
|
|
46
|
-
up:false,
|
|
47
|
-
},
|
|
48
|
-
stream:{
|
|
49
|
-
enabled:{
|
|
50
|
-
down:false,
|
|
51
|
-
press:false,
|
|
52
|
-
up:false,
|
|
53
|
-
},
|
|
54
|
-
clear:{
|
|
55
|
-
down:true,
|
|
56
|
-
press:false,
|
|
57
|
-
up:false,
|
|
58
|
-
},
|
|
59
|
-
history:{
|
|
60
|
-
down:[],
|
|
61
|
-
press:[],
|
|
62
|
-
up:[],
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
callbacks:{
|
|
66
|
-
down:[(self)=>console.log({kd:self.kd})],
|
|
67
|
-
press:[(self)=>console.log({kp:self.kp})],
|
|
68
|
-
up:[(self)=>console.log({ku:self.ku})]
|
|
69
|
-
},
|
|
70
|
-
successifKeysCallback:{
|
|
71
|
-
down:[(self)=>console.log(1111)],
|
|
72
|
-
press:[(self)=>console.log(1112)],
|
|
73
|
-
kyup:[(self)=>console.log(1113)]
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
this.__controller={
|
|
77
|
-
down:keydown_controller.bind(this),
|
|
78
|
-
press:keypress_controller.bind(this),
|
|
79
|
-
up:keyup_controller.bind(this)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
onDown(...callbacks){
|
|
83
|
-
this.__onEvent("down",{down:true},...callbacks)
|
|
84
|
-
return this;
|
|
85
|
-
}
|
|
86
|
-
onPress(...callbacks){
|
|
87
|
-
this.__onEvent("press",{press:true},...callbacks)
|
|
88
|
-
return this;
|
|
89
|
-
}
|
|
90
|
-
onUp(...callbacks){
|
|
91
|
-
this.__onEvent("up",{up:true},...callbacks)
|
|
92
|
-
return this;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
var Key=Target=>new ZikoEventKey(Target)
|
|
98
|
-
|
|
99
|
-
// handleDown(){
|
|
100
|
-
// this.dispose({down:true,press:false,up:false})
|
|
101
|
-
// this.Target.addEventListener("keydown",this.#downController);
|
|
102
|
-
// return this;
|
|
103
|
-
// }
|
|
104
|
-
export default Key
|