ziko 0.37.0 → 0.38.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.
Files changed (121) hide show
  1. package/dist/ziko.cjs +1160 -3365
  2. package/dist/ziko.js +6179 -8384
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +1153 -3251
  5. package/package.json +15 -13
  6. package/readme.md +79 -5
  7. package/src/__ziko__/__cache__.js +6 -0
  8. package/src/__ziko__/__config__.js +19 -0
  9. package/src/__ziko__/__hydration__.js +8 -0
  10. package/src/__ziko__/__ui__.js +22 -0
  11. package/src/__ziko__/index.js +16 -0
  12. package/src/__ziko__/params.js +40 -0
  13. package/src/app/globals.js +14 -0
  14. package/src/app/index.js +4 -4
  15. package/src/app/spa-file-based-routing.js +2 -2
  16. package/src/app/ziko-app.js +1 -1
  17. package/src/data/converter/svg.js +2 -2
  18. package/src/hooks/index.js +3 -0
  19. package/src/hooks/use-derived.js +61 -0
  20. package/src/hooks/use-reactive.js +7 -0
  21. package/src/hooks/use-state.js +47 -0
  22. package/src/index.js +1 -78
  23. package/src/math/complex/index.js +3 -0
  24. package/src/math/functions/index.js +23 -23
  25. package/src/math/functions/proxy.js +58 -0
  26. package/src/math/utils/mapfun.js +17 -21
  27. package/src/no-module.js +32 -0
  28. package/src/time/{animation.js → animation/index.js} +2 -2
  29. package/src/time/decorators/index.js +17 -0
  30. package/src/time/index.js +11 -12
  31. package/src/time/utils/index.js +0 -1
  32. package/src/ui/{methods → __methods__}/dom.js +15 -14
  33. package/src/ui/{utils → __utils__}/index.js +1 -1
  34. package/src/ui/constructors/{ziko-ui-element.js → ZikoUIElement.js} +9 -98
  35. package/src/ui/constructors/ZikoUIElementMethodesToBeMoved.js +96 -0
  36. package/src/ui/{style → constructors/style}/index.js +3 -3
  37. package/src/ui/{elements/flex → flex}/index.js +1 -1
  38. package/src/{graphics/canvas/index.js → ui/graphics/canvas.js} +4 -5
  39. package/src/ui/graphics/index.js +2 -0
  40. package/src/{graphics/svg/index.js → ui/graphics/svg.js} +1 -1
  41. package/src/ui/{elements/grid → grid}/index.js +1 -1
  42. package/src/ui/index.js +9 -40
  43. package/src/ui/{elements/misc/suspense.js → suspense/index.js} +1 -15
  44. package/src/ui/tags/index.js +3 -3
  45. package/src/ui/text/index.js +15 -0
  46. package/src/ui/{elements/misc/xml-wrapper.js → wrapper/index.js} +1 -1
  47. package/src/use/index.js +3 -7
  48. package/src/graphics/canvas/_canvas_offscreen +0 -0
  49. package/src/graphics/canvas/utils/color.js +0 -8
  50. package/src/graphics/canvas/utils/floodFill.js +0 -57
  51. package/src/graphics/index.js +0 -10
  52. package/src/time/utils/decorators.js +0 -17
  53. package/src/ui/elements/embaded/html.js +0 -20
  54. package/src/ui/elements/embaded/index.js +0 -3
  55. package/src/ui/elements/embaded/pdf.js +0 -17
  56. package/src/ui/elements/embaded/youtube.js +0 -24
  57. package/src/ui/elements/hydrate.js +0 -0
  58. package/src/ui/elements/index.js +0 -10
  59. package/src/ui/elements/io/Form/index.js +0 -42
  60. package/src/ui/elements/io/Form/index.js.txt +0 -104
  61. package/src/ui/elements/io/Inputs/__helpers__.js +0 -52
  62. package/src/ui/elements/io/Inputs/index.js +0 -12
  63. package/src/ui/elements/io/Inputs/input/index.js +0 -99
  64. package/src/ui/elements/io/Inputs/input-camera/index.js +0 -26
  65. package/src/ui/elements/io/Inputs/input-checkbox/index.js +0 -26
  66. package/src/ui/elements/io/Inputs/input-color/index.js +0 -16
  67. package/src/ui/elements/io/Inputs/input-date-time/index.js +0 -3
  68. package/src/ui/elements/io/Inputs/input-date-time/input-date-time.js +0 -14
  69. package/src/ui/elements/io/Inputs/input-date-time/input-date.js +0 -14
  70. package/src/ui/elements/io/Inputs/input-date-time/input-time.js +0 -14
  71. package/src/ui/elements/io/Inputs/input-email-password/index.js +0 -2
  72. package/src/ui/elements/io/Inputs/input-email-password/input-email.js +0 -15
  73. package/src/ui/elements/io/Inputs/input-email-password/input-password.js +0 -14
  74. package/src/ui/elements/io/Inputs/input-file/index.js +0 -1
  75. package/src/ui/elements/io/Inputs/input-file/input-file.js +0 -0
  76. package/src/ui/elements/io/Inputs/input-file/input-image.js +0 -43
  77. package/src/ui/elements/io/Inputs/input-number/index.js +0 -37
  78. package/src/ui/elements/io/Inputs/input-radio/index.js +0 -26
  79. package/src/ui/elements/io/Inputs/input-search/index.js +0 -45
  80. package/src/ui/elements/io/Inputs/input-slider/index.js +0 -34
  81. package/src/ui/elements/io/Select/index.js +0 -20
  82. package/src/ui/elements/io/Textarea/index.js +0 -18
  83. package/src/ui/elements/io/index.js +0 -4
  84. package/src/ui/elements/list/elements.js +0 -0
  85. package/src/ui/elements/list/index.js +0 -138
  86. package/src/ui/elements/media/Audio/index.js +0 -17
  87. package/src/ui/elements/media/Image/figure.js +0 -19
  88. package/src/ui/elements/media/Image/image.js +0 -37
  89. package/src/ui/elements/media/Image/index.js +0 -2
  90. package/src/ui/elements/media/Video/index.js +0 -27
  91. package/src/ui/elements/media/__ZikoUIDynamicMediaELement__.js +0 -47
  92. package/src/ui/elements/media/index.js +0 -3
  93. package/src/ui/elements/misc/hyperscript.js +0 -144
  94. package/src/ui/elements/misc/index.js +0 -101
  95. package/src/ui/elements/semantic/index.js +0 -42
  96. package/src/ui/elements/table/elements.js +0 -94
  97. package/src/ui/elements/table/index.js +0 -3
  98. package/src/ui/elements/table/table.js +0 -115
  99. package/src/ui/elements/table/utils.js +0 -12
  100. package/src/ui/elements/text/__ZikoUIText__.js +0 -70
  101. package/src/ui/elements/text/heading.js +0 -36
  102. package/src/ui/elements/text/index.js +0 -3
  103. package/src/ui/elements/text/p.js +0 -26
  104. package/src/ui/elements/text/pre.js +0 -0
  105. package/src/ui/elements/text/text.js +0 -81
  106. package/src/use/use-debounce.js +0 -4
  107. package/src/use/use-state.js +0 -22
  108. package/src/use/use-throttle.js +0 -9
  109. /package/src/reactivity/hooks/{Head → head}/_useCssText.js +0 -0
  110. /package/src/reactivity/hooks/{Head → head}/index.js +0 -0
  111. /package/src/reactivity/hooks/{Head → head}/useFavIcon.js +0 -0
  112. /package/src/reactivity/hooks/{Head → head}/useHead.js +0 -0
  113. /package/src/reactivity/hooks/{Head → head}/useMeta.js +0 -0
  114. /package/src/reactivity/hooks/{Head → head}/useTitle.js +0 -0
  115. /package/src/time/{loop.js → loop/index.js} +0 -0
  116. /package/src/ui/{methods → __methods__}/events.js +0 -0
  117. /package/src/ui/{methods → __methods__}/indexing.js +0 -0
  118. /package/src/ui/{methods → __methods__}/observer.js +0 -0
  119. /package/src/ui/{methods → __methods__}/style.js +0 -0
  120. /package/src/ui/constructors/{ziko-ui-node.js → ZikoUINode.js} +0 -0
  121. /package/src/ui/tags/{tags.js → tags-list.js} +0 -0
@@ -1,81 +0,0 @@
1
- import { __ZikoUIText__ } from "./__ZikoUIText__.js";
2
- class ZikoUIText extends __ZikoUIText__ {
3
- constructor(...value) {
4
- super("span", "text", false, ...value);
5
- }
6
- }
7
- class ZikoUIQuote extends __ZikoUIText__ {
8
- constructor(...value) {
9
- super("q", "quote", false, ...value);
10
- this.style({
11
- fontStyle: "italic"
12
- })
13
- }
14
- get isQuote(){
15
- return true
16
- }
17
- }
18
- class ZikoUIDefintion extends __ZikoUIText__ {
19
- constructor(...value) {
20
- super("dfn", "dfnText", false, ...value);
21
- }
22
- get isDfnText(){
23
- return true
24
- }
25
- }
26
- class ZikoUISupText extends __ZikoUIText__ {
27
- constructor(sup) {
28
- super("sup", "supText", false, sup);
29
- }
30
- get isSupText(){
31
- return true
32
- }
33
- }
34
- class ZikoUISubText extends __ZikoUIText__ {
35
- constructor(...value) {
36
- super("sub", "subText", false, ...value);
37
- }
38
- get isSubText(){
39
- return true
40
- }
41
- }
42
- class ZikoUICodeText extends __ZikoUIText__ {
43
- constructor(...value) {
44
- super("code", "codeText", false, ...value);
45
- }
46
- get isCodeText(){
47
- return true
48
- }
49
- }
50
- class ZikoUIAbbrText extends __ZikoUIText__ {
51
- constructor(abbr, title) {
52
- super("abbr", "abbrText", false, abbr);
53
- this.setAttr("title", title);
54
- }
55
- get isAbbrText(){
56
- return true
57
- }
58
- }
59
- const text = (...str) => new ZikoUIText(...str);
60
- const quote = (...str) => new ZikoUIQuote(...str);
61
- const dfnText = (...str) => new ZikoUIDefintion(...str);
62
- const supText = (...str) => new ZikoUISupText(...str);
63
- const subText = (...str) => new ZikoUISubText(...str);
64
- const codeText = (...str) => new ZikoUICodeText(...str);
65
- const abbrText = (abbr, title) => new ZikoUIAbbrText(abbr, title);
66
- export {
67
- ZikoUIText,
68
- ZikoUIQuote,
69
- ZikoUIDefintion,
70
- ZikoUISupText,
71
- ZikoUISubText,
72
- ZikoUICodeText,
73
- ZikoUIAbbrText,
74
- text,
75
- quote,
76
- dfnText,
77
- supText,
78
- subText,
79
- codeText,
80
- abbrText
81
- }
@@ -1,4 +0,0 @@
1
- export const useDebounce=(fn,delay=1000)=>{
2
- let id;
3
- return(...args)=> id ? clearTimeout(id) : setTimeout(()=>fn(...args),delay)
4
- }
@@ -1,22 +0,0 @@
1
- export function useState(initialValue) {
2
- let value = initialValue;
3
- const subscribers = new Set();
4
-
5
- function getValue() {
6
- return {
7
- value,
8
- isStateGetter: () => true,
9
- _subscribe: (fn) => subscribers.add(fn),
10
- };
11
- }
12
-
13
- function setValue(newValue) {
14
- if (typeof newValue === "function") newValue = newValue(value);
15
- if (newValue !== value) {
16
- value = newValue;
17
- subscribers.forEach(fn => fn(value));
18
- }
19
- }
20
-
21
- return [getValue, setValue];
22
- }
@@ -1,9 +0,0 @@
1
- export const useThrottle=(fn,delay)=>{
2
- let lastTime=0;
3
- return (...args)=>{
4
- const now=new Date().getTime()
5
- if(now-lastTime<delay)return;
6
- lastTime=now;
7
- fn(...args);
8
- }
9
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes