ziko 0.0.22 → 0.0.24

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 (157) hide show
  1. package/dist/ziko.cjs +93 -2819
  2. package/dist/ziko.js +93 -2819
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +90 -2757
  5. package/package.json +1 -1
  6. package/src/app/globals.js +5 -1
  7. package/src/data/converter/index.js +2 -6
  8. package/src/graphics/canvas/index.js +176 -2
  9. package/src/graphics/canvas/utils/floodFill.js +0 -1
  10. package/src/graphics/svg/index.js +69 -2
  11. package/src/index.js +2 -1
  12. package/src/reactivity/hooks/index.js +1 -1
  13. package/src/ui/elements/{primitives/ZikoUIElement.js → ZikoUIElement.js} +20 -12
  14. package/src/ui/elements/derived ( To Be Moved)/index.js +12 -0
  15. package/src/ui/elements/{derived/flex → flex}/index.js +2 -2
  16. package/src/ui/elements/{derived/grid → grid}/index.js +2 -2
  17. package/src/ui/elements/{primitives/index.js → index.js} +3 -1
  18. package/src/ui/elements/{primitives/io → io}/Form/index.js +1 -1
  19. package/src/ui/elements/{primitives/io → io}/Inputs/__helpers__.js +1 -1
  20. package/src/ui/elements/{primitives/io → io}/Inputs/input/index.js +1 -1
  21. package/src/ui/elements/{primitives/list → list}/index.js +2 -3
  22. package/src/ui/elements/{primitives/misc → misc}/index.js +2 -3
  23. package/src/ui/elements/{primitives/semantic → semantic}/index.js +8 -8
  24. package/src/ui/elements/{primitives/table → table}/table.js +1 -1
  25. package/src/ui/elements/{primitives/text → text}/__ZikoUIText__.js +3 -4
  26. package/src/ui/index.js +21 -21
  27. package/src/ui/utils/index.js +1 -1
  28. package/src/graphics/canvas/canvas.js +0 -176
  29. package/src/graphics/svg/svg.js +0 -69
  30. package/src/reactivity/hooks/Interactions/useSerial.js +0 -0
  31. package/src/types.js +0 -73
  32. package/src/ui/elements/derived/index.js +0 -12
  33. package/src/ui/elements/primitives/ZikoUIContainerElement.js +0 -123
  34. package/starter/bin/index.js +0 -11
  35. /package/src/{global → _global (To Be Replaced )}/_themes/dark.js +0 -0
  36. /package/src/{global → _global (To Be Replaced )}/_themes/index.js +0 -0
  37. /package/src/{global → _global (To Be Replaced )}/_themes/light.js +0 -0
  38. /package/src/{global → _global (To Be Replaced )}/app/index.js +0 -0
  39. /package/src/{global → _global (To Be Replaced )}/component/index.js +0 -0
  40. /package/src/{global → _global (To Be Replaced )}/globals/index.js +0 -0
  41. /package/src/{global → _global (To Be Replaced )}/index.js +0 -0
  42. /package/src/{global → _global (To Be Replaced )}/params/index.js +0 -0
  43. /package/src/{global → _global (To Be Replaced )}/router/index.js +0 -0
  44. /package/src/{global → _global (To Be Replaced )}/seo/index.js +0 -0
  45. /package/src/{global → _global (To Be Replaced )}/style/index.js +0 -0
  46. /package/src/data/converter/{adoc.js → __(To Be Moved)adoc.js} +0 -0
  47. /package/src/data/converter/{markdown.js → __(To Be Moved)markdown.js} +0 -0
  48. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/arc.js +0 -0
  49. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/image.js +0 -0
  50. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/line.js +0 -0
  51. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/path.js +0 -0
  52. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/points.js +0 -0
  53. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polygon.js +0 -0
  54. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polyline.js +0 -0
  55. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/rect.js +0 -0
  56. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/text.js +0 -0
  57. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/histogram.js +0 -0
  58. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/plot.js +0 -0
  59. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/scatter.js +0 -0
  60. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/stem.js +0 -0
  61. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Element.js +0 -0
  62. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/index.js +0 -0
  63. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/circle.js +0 -0
  64. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/ellipse.js +0 -0
  65. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/foreign-object.js +0 -0
  66. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/groupe.js +0 -0
  67. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/image.js +0 -0
  68. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/index.js +0 -0
  69. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/line.js +0 -0
  70. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/link.js +0 -0
  71. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/path.js +0 -0
  72. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polygon.js +0 -0
  73. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polyline.js +0 -0
  74. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/rect.js +0 -0
  75. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/text.js +0 -0
  76. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/grid.js +0 -0
  77. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/index.js +0 -0
  78. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/index.js +0 -0
  79. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/ziko-svg-element.js +0 -0
  80. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/index.js +0 -0
  81. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useBattery.js +0 -0
  82. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useCamera.js +0 -0
  83. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useGeolocation.js +0 -0
  84. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useMicro.js +0 -0
  85. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useOrientation.js +0 -0
  86. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/accordion.js +0 -0
  87. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/collapsible.js +0 -0
  88. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/index.js +0 -0
  89. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/alert.js +0 -0
  90. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/index.js +0 -0
  91. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/palette.js +0 -0
  92. /package/src/ui/elements/{derived → derived ( To Be Moved)}/carousel/index.js +0 -0
  93. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/SubElements.js.txt +0 -0
  94. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-cell.js +0 -0
  95. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-note.js +0 -0
  96. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/index.js +0 -0
  97. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/sub-elements.js +0 -0
  98. /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/index.js +0 -0
  99. /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/menu3d.js +0 -0
  100. /package/src/ui/elements/{derived → derived ( To Be Moved)}/modal/index.js +0 -0
  101. /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/breadcrumbs.js +0 -0
  102. /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/index.js +0 -0
  103. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/__ZikoUISlider__.js +0 -0
  104. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/hSlider.js +0 -0
  105. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/index.js +0 -0
  106. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/vSlider.js +0 -0
  107. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/__ZikoUISplitter__.js +0 -0
  108. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/hsplitter.js +0 -0
  109. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/index.js +0 -0
  110. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/vsplitter.js +0 -0
  111. /package/src/ui/elements/{derived → derived ( To Be Moved)}/tabs/index.js +0 -0
  112. /package/src/ui/elements/{primitives/embaded → embaded}/html.js +0 -0
  113. /package/src/ui/elements/{primitives/embaded → embaded}/index.js +0 -0
  114. /package/src/ui/elements/{primitives/embaded → embaded}/pdf.js +0 -0
  115. /package/src/ui/elements/{primitives/embaded → embaded}/youtube.js +0 -0
  116. /package/src/{data/parser/markdown.js → ui/elements/hydrate.js} +0 -0
  117. /package/src/ui/elements/{primitives/io → io}/Form/index.js.txt +0 -0
  118. /package/src/ui/elements/{primitives/io → io}/Inputs/index.js +0 -0
  119. /package/src/ui/elements/{primitives/io → io}/Inputs/input-camera/index.js +0 -0
  120. /package/src/ui/elements/{primitives/io → io}/Inputs/input-checkbox/index.js +0 -0
  121. /package/src/ui/elements/{primitives/io → io}/Inputs/input-color/index.js +0 -0
  122. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/index.js +0 -0
  123. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date-time.js +0 -0
  124. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date.js +0 -0
  125. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-time.js +0 -0
  126. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/index.js +0 -0
  127. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-email.js +0 -0
  128. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-password.js +0 -0
  129. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/index.js +0 -0
  130. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-file.js +0 -0
  131. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-image.js +0 -0
  132. /package/src/ui/elements/{primitives/io → io}/Inputs/input-number/index.js +0 -0
  133. /package/src/ui/elements/{primitives/io → io}/Inputs/input-radio/index.js +0 -0
  134. /package/src/ui/elements/{primitives/io → io}/Inputs/input-search/index.js +0 -0
  135. /package/src/ui/elements/{primitives/io → io}/Inputs/input-slider/index.js +0 -0
  136. /package/src/ui/elements/{primitives/io → io}/Select/index.js +0 -0
  137. /package/src/ui/elements/{primitives/io → io}/Textarea/index.js +0 -0
  138. /package/src/ui/elements/{primitives/io → io}/index.js +0 -0
  139. /package/src/ui/elements/{primitives/list → list}/elements.js +0 -0
  140. /package/src/ui/elements/{primitives/media → media}/Audio/index.js +0 -0
  141. /package/src/ui/elements/{primitives/media → media}/Image/figure.js +0 -0
  142. /package/src/ui/elements/{primitives/media → media}/Image/image.js +0 -0
  143. /package/src/ui/elements/{primitives/media → media}/Image/index.js +0 -0
  144. /package/src/ui/elements/{primitives/media → media}/Video/index.js +0 -0
  145. /package/src/ui/elements/{primitives/media → media}/__ZikoUIDynamicMediaELement__.js +0 -0
  146. /package/src/ui/elements/{primitives/media → media}/index.js +0 -0
  147. /package/src/ui/elements/{primitives/misc → misc}/hyperscript.js +0 -0
  148. /package/src/ui/elements/{primitives/misc → misc}/suspense.js +0 -0
  149. /package/src/ui/elements/{primitives/misc → misc}/xml-wrapper.js +0 -0
  150. /package/src/ui/elements/{primitives/table → table}/elements.js +0 -0
  151. /package/src/ui/elements/{primitives/table → table}/index.js +0 -0
  152. /package/src/ui/elements/{primitives/table → table}/utils.js +0 -0
  153. /package/src/ui/elements/{primitives/text → text}/heading.js +0 -0
  154. /package/src/ui/elements/{primitives/text → text}/index.js +0 -0
  155. /package/src/ui/elements/{primitives/text → text}/p.js +0 -0
  156. /package/src/ui/elements/{primitives/text → text}/pre.js +0 -0
  157. /package/src/ui/elements/{primitives/text → text}/text.js +0 -0
package/dist/ziko.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  Project: ziko.js
4
4
  Author: Zakaria Elalaoui
5
- Date : Sun Dec 08 2024 23:39:16 GMT+0100 (UTC+01:00)
5
+ Date : Fri Jan 24 2025 23:58:20 GMT+0100 (UTC+01:00)
6
6
  Git-Repo : https://github.com/zakarialaoui10/ziko.js
7
7
  Git-Wiki : https://github.com/zakarialaoui10/ziko.js/wiki
8
8
  Released under MIT License
@@ -1125,229 +1125,6 @@ var Api = /*#__PURE__*/Object.freeze({
1125
1125
  preload: preload
1126
1126
  });
1127
1127
 
1128
- const parseInlineElements$1 = text => {
1129
- return text
1130
- .replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
1131
- .replace(/\*(.*?)\*/g, '<em>$1</em>')
1132
- .replace(/\[(.*?)\]\((.*?)\)/g, '<a href="$2">$1</a>')
1133
- .replace(/!\[(.*?)\]\((.*?)\)/g, '<img src="$2" alt="$1">')
1134
- .replace(/`([^`]+)`/g, '<code>$1</code>'); // Inline Code
1135
- };
1136
-
1137
- const parseTable$1 = line => {
1138
- const cells = line.split('|').map(cell => cell.trim()).filter(cell => cell !== '');
1139
- const tableRow = cells.map(cell => `<td>${parseInlineElements$1(cell)}</td>`).join('');
1140
- return `<tr>${tableRow}</tr>\n`;
1141
- };
1142
-
1143
- const parseCodeBlock$1 = (lines, language) => {
1144
- const codeContent = lines.join('\n'); // No need to exclude the triple backticks
1145
- const highlightedCode = language ? `<pre><code data-language="${language}">${codeContent}</code></pre>` : `<pre><code>${codeContent}</code></pre>`;
1146
- return `${highlightedCode}\n`;
1147
- };
1148
-
1149
- const parseList$1 = line => {
1150
- const DIGIT_FOLLOWED_BY_A_DOT_AND_SPACE = /^\d+\.\s/;
1151
- const match = line.match(DIGIT_FOLLOWED_BY_A_DOT_AND_SPACE);
1152
- if (match) {
1153
- let start = +match[1];
1154
- return `<ol${start===1?"":` start="${start}"`}>${parseInlineElements$1(line.slice(match[0].length))}</ol>\n`;
1155
- }
1156
- return `<ul>${parseInlineElements$1(line)}</ul>\n`;
1157
- };
1158
-
1159
- const parseHorizontalRule$1 = () => {
1160
- return '<hr>\n';
1161
- };
1162
-
1163
- const markdown2html = markdownText => {
1164
- const lines = markdownText.split('\n');
1165
- let htmlOutput = '';
1166
- let inTable = false;
1167
- let inCodeBlock = false;
1168
- let codeBlockLines = [];
1169
- let codeBlockLanguage = '';
1170
- for (let i = 0; i < lines.length; i++) {
1171
- let line = lines[i];
1172
- // Table
1173
- if (line.startsWith('|')) {
1174
- if (!inTable) {
1175
- inTable = true;
1176
- htmlOutput += '<table>\n';
1177
- }
1178
- htmlOutput += parseTable$1(line);
1179
- continue;
1180
- } else if (inTable) {
1181
- inTable = false;
1182
- htmlOutput += '</table>\n';
1183
- }
1184
- // Code block
1185
- if (line.startsWith('```')) {
1186
- if (!inCodeBlock) {
1187
- inCodeBlock = true;
1188
- codeBlockLines = [];
1189
- codeBlockLanguage = line.slice(3).trim();
1190
- } else {
1191
- inCodeBlock = false;
1192
- htmlOutput += parseCodeBlock$1(codeBlockLines, codeBlockLanguage);
1193
- }
1194
- continue;
1195
- } else if (inCodeBlock) {
1196
- codeBlockLines.push(line);
1197
- continue;
1198
- }
1199
- // Headings
1200
- if (line.startsWith('# ')) {
1201
- const headingLevel = line.indexOf(' ');
1202
- const headingText = line.slice(headingLevel + 1);
1203
- htmlOutput += `<h${headingLevel}>${parseInlineElements$1(headingText)}</h${headingLevel}>\n`;
1204
- continue;
1205
- }
1206
- // Lists
1207
- if (line.startsWith('- ') || line.startsWith('* ') || line.match(/^\d+\.\s/)) {
1208
- htmlOutput += parseList$1(line);
1209
- continue;
1210
- }
1211
- // Horizontal Rule
1212
- if (line.trim() === '---') {
1213
- htmlOutput += parseHorizontalRule$1();
1214
- continue;
1215
- }
1216
- // Other paragraphs
1217
- htmlOutput += `<p>${parseInlineElements$1(line)}</p>\n`;
1218
- }
1219
- return htmlOutput;
1220
- };
1221
-
1222
- const parseInlineElements = text => {
1223
- return text
1224
- .replace(/\*(.*?)\*/g, '_$1_') // Emphasis
1225
- .replace(/\*\*(.*?)\*\*/g, '*$1*') // Strong
1226
- .replace(/\[(.*?)\]\((.*?)\)/g, 'link:$2[$1]') // Links
1227
- .replace(/!\[(.*?)\]\((.*?)\)/g, 'image::$2[$1]') // Images
1228
- .replace(/`([^`]+)`/g, '``$1``') // Inline Code
1229
- .replace(/^\*\s/, ''); // Remove list item marker at the beginning of the line
1230
- };
1231
-
1232
- const parseTable = line => {
1233
- const cells = line.split('|').map(cell => cell.trim()).filter(cell => cell !== '');
1234
- const tableRow = cells.map(cell => `<td>${parseInlineElements(cell)}</td>`).join('');
1235
- return `<tr>${tableRow}</tr>\n`;
1236
- };
1237
-
1238
- const parseCodeBlock = (lines, language) => {
1239
- const codeContent = lines.join('\n'); // No need to exclude the triple backticks
1240
- const highlightedCode = language ? `<pre><code data-language="${language}">${codeContent}</code></pre>` : `<pre><code>${codeContent}</code></pre>`;
1241
- return `${highlightedCode}\n`;
1242
- };
1243
-
1244
- const parseList = line => {
1245
- const OL_PATTERN = /^(\d+)\.\s/;
1246
- const OL_PATTERN_WITHOUT_START = /^[.]\s/;
1247
- const UL_PATTERN = /^[*]\s/;
1248
-
1249
- if (line.match(OL_PATTERN)) {
1250
- const start = line.match(OL_PATTERN)[1];
1251
- return `<ol start="${start}"><li>${parseInlineElements(line.replace(OL_PATTERN, ''))}</li></ol>\n`;
1252
- }
1253
- if (line.match(OL_PATTERN_WITHOUT_START)) {
1254
- return `<ol><li>${parseInlineElements(line.replace(OL_PATTERN_WITHOUT_START, ''))}</li></ol>\n`;
1255
- }
1256
- if (line.match(UL_PATTERN)) {
1257
- return `<ul><li>${parseInlineElements(line.replace(UL_PATTERN, ''))}</li></ul>\n`;
1258
- }
1259
-
1260
- // If neither ordered nor unordered list pattern matches, treat it as a paragraph
1261
- return `<p>${parseInlineElements(line)}</p>\n`;
1262
- };
1263
-
1264
-
1265
-
1266
-
1267
- const parseBlockquote = line => {
1268
- return `<blockquote>${parseInlineElements(line.slice(2))}</blockquote>\n`;
1269
- };
1270
-
1271
- const parseHorizontalRule = () => {
1272
- return '<hr>\n';
1273
- };
1274
-
1275
- const parseAttributes = line => {
1276
- const attrs = line.match(/\[(.*?)\]/);
1277
- return attrs ? attrs[1].split(',').map(attr => `[${attr.trim()}]`).join('') : '';
1278
- };
1279
-
1280
- const adoc2html = adocText => {
1281
- const lines = adocText.split('\n');
1282
- let htmlOutput = '';
1283
- let inTable = false;
1284
- let inCodeBlock = false;
1285
- let codeBlockLines = [];
1286
- let codeBlockLanguage = '';
1287
- for (let i = 0; i < lines.length; i++) {
1288
- let line = lines[i];
1289
- // Table
1290
- if (line.startsWith('|')) {
1291
- if (!inTable) {
1292
- inTable = true;
1293
- htmlOutput += '<table>\n';
1294
- }
1295
- htmlOutput += parseTable(line);
1296
- continue;
1297
- } else if (inTable) {
1298
- inTable = false;
1299
- htmlOutput += '</table>\n';
1300
- }
1301
- // Code block
1302
- if (line.startsWith('```')) {
1303
- if (!inCodeBlock) {
1304
- inCodeBlock = true;
1305
- codeBlockLines = [];
1306
- codeBlockLanguage = line.slice(3).trim();
1307
- } else {
1308
- inCodeBlock = false;
1309
- htmlOutput += parseCodeBlock(codeBlockLines, codeBlockLanguage);
1310
- }
1311
- continue;
1312
- } else if (inCodeBlock) {
1313
- codeBlockLines.push(line);
1314
- continue;
1315
- }
1316
- // Headings
1317
- if (line.startsWith('=')) {
1318
- const headingLevel = (line.match(/=/g) || []).length;
1319
- const headingText = line.replace(/=/g, '').trim();
1320
- htmlOutput += `<h${headingLevel}>${parseInlineElements(headingText)}</h${headingLevel}>\n`;
1321
- continue;
1322
- }
1323
- // Lists
1324
- if (line.match(/^(\d+)\.\s/) || line.match(/^[*\.]\s/)) {
1325
- htmlOutput += parseList(line);
1326
- continue;
1327
- }
1328
- // Blockquote
1329
- if (line.startsWith('> ')) {
1330
- htmlOutput += parseBlockquote(line);
1331
- continue;
1332
- }
1333
- // Horizontal Rule
1334
- if (line.trim() === '---') {
1335
- htmlOutput += parseHorizontalRule();
1336
- continue;
1337
- }
1338
- // Attributes
1339
- if (line.startsWith('[')) {
1340
- htmlOutput += parseAttributes(line);
1341
- continue;
1342
- }
1343
- // Other paragraphs
1344
- if (line.trim() !== '') { // Exclude empty lines
1345
- htmlOutput += `<p>${parseInlineElements(line)}</p>\n`;
1346
- }
1347
- }
1348
- return htmlOutput;
1349
- };
1350
-
1351
1128
  const csv2arr = (csv, delimiter = ",")=>csv.trim().trimEnd().split("\n").map(n=>n.split(delimiter));
1352
1129
  const csv2matrix = (csv, delimiter = ",")=>new Matrix(csv2arr(csv,delimiter));
1353
1130
  const csv2object = (csv, delimiter = ",") => {
@@ -4493,59 +4270,6 @@ const useThread = (func, callback , close) => {
4493
4270
  return T;
4494
4271
  };
4495
4272
 
4496
- class ZikoUseBattery{
4497
- constructor(){
4498
- if(this.isSupported)this.#init();
4499
- }
4500
- async #init(){
4501
- this.__Battery__=await navigator.getBattery();
4502
- }
4503
- get isSupported(){
4504
- return !!navigator.getBattery;
4505
- }
4506
- get current(){
4507
- // Synchrouns Code
4508
- const {
4509
- level,
4510
- charging,
4511
- chargingTime,
4512
- dischargingTime
4513
- }=this.__Battery__;
4514
- return {
4515
- level,
4516
- charging,
4517
- chargingTime,
4518
- dischargingTime
4519
- }
4520
- }
4521
- onChargingChange(callback){
4522
- this.__Battery__?.addEventListener("chargingchange",callback);
4523
- return this;
4524
- }
4525
- onLevelChange(callback){
4526
- this.__Battery__?.addEventListener("levelchange",callback);
4527
- return this;
4528
- }
4529
- }
4530
- const useBattery=()=>new ZikoUseBattery();
4531
-
4532
- class ZikoUseGeolocation{
4533
- constructor(){
4534
- if(this.isSupported)this.#init();
4535
- }
4536
- async #init(){
4537
- navigator.geolocation.getCurrentPosition(e=>this.__Geolocation__=e);
4538
- }
4539
- get isSupported(){
4540
- return !!navigator.geolocation;
4541
- }
4542
- get current(){
4543
- // Synchrouns Code
4544
- return this.__Geolocation__;
4545
- }
4546
- }
4547
- const useGeolocation=()=>new ZikoUseGeolocation();
4548
-
4549
4273
  class ZikoUseChannel{
4550
4274
  constructor(name=""){
4551
4275
  this.channel=new BroadcastChannel(name);
@@ -4821,12 +4545,10 @@ var Hooks = /*#__PURE__*/Object.freeze({
4821
4545
  ZikoHead: ZikoHead$1,
4822
4546
  ZikoUseRoot: ZikoUseRoot,
4823
4547
  ZikoUseStyle: ZikoUseStyle,
4824
- useBattery: useBattery,
4825
4548
  useChannel: useChannel$1,
4826
4549
  useDebounce: useDebounce,
4827
4550
  useEventEmitter: useEventEmitter,
4828
4551
  useFavIcon: useFavIcon$1,
4829
- useGeolocation: useGeolocation,
4830
4552
  useHead: useHead$1,
4831
4553
  useLocaleStorage: useLocaleStorage,
4832
4554
  useMediaQuery: useMediaQuery,
@@ -4849,7 +4571,7 @@ const Reactivity={
4849
4571
  };
4850
4572
 
4851
4573
  class ZikoUIElement {
4852
- constructor(element ,name="", el_type="html") {
4574
+ constructor(element, name="", {el_type="html", useDefaultStyle=false}={}){
4853
4575
  this.target = globalThis.__Ziko__.__Config__.default.target||globalThis?.document?.body;
4854
4576
  if(typeof element === "string") {
4855
4577
  switch(el_type){
@@ -4858,8 +4580,10 @@ class ZikoUIElement {
4858
4580
  default : throw Error("Not supported")
4859
4581
  }
4860
4582
  }
4583
+ else {
4584
+ this.target = element.parentElement;
4585
+ }
4861
4586
  if(element)this.__ele__ = element;
4862
- this.uuid=this.constructor.name+"-"+Random.string(10);
4863
4587
  this.cache = {
4864
4588
  name,
4865
4589
  parent:null,
@@ -4890,23 +4614,29 @@ class ZikoUIElement {
4890
4614
  resize:null,
4891
4615
  intersection:null
4892
4616
  };
4617
+ this.uuid = `${this.cache.name}-${Random.string(16)}`;
4893
4618
  this.cache.style.linkTo(this);
4894
- this.style({
4619
+ useDefaultStyle && this.style({
4895
4620
  position: "relative",
4896
4621
  boxSizing:"border-box",
4897
4622
  margin:0,
4898
4623
  padding:0,
4624
+ width : "auto",
4625
+ height : "auto"
4899
4626
  });
4900
4627
  this.items = [];
4901
- this.size("auto", "auto");
4902
4628
  globalThis.__Ziko__.__UI__[this.cache.name]?globalThis.__Ziko__.__UI__[this.cache.name]?.push(this):globalThis.__Ziko__.__UI__[this.cache.name]=[this];
4903
4629
  element && globalThis.__Ziko__.__Config__.default.render && this.render();
4630
+ this.setAttr("data-ref", this.uuid);
4631
+ if(globalThis.__Ziko__.__Config__.renderingMode !== "spa" && !globalThis.__Ziko__.__Config__.isSSC) {
4632
+ globalThis.__Ziko__.__HYDRATION_MAP__.set(this.uuid, ()=>this);
4633
+ }
4904
4634
  }
4905
4635
  get element(){
4906
- return this.__ele__
4636
+ return this.__ele__;
4907
4637
  }
4908
4638
  get isZikoUIElement(){
4909
- return true
4639
+ return true;
4910
4640
  }
4911
4641
  get st(){
4912
4642
  return this.cache.style;
@@ -4915,7 +4645,7 @@ class ZikoUIElement {
4915
4645
  return this.cache.attributes;
4916
4646
  }
4917
4647
  get evt(){
4918
- return this.cache.events;
4648
+ return this.events;
4919
4649
  }
4920
4650
  get html(){
4921
4651
  return this.element.innerHTML;
@@ -4980,7 +4710,7 @@ class ZikoUIElement {
4980
4710
  return this;
4981
4711
  }
4982
4712
  for (let i = 0; i < ele.length; i++) {
4983
- if (["number", "string"].includes(typeof ele[i])) ele[i] = text$1(ele[i]);
4713
+ if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
4984
4714
  if (ele[i] instanceof ZikoUIElement) {
4985
4715
  ele[i].cache.parent = this;
4986
4716
  this.element[adder](ele[i].element);
@@ -5010,7 +4740,7 @@ class ZikoUIElement {
5010
4740
  if (index >= this.element.children.length) this.append(...ele);
5011
4741
  else
5012
4742
  for (let i = 0; i < ele.length; i++) {
5013
- if (["number", "string"].includes(typeof ele[i])) ele[i] = text$1(ele[i]);
4743
+ if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5014
4744
  this.element?.insertBefore(ele[i].element, this.items[index].element);
5015
4745
  this.items.splice(index, 0, ele[i]);
5016
4746
  }
@@ -5429,128 +5159,7 @@ class ZikoUIElement {
5429
5159
  }
5430
5160
  }
5431
5161
 
5432
- class ZikoUIContainerElement extends ZikoUIElement {
5433
- constructor(element, name = "") {
5434
- super(element, name);
5435
- this.items = [];
5436
- }
5437
- // maintain() {
5438
- // for (let i = 0; i < this.items.length; i++)
5439
- // Object.assign(this, { [[i]]: this.items[i] });
5440
- // this.length = this.items.length;
5441
- // return this;
5442
- // }
5443
- // at(index) {
5444
- // return this.items.at(index);
5445
- // }
5446
- // #addItem(adder, pusher, ...ele) {
5447
- // if (this.cache.isFrozzen) {
5448
- // console.warn("You can't append new item to frozzen element");
5449
- // return this;
5450
- // }
5451
- // for (let i = 0; i < ele.length; i++) {
5452
- // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5453
- // if (ele[i] instanceof ZikoUIElement) {
5454
- // ele[i].cache.parent = this;
5455
- // this.element[adder](ele[i].element);
5456
- // ele[i].target = this.element;
5457
- // this.items[pusher](ele[i]);
5458
- // } else if (ele[i] instanceof Object) {
5459
- // if (ele[i]?.style) this.style(ele[i]?.style);
5460
- // if (ele[i]?.attr) {
5461
- // Object.entries(ele[i].attr).forEach((n) =>
5462
- // this.setAttr("" + n[0], n[1]),
5463
- // );
5464
- // }
5465
- // }
5466
- // }
5467
- // this.maintain();
5468
- // return this;
5469
- // }
5470
- // append(...ele) {
5471
- // this.#addItem("append", "push", ...ele);
5472
- // return this;
5473
- // }
5474
- // prepend(...ele) {
5475
- // this.#addItem("prepend", "unshift", ...ele);
5476
- // return this;
5477
- // }
5478
- // insertAt(index, ...ele) {
5479
- // if (index >= this.element.children.length) this.append(...ele);
5480
- // else
5481
- // for (let i = 0; i < ele.length; i++) {
5482
- // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5483
- // this.element?.insertBefore(ele[i].element, this.items[index].element);
5484
- // this.items.splice(index, 0, ele[i]);
5485
- // }
5486
- // return this;
5487
- // }
5488
- // remove(...ele) {
5489
- // const remove = (ele) => {
5490
- // if (typeof ele === "number") ele = this.items[ele];
5491
- // if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
5492
- // this.items = this.items.filter((n) => n !== ele);
5493
- // };
5494
- // for (let i = 0; i < ele.length; i++) remove(ele[i]);
5495
- // for (let i = 0; i < this.items.length; i++)
5496
- // Object.assign(this, { [[i]]: this.items[i] });
5497
- // // Remove from item
5498
- // return this;
5499
- // }
5500
- // forEach(callback) {
5501
- // this.items.forEach(callback);
5502
- // return this;
5503
- // }
5504
- // map(callback) {
5505
- // return this.items.map(callback);
5506
- // }
5507
- // find(condition) {
5508
- // return this.items.filter(condition);
5509
- // }
5510
- // filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
5511
- // const FilterItems = this.items.filter(condition_callback);
5512
- // FilterItems.forEach(if_callback);
5513
- // this.items
5514
- // .filter((item) => !FilterItems.includes(item))
5515
- // .forEach(else_callback);
5516
- // return this;
5517
- // }
5518
- // filterByTextContent(text, exactMatch = false) {
5519
- // this.items.forEach((n) => n.render());
5520
- // this.filter(
5521
- // (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
5522
- // (e) => e.unrender(),
5523
- // );
5524
- // // this.items.filter(n=>{
5525
- // // const content=n.element.textContent;
5526
- // // return !(exactMatch?content===text:content.includes(text))
5527
- // // }).map(n=>n.unrender());
5528
- // // return this;
5529
- // }
5530
- // filterByClass(value) {
5531
- // this.items.map((n) => n.render());
5532
- // this.items
5533
- // .filter((n) => !n.classes.includes(value))
5534
- // .map((n) => n.unrender());
5535
- // return this;
5536
- // }
5537
- // sortByTextContent(value, displays) {
5538
- // let item = this.children;
5539
- // item
5540
- // .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
5541
- // .map((n) => {
5542
- // n.style.display = "none";
5543
- // });
5544
- // item
5545
- // .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
5546
- // .map((n, i) => (n.style.display = displays[i]));
5547
- // //return item.filter(n=>n.style.display!="none")
5548
- // item.filter((n) => n.style.display != "none");
5549
- // return this;
5550
- // }
5551
- }
5552
-
5553
- class __ZikoUIText__ extends ZikoUIContainerElement {
5162
+ class __ZikoUIText__ extends ZikoUIElement {
5554
5163
  constructor(tag, name, lineBreak,...value) {
5555
5164
  super(tag, name);
5556
5165
  this.addValue(...value);
@@ -5655,7 +5264,7 @@ class ZikoUIAbbrText extends __ZikoUIText__ {
5655
5264
  return true
5656
5265
  }
5657
5266
  }
5658
- const text$1 = (...str) => new ZikoUIText(...str);
5267
+ const text = (...str) => new ZikoUIText(...str);
5659
5268
  const quote = (...str) => new ZikoUIQuote(...str);
5660
5269
  const dfnText = (...str) => new ZikoUIDefintion(...str);
5661
5270
  const supText = (...str) => new ZikoUISupText(...str);
@@ -5736,10 +5345,10 @@ var Text$1 = /*#__PURE__*/Object.freeze({
5736
5345
  quote: quote,
5737
5346
  subText: subText,
5738
5347
  supText: supText,
5739
- text: text$1
5348
+ text: text
5740
5349
  });
5741
5350
 
5742
- class ZikoUILI extends ZikoUIContainerElement{
5351
+ class ZikoUILI extends ZikoUIElement{
5743
5352
  constructor(UI){
5744
5353
  super("li","li");
5745
5354
  this.append(UI);
@@ -5748,7 +5357,7 @@ class ZikoUILI extends ZikoUIContainerElement{
5748
5357
  return true;
5749
5358
  }
5750
5359
  }
5751
- class ZikoUIList extends ZikoUIContainerElement {
5360
+ class ZikoUIList extends ZikoUIElement {
5752
5361
  constructor(element,name) {
5753
5362
  super(element,name);
5754
5363
  delete this.append;
@@ -5760,7 +5369,7 @@ class ZikoUIList extends ZikoUIContainerElement {
5760
5369
  append(...arr){
5761
5370
  for (let i = 0; i < arr.length; i++) {
5762
5371
  let li = null;
5763
- if(["string","number"].includes(typeof arr[i]))arr[i]=text$1(arr[i]);
5372
+ if(["string","number"].includes(typeof arr[i]))arr[i]=text(arr[i]);
5764
5373
  if (arr[i] instanceof ZikoUIElement)li=new ZikoUILI(arr[i]);
5765
5374
  li.setTarget(this.element);
5766
5375
  this.items.push(li[0]);
@@ -5788,7 +5397,7 @@ class ZikoUIList extends ZikoUIContainerElement {
5788
5397
  else
5789
5398
  for (let i = 0; i < ele.length; i++) {
5790
5399
  let li = null;
5791
- if(["number","string"].includes(typeof ele[i]))ele[i]=text$1(ele[i]);
5400
+ if(["number","string"].includes(typeof ele[i]))ele[i]=text(ele[i]);
5792
5401
  if (ele[i] instanceof ZikoUIElement)li=new ZikoUILI(ele[i]);
5793
5402
  this.element?.insertBefore(li.element, this.items[index].parent.element);
5794
5403
  this.items.splice(index, 0, ele[i][0]);
@@ -6396,7 +6005,7 @@ const sTags = SVGTags.reduce((acc, key) => {
6396
6005
  return acc;
6397
6006
  }, {});
6398
6007
 
6399
- class ZikoUIHtmlTag extends ZikoUIContainerElement {
6008
+ class ZikoUIHtmlTag extends ZikoUIElement {
6400
6009
  constructor(element) {
6401
6010
  super(element,"html");
6402
6011
  }
@@ -6449,7 +6058,7 @@ class ZikoUIBr extends ZikoUIElement {
6449
6058
  return true
6450
6059
  }
6451
6060
  }
6452
- class ZikoUILink extends ZikoUIContainerElement{
6061
+ class ZikoUILink extends ZikoUIElement{
6453
6062
  constructor(href){
6454
6063
  super("a","link");
6455
6064
  Object.assign(this.cache,{
@@ -6783,7 +6392,7 @@ class ZikoUITextArea extends ZikoUIElement {
6783
6392
  }
6784
6393
  const textarea =()=> new ZikoUITextArea();
6785
6394
 
6786
- let ZikoUIFlex$1 = class ZikoUIFlex extends ZikoUIContainerElement {
6395
+ class ZikoUIFlex extends ZikoUIElement {
6787
6396
  constructor(tag = "div", w = "100%", h = "100%") {
6788
6397
  super(tag ,"Flex");
6789
6398
  this.direction = "cols";
@@ -6831,18 +6440,18 @@ let ZikoUIFlex$1 = class ZikoUIFlex extends ZikoUIContainerElement {
6831
6440
  return this;
6832
6441
  }
6833
6442
  vertical(x, y, order=1) {
6834
- set_vertical$1.call(this,order);
6443
+ set_vertical.call(this,order);
6835
6444
  this.style({
6836
- alignItems: typeof(x)==="number"?map_pos_x$1.call(this,x):x,
6837
- justifyContent: typeof(y)=="number"?map_pos_y$1.call(this,y):y
6445
+ alignItems: typeof(x)==="number"?map_pos_x.call(this,x):x,
6446
+ justifyContent: typeof(y)=="number"?map_pos_y.call(this,y):y
6838
6447
  });
6839
6448
  return this;
6840
6449
  }
6841
6450
  horizontal(x, y, order=1) {
6842
- set_horizontal$1.call(this,order);
6451
+ set_horizontal.call(this,order);
6843
6452
  this.style({
6844
- alignItems: typeof(y)=="number"?map_pos_y$1.call(this,y):y,
6845
- justifyContent: typeof(x)==="number"?map_pos_x$1.call(this,x):x
6453
+ alignItems: typeof(y)=="number"?map_pos_y.call(this,y):y,
6454
+ justifyContent: typeof(x)==="number"?map_pos_x.call(this,x):x
6846
6455
  });
6847
6456
  return this;
6848
6457
  }
@@ -6851,38 +6460,44 @@ let ZikoUIFlex$1 = class ZikoUIFlex extends ZikoUIContainerElement {
6851
6460
  this.style({ display: "flex" });
6852
6461
  return this;
6853
6462
  }
6854
- };
6463
+ }
6855
6464
 
6856
- const Flex$1 = (...ZikoUIElement) =>{
6465
+ const Flex = (...ZikoUIElement) =>{
6857
6466
  let tag="div";
6858
6467
  if(typeof ZikoUIElement[0]==="string"){
6859
6468
  tag=ZikoUIElement[0];
6860
6469
  ZikoUIElement.pop();
6861
6470
  }
6862
- return new ZikoUIFlex$1(tag).append(...ZikoUIElement);
6471
+ return new ZikoUIFlex(tag).append(...ZikoUIElement);
6863
6472
  };
6864
- function set_vertical$1(direction){
6473
+ function set_vertical(direction){
6865
6474
  direction == 1
6866
6475
  ? this.style({ flexDirection: "column" })
6867
6476
  : direction == -1 && this.style({ flexDirection: "column-reverse" });
6868
6477
  return this;
6869
6478
  }
6870
- function set_horizontal$1(direction){
6479
+ function set_horizontal(direction){
6871
6480
  direction == 1
6872
6481
  ? this.style({ flexDirection: "row" })
6873
6482
  : direction == -1 && this.style({ flexDirection: "row-reverse" });
6874
6483
  return this;
6875
6484
  }
6876
- function map_pos_x$1(align){
6485
+ function map_pos_x(align){
6877
6486
  let pos = ["flex-start", "center", "flex-end"];
6878
6487
  if (typeof align === "number") align = pos[align + 1];
6879
6488
  return align;
6880
6489
  }
6881
- function map_pos_y$1(align){
6882
- return map_pos_x$1(-align);
6490
+ function map_pos_y(align){
6491
+ return map_pos_x(-align);
6883
6492
  }
6884
6493
 
6885
- class ZikoUIForm extends ZikoUIFlex$1{
6494
+ var Flex$1 = /*#__PURE__*/Object.freeze({
6495
+ __proto__: null,
6496
+ Flex: Flex,
6497
+ ZikoUIFlex: ZikoUIFlex
6498
+ });
6499
+
6500
+ class ZikoUIForm extends ZikoUIFlex{
6886
6501
  constructor(...items){
6887
6502
  super("form", "Form");
6888
6503
  this.append(...items);
@@ -7000,7 +6615,7 @@ class ZikoUICaption extends ZikoUIElement{
7000
6615
  const tr=(...ZikoUIElement)=>new ZikoUITr(...ZikoUIElement);
7001
6616
  const td=(...UI)=>{
7002
6617
  UI=UI.map(n=>{
7003
- if(!(n instanceof ZikoUIElement))n=text$1(n);
6618
+ if(!(n instanceof ZikoUIElement))n=text(n);
7004
6619
  return n
7005
6620
  });
7006
6621
  return new ZikoUITd(...UI)
@@ -7143,7 +6758,7 @@ var Table = /*#__PURE__*/Object.freeze({
7143
6758
  Table: Table$1
7144
6759
  });
7145
6760
 
7146
- class ZikoUIMain extends ZikoUIContainerElement{
6761
+ class ZikoUIMain extends ZikoUIElement{
7147
6762
  constructor(){
7148
6763
  super("main","Main");
7149
6764
  }
@@ -7151,7 +6766,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7151
6766
  return true
7152
6767
  }
7153
6768
  }
7154
- class ZikoUIHeader extends ZikoUIContainerElement{
6769
+ class ZikoUIHeader extends ZikoUIElement{
7155
6770
  constructor(){
7156
6771
  super("header","Header");
7157
6772
  }
@@ -7159,7 +6774,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7159
6774
  return true
7160
6775
  }
7161
6776
  }
7162
- class ZikoUINav extends ZikoUIContainerElement{
6777
+ class ZikoUINav extends ZikoUIElement{
7163
6778
  constructor(){
7164
6779
  super("nav","Nav");
7165
6780
  }
@@ -7167,7 +6782,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7167
6782
  return true
7168
6783
  }
7169
6784
  }
7170
- class ZikoUISection extends ZikoUIContainerElement{
6785
+ class ZikoUISection extends ZikoUIElement{
7171
6786
  constructor(){
7172
6787
  super("section","Section");
7173
6788
  this.style({position:"relative"});
@@ -7176,7 +6791,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7176
6791
  return true
7177
6792
  }
7178
6793
  }
7179
- class ZikoUIArticle extends ZikoUIContainerElement{
6794
+ class ZikoUIArticle extends ZikoUIElement{
7180
6795
  constructor(){
7181
6796
  super("article","Article");
7182
6797
  }
@@ -7184,7 +6799,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7184
6799
  return true
7185
6800
  }
7186
6801
  }
7187
- class ZikoUIAside extends ZikoUIContainerElement{
6802
+ class ZikoUIAside extends ZikoUIElement{
7188
6803
  constructor(){
7189
6804
  super("aside","Aside");
7190
6805
  }
@@ -7192,7 +6807,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
7192
6807
  return true
7193
6808
  }
7194
6809
  }
7195
- class ZikoUIFooter extends ZikoUIContainerElement{
6810
+ class ZikoUIFooter extends ZikoUIElement{
7196
6811
  constructor(){
7197
6812
  super("footer","Footer");
7198
6813
  this.element=document?.createElement("footer");
@@ -7227,7 +6842,7 @@ var Semantic = /*#__PURE__*/Object.freeze({
7227
6842
  ZikoUISection: ZikoUISection
7228
6843
  });
7229
6844
 
7230
- class ZikoUIGrid extends ZikoUIContainerElement {
6845
+ class ZikoUIGrid extends ZikoUIElement {
7231
6846
  constructor(tag ="div", w = "50vw", h = "50vh") {
7232
6847
  super(tag,"Grid");
7233
6848
  this.direction = "cols";
@@ -7259,1609 +6874,24 @@ class ZikoUIGrid extends ZikoUIContainerElement {
7259
6874
  }
7260
6875
  const Grid$1 = (...ZikoUIElement) => new ZikoUIGrid("div").append(...ZikoUIElement);
7261
6876
 
7262
- class ZikoUICollapbsible extends ZikoUIElement{
7263
- constructor(summary,content,openIcon="😁", closeIcon=openIcon){
7264
- super("details","Collapsible");
7265
- Object.assign(this.cache,{
7266
- icons:{
7267
- open : openIcon,
7268
- close : closeIcon
7269
- }
7270
- });
7271
- this.summary=html("summary",summary).style({
7272
- fontSize:"1.1em",
7273
- padding:"0.625rem",
7274
- fontWeight:"bold",
7275
- listStyleType:`"${openIcon}"`,
7276
- cursor:"pointer",
7277
- });
7278
- this.summary[0].style({
7279
- marginLeft:"0.5em",
7280
- });
7281
- this.content=content.style({
7282
- margin:"0.7em",
7283
- });
7284
- this.element?.append(this.summary.element,this.content.element);
7285
- this.style({
7286
- marginBottom:"0.7em",
7287
- });
7288
- watchAttr(this, e=>{
7289
- if(e.target.isOpen){
7290
- e.target.emit("open");
7291
- if(this?.parent?.isAccordion){
7292
- if(this.parent.cache.autoClose)this.parent.closeExcept(this);
7293
- }
7294
- this.summary.style({
7295
- listStyleType:`"${this.cache.icons.close}"`
7296
- });
7297
- }
7298
- else {
7299
- e.target.emit("close");
7300
- this.summary.style({
7301
- listStyleType:`"${this.cache.icons.open}"`
7302
- });
7303
- }
7304
- });
7305
- }
7306
- get isCollapsible(){
7307
- return true;
7308
- }
7309
- get isOpen(){
7310
- return this.element.open;
7311
- }
7312
- open(details=this){
7313
- this.element.open=true;
7314
- this.emit("open",details);
7315
- return this;
7316
- }
7317
- close(){
7318
- this.element.open=false;
7319
- return this;
7320
- }
7321
- onOpen(callback){
7322
- this.on("open", callback);
7323
- return this;
7324
- }
7325
- onClose(callback){
7326
- this.on("close", callback);
7327
- return this;
7328
- }
7329
- toggle(){
7330
- this.element.open=!this.element.open;
7331
- return this;
7332
- }
7333
- }
7334
-
7335
-
7336
- const Collapsible=(summary, content, openIcon, closeIcon)=>new ZikoUICollapbsible(summary,content,openIcon, closeIcon);
6877
+ var Grid$2 = /*#__PURE__*/Object.freeze({
6878
+ __proto__: null,
6879
+ Grid: Grid$1,
6880
+ ZikoUIGrid: ZikoUIGrid
6881
+ });
7337
6882
 
7338
- class ZikoUIAccordion extends ZikoUIContainerElement{
7339
- constructor(...Collapsible){
7340
- super("div", "Accordion");
7341
- this.append(...Collapsible);
7342
- Object.assign(this.cache,{
7343
- autoClose : true
7344
- });
7345
- }
7346
- get isAccordion(){
7347
- return true;
7348
- }
7349
- closeAll(){
7350
- this.items.forEach(n=>n.close());
7351
- return this;
7352
- }
7353
- closeExcept(...Collapsibles){
7354
- this.items.filter(n=>!Collapsibles.includes(n)).forEach(n=>n.close());
7355
- return this;
7356
- }
7357
- open(CollapsibleOrIndex){
7358
- CollapsibleOrIndex.isCollapsible? CollapsibleOrIndex.open(): this.items[CollapsibleOrIndex].open();
7359
- this.closeExcept(CollapsibleOrIndex.isCollapsible? CollapsibleOrIndex: this.items[CollapsibleOrIndex]);
7360
- return this;
7361
- }
7362
- enableAutoClose(){
7363
- this.cache.autoClose = true;
7364
- return this;
7365
- }
7366
- disableAutoClose(){
7367
- this.cache.autoClose = false;
7368
- return this;
7369
- }
7370
- toggleAutoClose(){
7371
- this.cache.autoClose = !this.cache.autoClose;
7372
- }
7373
- }
7374
- const Accordion = (... Collapsible) => new ZikoUIAccordion(...Collapsible);
7375
-
7376
- class ZikoUIFlex extends ZikoUIContainerElement {
7377
- constructor(tag = "div", w = "100%", h = "100%") {
7378
- super(tag ,"Flex");
7379
- this.direction = "cols";
7380
- if (typeof w == "number") w += "%";
7381
- if (typeof h == "number") h += "%";
7382
- this.style({ width: w, height: h });
7383
- this.style({ display: "flex" });
7384
- // this.render();
7385
- }
7386
- get isFlex(){
7387
- return true;
7388
- }
7389
- resp(px,wrap = true) {
7390
- this.wrap(wrap);
7391
- if (this.element.clientWidth < px) this.vertical();
7392
- else this.horizontal();
7393
- return this;
7394
- }
7395
- setSpaceAround() {
7396
- this.style({ justifyContent: "space-around" });
7397
- return this;
7398
- }
7399
- setSpaceBetween() {
7400
- this.style({ justifyContent: "space-between" });
7401
- return this;
7402
- }
7403
- setBaseline() {
7404
- this.style({ alignItems: "baseline" });
7405
- return this;
7406
- }
7407
- gap(g) {
7408
- if (this.direction === "row") this.style({ columnGap: g });
7409
- else if (this.direction === "column") this.style({ rowGap: g });
7410
- return this;
7411
- }
7412
- wrap(value = "wrap") {
7413
- const values = ["no-wrap", "wrap","wrap-reverse"];
7414
- this.style({
7415
- flexWrap: typeof value === "string" ? value : values[+value],
7416
- });
7417
- return this;
7418
- }
7419
- _justifyContent(align = "center") {
7420
- this.style({ justifyContent: align });
7421
- return this;
7422
- }
7423
- vertical(x, y, order=1) {
7424
- set_vertical.call(this,order);
7425
- this.style({
7426
- alignItems: typeof(x)==="number"?map_pos_x.call(this,x):x,
7427
- justifyContent: typeof(y)=="number"?map_pos_y.call(this,y):y
7428
- });
7429
- return this;
7430
- }
7431
- horizontal(x, y, order=1) {
7432
- set_horizontal.call(this,order);
7433
- this.style({
7434
- alignItems: typeof(y)=="number"?map_pos_y.call(this,y):y,
7435
- justifyContent: typeof(x)==="number"?map_pos_x.call(this,x):x
7436
- });
7437
- return this;
7438
- }
7439
- show() {
7440
- this.isHidden = false;
7441
- this.style({ display: "flex" });
7442
- return this;
7443
- }
7444
- }
7445
-
7446
- const Flex = (...ZikoUIElement) =>{
7447
- let tag="div";
7448
- if(typeof ZikoUIElement[0]==="string"){
7449
- tag=ZikoUIElement[0];
7450
- ZikoUIElement.pop();
7451
- }
7452
- return new ZikoUIFlex(tag).append(...ZikoUIElement);
7453
- };
7454
- function set_vertical(direction){
7455
- direction == 1
7456
- ? this.style({ flexDirection: "column" })
7457
- : direction == -1 && this.style({ flexDirection: "column-reverse" });
7458
- return this;
7459
- }
7460
- function set_horizontal(direction){
7461
- direction == 1
7462
- ? this.style({ flexDirection: "row" })
7463
- : direction == -1 && this.style({ flexDirection: "row-reverse" });
7464
- return this;
7465
- }
7466
- function map_pos_x(align){
7467
- let pos = ["flex-start", "center", "flex-end"];
7468
- if (typeof align === "number") align = pos[align + 1];
7469
- return align;
7470
- }
7471
- function map_pos_y(align){
7472
- return map_pos_x(-align);
7473
- }
7474
-
7475
- class ZikoUICarousel extends ZikoUIFlex{
7476
- constructor(...ZikoUIElement){
7477
- super();
7478
- this.style({
7479
- position:"relative",
7480
- overflow:"hidden",
7481
- touchAction:"none",
7482
- userSelect:"none"
7483
- });
7484
- this.horizontal("space-around",0);
7485
- this.track = Section(...ZikoUIElement).style({ display: "inline-flex" });
7486
- this.track.size(this.track.children.length * 100 + "vw");
7487
- this.track.setTarget(this);
7488
- this.track.items.map((n) =>
7489
- n.style({ pointerEvents: "none", margin: "auto 10px" })
7490
- );
7491
- this.x0 = null;
7492
- this.tx = 0;
7493
- this.onPtrMove(e=>{
7494
- if(e.isDown){
7495
- let x = e.event.pageX;
7496
- let dx = x - this.x0;
7497
- this.track.st.translateX(
7498
- this.tx + dx,
7499
- 0
7500
- );
7501
- }
7502
- });
7503
- this.onPtrDown(e=>{
7504
- console.log(e.event);
7505
- this.x0 = e.event.pageX;
7506
- const transformMatrix = window
7507
- .getComputedStyle(this.track.element)
7508
- .getPropertyValue("transform");
7509
- if (transformMatrix !== "none") {
7510
- this.tx = +transformMatrix.split(",")[4];
7511
- }
7512
- });
7513
- this.onPtrUp(e=>console.log(e.isDown));
7514
- this.onPtrLeave(e=>{
7515
- // Handle outside up
7516
- });
7517
- }
7518
- get isCarousel(){
7519
- return true;
7520
- }
7521
- }
7522
- const Carousel=(...ZikoUIElement)=>new ZikoUICarousel(...ZikoUIElement);
7523
-
7524
- class ZikoUICodeNote extends ZikoUIFlex{
7525
- constructor(){
7526
- super("section");
7527
- Object.assign(this.cache,{
7528
- order:0,
7529
- currentNote:null,
7530
- currentNoteIndex:null
7531
- });
7532
- this.vertical(0,0);
7533
- }
7534
- get isCodeNote(){
7535
- return true;
7536
- }
7537
- setCurrentNote(currentNote){
7538
- this.cache.currentNote=currentNote;
7539
- this.cache.currentNoteIndex=this.items.findIndex(n=>n===currentNote);
7540
- currentNote.focus();
7541
- this.items.forEach(n=>n.Input.style({
7542
- border: "1px solid #ccc"
7543
- }));
7544
- currentNote.Input.style({
7545
- border:"2px lightgreen solid"
7546
- });
7547
- return this;
7548
- }
7549
- addNote(text=""){
7550
- this.append(CodeCell(text));
7551
- return this;
7552
- }
7553
- execute(){
7554
- this.cache.currentNote.execute();
7555
- this.incrementOrder();
7556
- return this;
7557
- }
7558
- incrementOrder(){
7559
- this.cache.order++;
7560
- this.cache.currentNote.setOrder(this.cache.order);
7561
- return this;
7562
- }
7563
- next(){
7564
- if(this.cache.currentNote===this.items.at(-1)){
7565
- this.addNote();
7566
- this.setCurrentNote(this.items.at(-1));
7567
- }
7568
- else this.setCurrentNote(this.items[this.cache.currentNoteIndex+1]);
7569
- return this;
7570
- }
7571
- previous(){
7572
- // add append before
7573
- if(this.cache.currentNote!==this.items[0]){
7574
- this.setCurrentNote(this.items[this.cache.currentNoteIndex-1]);
7575
- }
7576
- return this;
7577
- }
7578
- data(){
7579
- return this.items.map(n=>n.cellData());
7580
- }
7581
- serialize(){
7582
- return JSON.stringify(this.data());
7583
- }
7584
- import(data=[]){
7585
- data.forEach((n,i)=>this.addNote(data[i].input));
7586
- return this;
7587
- }
7588
- }
7589
- const CodeNote=()=>new ZikoUICodeNote();
7590
-
7591
- const Input=(codeText="")=>html("code",codeText).style({
7592
- width:"100%",
7593
- height:"auto",
7594
- padding:"10px",
7595
- boxSizing:"border-box",
7596
- border: "1px solid #ccc",
7597
- outline: "none",
7598
- fontSize: "1rem",
7599
- fontFamily: "Lucida Console, Courier New, monospace",
7600
- padding: "1rem 0.5rem",
7601
- wordBreak:"break-all",
7602
- background:"#f6f8fa",
7603
- color:"#0062C3"
7604
- }).setAttr("contenteditable",true).setAttr("spellcheck",false);
7605
-
7606
- const Output=()=>html("output").style({
7607
- width:"100%",
7608
- height:"auto",
7609
- padding:"5px 0",
7610
- });
7611
- const Left=(ctx)=>Flex$1(
7612
- text$1("[ ]")
7613
- ).style({
7614
- width:"50px",
7615
- //height:getComputedStyle(ctx.Input.element).height,
7616
- height:"50px",
7617
- margin:"10px 4px",
7618
- padding:"5px",
7619
- color:"darkblue",
7620
- borderBottom:"4px solid gold",
7621
- }).horizontal(0,0);
7622
- const BTN_STYLE={
7623
- background:"none",
7624
- width:"25px",
7625
- height:"25px",
7626
- fontSize:"1.2rem",
7627
- cursor:"pointer"
7628
- };
7629
- const Right=(ctx)=>Flex$1(
7630
- text$1('▶️').style(BTN_STYLE).onClick(e=>{
7631
- if(ctx.parent instanceof ZikoUICodeNote)ctx.parent.setCurrentNote(ctx);
7632
- ctx.execute();
7633
- globalThis.__Ziko__.__Config__.default.target=e.target.parent.parent[1][1];
7634
- }),
7635
- text$1('📋').style(BTN_STYLE).onClick(()=>{
7636
- navigator.clipboard.writeText(ctx.codeText);
7637
- }),
7638
- text$1('✖️').style(BTN_STYLE).onClick(()=>ctx.remove()),
7639
- text$1('✖️').style(BTN_STYLE).onClick(()=>ctx.remove()),
7640
- ).style({
7641
- width:"70px",
7642
- height:"50px",
7643
- //background:"cyan",
7644
- margin:"10px 0"
7645
- }).horizontal(0,0).wrap(true);
7646
-
7647
- class ZikoUICodeCell extends ZikoUIFlex{
7648
- constructor(code="",{type="js",order=null}={}){
7649
- super("section");
7650
- Object.assign(this.cache,{
7651
- state:null,
7652
- order,
7653
- type,
7654
- metadata:{
7655
- created:Date.now(),
7656
- updated:null
7657
- }
7658
- });
7659
- this.Input=Input(code);
7660
- this.Output=Output();
7661
- this.InOut=Flex(
7662
- this.Input,
7663
- this.Output
7664
- ).vertical().style({
7665
- width:"100%",
7666
- margin:"10px auto"
7667
- });
7668
- this.RightControl=Right(this);
7669
- this.LeftControl=Left();
7670
- this.append(
7671
- this.LeftControl,
7672
- this.InOut,
7673
- this.RightControl
7674
- );
7675
- this.horizontal(-1,1).style({
7676
- //background:"#444",
7677
- width:"95vw",
7678
- margin:"0 auto",
7679
- border:"1px darkblue dotted"
7680
- });
7681
- let cm_content = this.Input.element.getElementsByClassName("cm-content")[0];
7682
- if( cm_content ){
7683
- cm_content.addEventListener("keydown",e=>{
7684
- if(e.key === "Enter" && e.shiftKey){
7685
- e.preventDefault();
7686
- this.execute(this.cache.order);
7687
- }
7688
- });
7689
- }
7690
- else {
7691
- this.Input.onKeyDown(e=>{
7692
- if(e.kd==="Enter"){
7693
- if(e.event.shiftKey){
7694
- e.event.preventDefault();
7695
- this.execute(this.cache.order);
7696
- }
7697
- }
7698
- if(this.cache.parent instanceof ZikoUICodeNote){
7699
- if(e.kd==="ArrowDown" && e.event.shiftKey ){
7700
- this.cache.parent.next();
7701
- }
7702
- if(e.kd==="ArrowUp" && e.event.shiftKey){
7703
- this.cache.parent.previous();
7704
- }
7705
- }
7706
- }
7707
- );
7708
- this.Input.onFocus(()=>{
7709
- if(this.cache.parent instanceof ZikoUICodeNote){
7710
- this.cache.parent.cache.currentNote=this;
7711
- this.cache.parent.setCurrentNote(this);
7712
- }
7713
- });
7714
- this.Input.onPaste((e)=>{
7715
- //e.event.preventDefault();
7716
- //this.setValue(this.codeText.trim())
7717
- });
7718
- // this.Input.onKeyPress(e=>{
7719
- // if(e.kp==="(")a.Input.element.textContent+=")";
7720
- // if(e.kp==="[")a.Input.element.textContent+="]";
7721
- // if(e.kp==="{")a.Input.element.textContent+="}";
7722
- // })
7723
- }
7724
- }
7725
- get isCodeCell(){
7726
- return true;
7727
- }
7728
- // space &nbsp
7729
- get codeText() {
7730
- return (this.Input.element.getElementsByClassName("cm-content")[0])
7731
- ?this.Input.element.getElementsByClassName("cm-content")[0].innerText.trim()
7732
- :this.Input.element.innerText.trim()
7733
- // return this.Input.element.innerText.trim();
7734
- }
7735
- get codeHTML() {
7736
- return this.Input.element.innerHTML;
7737
- }
7738
- get outputHTML(){
7739
- return this.Output.element.innerHTML;
7740
- }
7741
- setValue(codeText){
7742
- this.Input[0].setValue(codeText);
7743
- return this;
7744
- }
7745
- cellData(){
7746
- return {
7747
- input:this.codeText,
7748
- output:this.outputHTML,
7749
- order:this.cache.order,
7750
- type:this.cache.type
7751
- }
7752
- }
7753
- execute(order){
7754
- this.clearOutput();
7755
- this.evaluate(order);
7756
- this.cache.metadata.updated=Date.now();
7757
- return this;
7758
- }
7759
- #evaluateJs(order){
7760
- try{
7761
- this.LeftControl[0].setValue("pending");
7762
- this.cache.state="pending";
7763
- // globalThis.eval(this.Input.element.innerText);
7764
- globalThis.eval(this.codeText);
7765
-
7766
- }
7767
- catch(err){
7768
- console.log(err);
7769
- text(`Error : ${err.message}`).style({
7770
- color:"red",
7771
- background:"gold",
7772
- border:"2px red solid",
7773
- padding:"10px",
7774
- margin:"10px 0",
7775
- display:"flex",
7776
- justifyContent: "center",
7777
- });
7778
- this.LeftControl[0].setValue("Err");
7779
- this.cache.state="Error";
7780
- }
7781
- finally{
7782
- if(this.cache.state==="pending"){
7783
- this.cache.state="success";
7784
- this.setOrder(order);
7785
- if(this.cache.parent instanceof ZikoUICodeNote){
7786
- this.cache.parent.incrementOrder();
7787
- this.cache.parent.next();
7788
- }
7789
- }
7790
- }
7791
- }
7792
- #evaluateMd(){
7793
-
7794
- }
7795
- #evaluateHtml(){
7796
-
7797
- }
7798
- evaluate(order){
7799
- globalThis.__Ziko__.__Config__.default.target=this.Output.element;
7800
- switch(this.cache.type){
7801
- case "js":this.#evaluateJs(order);break;
7802
- }
7803
- return this;
7804
- }
7805
- clearInput(){
7806
- this.Output.element.innerText="";
7807
- return this;
7808
- }
7809
- clearOutput(){
7810
- this.Output.element.innerText="";
7811
- return this;
7812
- }
7813
- setOrder(order,render=true){
7814
- this.cache.order=order;
7815
- if(render){
7816
- (typeof order === "number")?this.LeftControl[0].setValue(`[${order}]`):this.LeftControl[0].setValue("[-]");
7817
- }
7818
- return this;
7819
- }
7820
- focus(){
7821
- this.Input.element.focus();
7822
- return this;
7823
- }
7824
- }
7825
-
7826
-
7827
- const CodeCell=(codeText,{type,order}={})=>new ZikoUICodeCell(codeText,{type,order});
7828
-
7829
- // Next
7830
- // Previous
7831
- // Vertical
7832
- // Horizontal
7833
- class ZikoUITabs extends ZikoUIFlex{
7834
- #ACTIVE_ELEMENT_INDEX=0;
7835
- constructor(Controllers,Contents){
7836
- super("div","Tabs");
7837
- Object.assign(this.cache,{
7838
- config:{
7839
- controllersPercent : .50
7840
- }
7841
- });
7842
- this.style({
7843
- boxSizing:"border-box",
7844
- backgroundColor: "blanchedalmond",
7845
- border:"1px red solid",
7846
- margin:"30px",
7847
- });
7848
- this.controllersContainer = Flex().size("auto","auto").style({
7849
- boxSizing:"border-box",
7850
- justifyContent:"center",
7851
- alignItems:"center",
7852
- textAlign:"center",
7853
-
7854
- minWidth:"50px",
7855
- minHeight:"50px",
7856
-
7857
- backgroundColor:"darkblue",
7858
- border:"1px darkblue solid",
7859
-
7860
- }).setAttr("role","tablist");
7861
- this.contentContainer = Flex().style({
7862
- boxSizing:"border-box",
7863
- justifyContent:"center",
7864
- alignItems:"center",
7865
- textAlign:"center",
7866
-
7867
- width:"100%",
7868
- height:"100%",
7869
- backgroundColor:"darkslategrey",
7870
- });
7871
- this.append(
7872
- this.controllersContainer,
7873
- this.contentContainer
7874
- );
7875
- if(Controllers.length!==Contents.length)console.error("");
7876
- else {
7877
- this.controllersContainer.append(...Controllers);
7878
- this.contentContainer.append(...Contents);
7879
- }
7880
- this.init();
7881
- this.display(0);
7882
- this.useVertical();
7883
- }
7884
- get isTabs(){
7885
- return true;
7886
- }
7887
- init(){
7888
- // Remove old listener
7889
- for(let i=0;i<this.controllersContainer.length;i++){
7890
- this.controllersContainer[i].setAttr("role","tab").setAttr("aria-controls",`tab${i}`);
7891
- this.contentContainer[i].setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${i}`).setAttr("tabindex",-1);
7892
- }
7893
- this.controllersContainer.forEach(item=>item.onClick(e=>{
7894
- const tab=e.target.element.getAttribute("aria-controls");
7895
- const index=+tab.slice(3);
7896
- this.contentContainer.filter(n=>n.element.getAttribute("aria-labelledby")===tab,()=>{
7897
- if(this.#ACTIVE_ELEMENT_INDEX!==index)this.display(index);
7898
- });
7899
- }));
7900
- return this;
7901
- }
7902
- addPairs(ControllerItem,ContentItem){
7903
- this.controllersContainer.append(ControllerItem);
7904
- this.contentContainer.append(ContentItem);
7905
- const length=this.controllersContainer.length;
7906
- this.controllersContainer.at(-1).setAttr("role","tab").setAttr("aria-controls",`tab${length-1}`);
7907
- this.contentContainer.at(-1).setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${length-1}`).setAttr("tabindex",-1);
7908
- // Add listener
7909
- return this;
7910
- }
7911
- removePairs(index){
7912
-
7913
- }
7914
- display(index){
7915
- this.#ACTIVE_ELEMENT_INDEX=index%this.contentContainer.length;
7916
- const ActiveContent = this.contentContainer.at(this.#ACTIVE_ELEMENT_INDEX);
7917
- this.controllersContainer.forEach(n=>n.setAttr("tabindex",-1).setAttr("aria-selected",false));
7918
- this.controllersContainer.at(this.#ACTIVE_ELEMENT_INDEX).setAttr("tabindex",0).setAttr("aria-selected",true);
7919
-
7920
- this.contentContainer.forEach(n=>n.st.hide());
7921
-
7922
- ActiveContent.st.translateX(100,0);
7923
- ActiveContent.setAttr("tabindex",0).st.show();
7924
- ActiveContent.st.translateX(0,1000);
7925
-
7926
- return this;
7927
- }
7928
- next(i=1){
7929
- this.display(this.#ACTIVE_ELEMENT_INDEX+i);
7930
- return this;
7931
- }
7932
- previous(i=1){
7933
- this.display(this.#ACTIVE_ELEMENT_INDEX-i);
7934
- return this;
7935
- }
7936
- useVertical(){
7937
- this.vertical(0,0);
7938
- this.controllersContainer.horizontal(0,0);
7939
- this.controllersContainer.style({
7940
- width : "100%",
7941
- height : `${this.cache.config.controllersPercent*100}%`
7942
- });
7943
- this.contentContainer.style({
7944
- width : "100%",
7945
- height : `${(1-this.cache.config.controllersPercent)*100}%`
7946
- });
7947
- return this;
7948
- }
7949
- useHorizontal(){
7950
- this.horizontal(0,0);
7951
- this.controllersContainer.vertical(0, 0);
7952
- this.controllersContainer.style({
7953
- height : "100%",
7954
- width : `${this.cache.config.controllersPercent*100}%`
7955
- });
7956
- this.contentContainer.style({
7957
- height : "100%",
7958
- width : `${(1-this.cache.config.controllersPercent)*100}%`
7959
- });
7960
- return this;
7961
- }
7962
- // useHorizontalSwippe(){
7963
- // this.onPtrDown();
7964
- // this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_x)));
7965
- // return this;
7966
- // }
7967
- // useVerticalSwippe(){
7968
- // this.onPtrDown();
7969
- // this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_y)));
7970
- // return this;
7971
- // }
7972
- }
7973
-
7974
- const Tabs=(Controllers,Contents)=>new ZikoUITabs(Controllers,Contents);
7975
-
7976
- /*
7977
-
7978
- const cont=(txt = "A")=>btn(txt).style({width:"170px"})
7979
- a=Tabs(
7980
- [cont("A1"),cont("A2"),cont("A3"),cont("A4")],
7981
- [cont("A1"),cont("A2"),cont("A3"),cont("A4")]
7982
- ).vertical().size("400px")
7983
- a.controllersContainer.style({
7984
- overflowX:"auto"
7985
- })
7986
- a.useHorizontal()
7987
-
7988
- */
7989
-
7990
- /*
7991
-
7992
- a=Flex().size("400px","400px").style({background:"red"})
7993
- a.element.animate([
7994
- { borderRadius: "0" , background : "red" },
7995
- { borderRadius: "50% 0" },
7996
- { borderRadius: "50% 50%" },
7997
- { borderRadius: "0 50%" },
7998
- { borderRadius: "0", background : "yellow" },
7999
- ],
8000
- {
8001
- // temporisation
8002
- duration: 2000,
8003
- iterations: Infinity,
8004
- })
8005
-
8006
- */
8007
-
8008
- const palette = {
8009
- success: {
8010
- titleColor:"green",
8011
- contentColor: "#35495e",
8012
- bgColor: "#d4edda", // Fixed
8013
- bgColor:"linear-gradient(-225deg, #DFFFCD 0%, #90F9C4 48%, #39F3BB 100%)",
8014
- borderColor: "#28a745", // Fixed
8015
- icon: "✅"
8016
- },
8017
- info: {
8018
- titleColor:"blue",
8019
- contentColor: "#00204a",
8020
- bgColor: "#93deff", // Fixed
8021
- bgColor:"radial-gradient(circle at 10% 20%, rgb(147, 230, 241) 0%, rgb(145, 192, 241) 45.5%)",
8022
- borderColor: "#005689", // Fixed
8023
- icon: "ℹ️"
8024
- },
8025
- warning: {
8026
- titleColor:"#e4663a",
8027
- contentColor: "#45171d",
8028
- bgColor:"#fdffcd",
8029
- bgColor:"radial-gradient(907px at 3.4% 19.8%, rgb(255, 243, 122) 0%, rgb(255, 102, 145) 97.4%)",
8030
- borderColor: "#efd510",
8031
- icon: "⚠️"
8032
- },
8033
- danger: {
8034
- titleColor:"red",
8035
- contentColor: "#721c24",
8036
- bgColor: "#f8d7da", // Fixed
8037
- bgColor:"linear-gradient(90deg, rgb(255, 157, 129) 24.3%, rgb(255, 138, 138) 78.3%)",
8038
- borderColor: "#c50000", // Fixed
8039
- icon: "❌"
8040
- },
8041
- tips: {
8042
- titleColor:null,
8043
- contentColor: null,
8044
- bgColor: null,
8045
- borderColor: null,
8046
- icon: "💡"
8047
- },
8048
- important: {
8049
- titleColor:null,
8050
- contentColor: null,
8051
- bgColor: null,
8052
- borderColor: null,
8053
- icon: "📌"
8054
- },
8055
-
8056
- };
8057
-
8058
- class ZikoUIAlert extends ZikoUIFlex$1{
8059
- constructor(type, title, content){
8060
- super();
8061
- this.title = h3(title);
8062
- this.icon = text$1(palette[type].icon).style({
8063
- display: "flex",
8064
- justifyContent:"center",
8065
- borderRadius:"50%",
8066
- minWidth:"30px",
8067
- minHeight:"30px",
8068
- });
8069
- this.content = content;
8070
- this.vertical()
8071
- .size("200px", "auto")
8072
- .style({
8073
- borderRadius:"10px",
8074
- padding:"10px"
8075
- });
8076
- this.append(
8077
- Flex$1(
8078
- this.title,
8079
- this.icon
8080
- ).size("100%", "40px").style({}).horizontal("space-between",0),
8081
- this.content
8082
- );
8083
- this.useType(type);
8084
- }
8085
- get isAlert(){
8086
- return true;
8087
- }
8088
- useType(type){
8089
- this.style({
8090
- color:palette[type].color,
8091
- background:palette[type].bgColor,
8092
- border: `1px darkblue solid`,
8093
- borderLeft: `15px ${palette[type].borderColor} solid`,
8094
- });
8095
- this.title.style({
8096
- color:palette[type].titleColor
8097
- });
8098
- this.content.st.color(palette[type].titleColor);
8099
- this.icon.setValue(palette[type].icon).style({
8100
- border:`2px ${palette[type].borderColor} solid`,
8101
- alignItems: type==="warning"?"flex-start":"center",
8102
- });
8103
- return this;
8104
- }
8105
- useSuccess(){
8106
- this.useType("success");
8107
- return this;
8108
- }
8109
- useInfo(){
8110
- this.useType("info");
8111
- return this;
8112
- }
8113
- useWarning(){
8114
- this.useType("warning");
8115
- return this;
8116
- }
8117
- useDanger(){
8118
- this.useType("danger");
8119
- return this;
8120
- }
8121
- }
8122
-
8123
- const successAlert=(title, content)=>new ZikoUIAlert("success", title, content);
8124
- const infoAlert=(title, content)=>new ZikoUIAlert("info", title, content);
8125
- const warningAlert=(title, content)=>new ZikoUIAlert("warning", title, content);
8126
- const dangerAlert=(title, content)=>new ZikoUIAlert("danger", title, content);
8127
-
8128
- class __ZikoUISplitter__ extends ZikoUIElement{
8129
- constructor(flexDirection, resizerCursor, resizerProp){
8130
- super("div", "Splitter");
8131
- Object.assign(this.cache,{
8132
- isResizing : false,
8133
- flexDirection,
8134
- resizerCursor,
8135
- resizerProp
8136
- });
8137
- this.style({
8138
- display:"flex",
8139
- flexDirection : this.cache.flexDirection,
8140
- border: "2px solid #333",
8141
- overflow: "hidden"
8142
- });
8143
- this.resizer = new ZikoUIElement("div", "resizer").style({
8144
- [this.cache.resizerProp]:"5px",
8145
- backgroundColor: "gold",
8146
- cursor: this.cache.resizerCursor,
8147
- touchAction: "none",
8148
- });
8149
- this.onPtrDown(e=>{
8150
- this.cache.isResizing = true;
8151
- this.style({
8152
- cursor : this.cache.resizerCursor // ns-resize
8153
- });
8154
- this.resizer.element.setPointerCapture(e.event.pointerId);
8155
- });
8156
- this.onPtrUp(e=>{
8157
- this.cache.isResizing = false;
8158
- this.style({
8159
- cursor: "default"
8160
- });
8161
- this.resizer.element.releasePointerCapture(e.event.pointerId);
8162
- });
8163
- this.onPtrCancel(()=>{
8164
- this.cache.isResizing = false;
8165
- this.style({
8166
- cursor: "default"
8167
- });
8168
- });
8169
- this.onPtrOut(()=>{
8170
- if (this.cache.isResizing) {
8171
- this.cache.isResizing = false;
8172
- this.style({
8173
- cursor: "default"
8174
- });
8175
- }
8176
- });
8177
- }
8178
- get isSplitter(){
8179
- return true;
8180
- }
8181
- styleResizer(style={}){
8182
- this.resizer.style(style);
8183
- return this;
8184
- }
8185
- }
8186
-
8187
- class ZikoUIHorizontalSplitter extends __ZikoUISplitter__{
8188
- constructor(leftPane, rightPane){
8189
- super("row", "ew-resize", "width");
8190
- this.leftPane = leftPane.style({
8191
- width:"50%",
8192
- flexGrow: 1,
8193
- overflow: "hidden"
8194
- });
8195
- this.rightPane = rightPane.style({
8196
- width:"50%",
8197
- flexGrow: 1,
8198
- overflow: "hidden"
8199
- });
8200
- this.element?.append(
8201
- this.leftPane.element,
8202
- this.resizer.element,
8203
- this.rightPane.element
8204
- );
8205
- this.onPtrMove(e=>{
8206
- if (!this.cache.isResizing) return;
8207
- const containerWidth = this.element.getBoundingClientRect().width; // height
8208
- const pointerRelativeXpos = e.event.clientX - this.element.getBoundingClientRect().x; // y
8209
- let newLeftPaneWidth = (pointerRelativeXpos / containerWidth) * 100;
8210
- let newRightPaneWidth = 100 - newLeftPaneWidth;
8211
- if (newLeftPaneWidth < 0) newLeftPaneWidth = 0;
8212
- if (newRightPaneWidth < 0) newRightPaneWidth = 0;
8213
- this.leftPane.element.style.width = `${newLeftPaneWidth}%`;
8214
- this.rightPane.element.style.width = `${newRightPaneWidth}%`;
8215
- });
8216
- }
8217
- get isHorizontalSplitter(){
8218
- return true;
8219
- }
8220
- }
8221
- const hSplitter=(leftPane, rightPane)=>new ZikoUIHorizontalSplitter(leftPane, rightPane);
8222
-
8223
- class ZikoUIVerticalSplitter extends __ZikoUISplitter__{
8224
- constructor(topPane, bottomPane){
8225
- super("column", "ns-resize", "height");
8226
- this.topPane = topPane.style({
8227
- height:"50%",
8228
- flexGrow: 1,
8229
- overflow: "hidden"
8230
- });
8231
- this.bottomPane = bottomPane.style({
8232
- height:"50%",
8233
- flexGrow: 1,
8234
- overflow: "hidden"
8235
- });
8236
- this.element?.append(
8237
- this.topPane.element,
8238
- this.resizer.element,
8239
- this.bottomPane.element
8240
- );
8241
- this.onPtrMove(e=>{
8242
- if (!this.cache.isResizing) return;
8243
- const containerHeight = this.element.getBoundingClientRect().height; // height
8244
- const pointerRelativeYpos = e.event.clientY - this.element.getBoundingClientRect().y; // y
8245
- let newTopPaneHeight = (pointerRelativeYpos / containerHeight) * 100;
8246
- let newBottomPaneHeight = 100 - newTopPaneHeight;
8247
- if (newTopPaneHeight < 0) newTopPaneHeight = 0;
8248
- if (newBottomPaneHeight < 0) newBottomPaneHeight = 0;
8249
- this.topPane.element.style.height = `${newTopPaneHeight}%`;
8250
- this.bottomPane.element.style.height = `${newBottomPaneHeight}%`;
8251
- });
8252
- }
8253
- get isHorizontalSplitter(){
8254
- return true;
8255
- }
8256
- }
8257
- const vSplitter=(topPane, bottomPane)=>new ZikoUIVerticalSplitter(topPane, bottomPane);
8258
-
8259
- const Splitter = ({orintation = "horizontal",slides = []}) =>{
8260
- if(["v","vertical"].includes(orintation.toLowerCase())) return vSplitter(...slides);
8261
- else if(["h","horizontal"].includes(orintation.toLowerCase())) return hSplitter(...slides);
8262
- else ;
8263
- };
8264
-
8265
- class ZikoUIBreadcrumbs extends ZikoUIElement{
8266
- constructor(...items){
8267
- super("ul", "Breadcrumbs");
8268
- Object.assign(this.cache,{
8269
- separatorTextContent:"/"
8270
- });
8271
- this.style({
8272
- listStyle: "none",
8273
- display: "flex",
8274
- flexWrap: "wrap"
8275
- });
8276
- this.list=html('li').style({
8277
- display: "flex",
8278
- flexWrap: "wrap"
8279
- });
8280
- this.append(...items);
8281
- }
8282
- #addItem(item){
8283
- if(["string","number","boolean"].includes(typeof item))item = text$1(item);
8284
- const li = html("li", item).style({
8285
- display: "flex",
8286
- alignItems: "center"
8287
- });
8288
- if(this.element.children.length>0){
8289
- const separator = text$1(this.cache.separatorTextContent).style({
8290
- padding: "0 4px"
8291
- });
8292
- this.element?.append(separator.element);
8293
- }
8294
- this.element?.append(li.element);
8295
- }
8296
- append(...items){
8297
- items.forEach(n=>this.#addItem(n));
8298
- return this;
8299
- }
8300
- configSeparator(separatorTextContent = this.cache.separator, style = {}){
8301
- this.cache.separatorTextContent = separatorTextContent;
8302
- const separators = [...this.element.children].filter(n=>n.tagName==="SPAN");
8303
- separators.forEach(node=>{
8304
- node.textContent = separatorTextContent;
8305
- Object.assign(node.style, style);
8306
- }
8307
- );
8308
- return this;
8309
- }
8310
- }
8311
- const Breadcrumbs=(...items)=>new ZikoUIBreadcrumbs(...items);
8312
-
8313
- class ZikoUIMenu3d extends ZikoUIFlex$1{
8314
- constructor(controller, content){
8315
- super("div", "menu3d");
8316
- this.controller = controller;
8317
- this.content = content;
8318
- this.cover = null;
8319
- Object.assign(this.cache,{
8320
- config:{
8321
- useTransfo : false,
8322
- isOpen : false,
8323
- position : "left",
8324
- threshold : 40,
8325
- angle : 70,
8326
- overlap : 6,
8327
- width : 300,
8328
- height : 300,
8329
- transitionDuration: '0.5s',
8330
- transitionEasing: 'ease',
8331
- menuTransformOrigin : null,
8332
- menuTransformClosed : null,
8333
- menuTransformOpened : null,
8334
- contentTransformOrigin : null,
8335
- contentTransformClosed : null,
8336
- contentTransformOpened : null,
8337
- }
8338
- });
8339
- this.append(
8340
- this.controller,
8341
- this.content
8342
- );
8343
- this.update();
8344
- }
8345
- get isOpen(){
8346
- return this.cache.config.isOpen;
8347
- }
8348
- update(){
8349
- this.controller.style({
8350
- display:"none",
8351
- padding:"20px",
8352
- overflow:"auto",
8353
- background:"darkblue",
8354
- color: "#eee",
8355
- webkitboxSizing: "border-box",
8356
- mozBoxSizing: "border-box",
8357
- boxSizing:"border-box",
8358
- });
8359
- this.content.style({
8360
- padding:"20px 40px",
8361
- width: "100%",
8362
- height: "100%",
8363
- // overflowY:"auto",
8364
- background:"gold",
8365
- color: "#eee",
8366
- webkitboxSizing: "border-box",
8367
- mozBoxSizing: "border-box",
8368
- boxSizing:"border-box",
8369
- webkitOverflowScrolling:"touch",
8370
- webkitTransformStyle: "preserve-3d"
8371
- });
8372
- this.setupPositions();
8373
- this.setupWrapper();
8374
- this.setupCover();
8375
- this.setupMenu();
8376
- this.setupContent();
8377
- }
8378
- setupPositions() {
8379
- this.cache.config.menuTransformOpened = '';
8380
- this.cache.config.contentTransformClosed = '';
8381
- let menuAngle = this.cache.config.angle;
8382
- let contentAngle = this.cache.config.angle / -2;
8383
- switch( this.cache.config.position ) {
8384
- case "top":
8385
- this.cache.config.menuTransformOrigin = '50% 0%';
8386
- this.cache.config.menuTransformClosed = `rotateX(${menuAngle}deg) translateY(-100%) translateY(${this.cache.config.overlap}px)`;
8387
- this.cache.config.contentTransformOrigin = '50% 0';
8388
- this.cache.config.contentTransformOpened = `translateY(${this.height/2}px) rotateX(${contentAngle}deg)`;
8389
- break;
8390
- case "right":
8391
- this.cache.config.menuTransformOrigin = '100% 50%';
8392
- this.cache.config.menuTransformClosed = 'rotateY( ' + menuAngle + 'deg ) translateX( 100% ) translateX( -2px ) scale( 1.01 )';
8393
- this.cache.config.contentTransformOrigin = '100% 50%';
8394
- this.cache.config.contentTransformOpened = 'translateX( -'+ this.width/2 +'px ) rotateY( ' + contentAngle + 'deg )';
8395
- break;
8396
- case "bottom":
8397
- this.cache.config.menuTransformOrigin = '50% 100%';
8398
- this.cache.config.menuTransformClosed = 'rotateX( ' + -menuAngle + 'deg ) translateY( 100% ) translateY( -'+ this.cache.config.overlap +'px )';
8399
- this.cache.config.contentTransformOrigin = '50% 100%';
8400
- this.cache.config.contentTransformOpened = 'translateY( -'+ this.height/2 +'px ) rotateX( ' + -contentAngle + 'deg )';
8401
- break;
8402
- default:
8403
- this.cache.config.menuTransformOrigin = '100% 50%';
8404
- this.cache.config.menuTransformClosed = 'translateX( -100% ) translateX( '+ this.cache.config.overlap +'px ) scale( 1.01 ) rotateY( ' + -menuAngle + 'deg )';
8405
- this.cache.config.contentTransformOrigin = '0 50%';
8406
- this.cache.config.contentTransformOpened = 'translateX( '+ this.width/2 +'px ) rotateY( ' + -contentAngle + 'deg )';
8407
- break;
8408
- }
8409
- }
8410
- setupWrapper() {
8411
- this.style({
8412
- perspective : "800px",
8413
- perspectiveOrigin : this.cache.config.contentTransformOrigin
8414
- });
8415
- }
8416
- setupCover(){
8417
- if( this.cover ) this.cover.element.parentNode.removeChild( this.cover.element );
8418
- this.cover=new ZikoUIElement("div","div").style({
8419
- position:"absolute",
8420
- display:"block",
8421
- width:"100%",
8422
- height:"100%",
8423
- left:0,
8424
- top:0,
8425
- zIndex:1000,
8426
- visibility:"hidden",
8427
- opacity:0,
8428
- transition: `all ${this.cache.config.transitionDuration} ${this.cache.config.transitionEasing}`
8429
- });
8430
- this.content.element.appendChild( this.cover.element );
8431
- }
8432
- setupMenu() {
8433
- // var style = dom.menu.style;
8434
- switch( this.cache.config.position ) {
8435
- case "top":
8436
- this.controller.style({
8437
- width : "100%",
8438
- height : `${this.height/2}px`
8439
- });break;
8440
- case "right":
8441
- this.controller.style({
8442
- right : 0,
8443
- width : `${this.width/2}px`,
8444
- height : "100%"
8445
- });break;
8446
- case "bottom":
8447
- this.controller.style({
8448
- bottom : "0",
8449
- width : "100%",
8450
- height : `${this.height/2}px`
8451
- });break;
8452
- case "left":
8453
- this.controller.style({
8454
- width : `${this.width/2}px`,
8455
- height : "100%"
8456
- });break;
8457
- }
8458
- this.controller.style({
8459
- position : "fixed",
8460
- display : "block",
8461
- zIndex : 1,
8462
- transform : this.cache.config.menuTransformClosed,
8463
- transformOrigin : this.cache.config.menuTransformOrigin,
8464
- transition : 'all ' + this.cache.config.transitionDuration +' '+ this.cache.config.transitionEasing
8465
- });
8466
- }
8467
- setupContent() {
8468
- this.content.style({
8469
- transform : this.cache.config.contentTransformClosed,
8470
- transformOrigin : this.cache.config.contentTransformOrigin,
8471
- transition : `all ${this.cache.config.transitionDuration} ${this.cache.config.transitionEasing}`
8472
- });
8473
- }
8474
- open(){
8475
- if(!this.cache.config.isOpen){
8476
- this.cache.config.isOpen = true;
8477
- this.cover.style({
8478
- height : this.content.element.scrollHeight + "px",
8479
- visibility : "visible",
8480
- opacity : 1,
8481
- });
8482
- if(this.cache.config.useTransfo)this.content.style({
8483
- transform : this.cache.config.contentTransformOpened,
8484
- userSelect : "default"
8485
- });
8486
- this.controller.style({
8487
- transform : this.cache.config.menuTransformOpened,
8488
- useSelect : "none"
8489
- });
8490
- this.emit("opened");
8491
- }
8492
- }
8493
- close() {
8494
- if( this.cache.config.isOpen ) {
8495
- this.cache.config.isOpen = false;
8496
- this.cover.style({
8497
- // height : this.content.element.scrollHeight + "px",
8498
- visibility : "hidden",
8499
- opacity : 0,
8500
- });
8501
- this.content.style({
8502
- transform : this.cache.config.contentTransformClosed,
8503
- useSelect : "default"
8504
- });
8505
- this.controller.style({
8506
- transform : this.cache.config.menuTransformClosed,
8507
- userSelect : "none"
8508
- });
8509
- }
8510
- this.emit("closed");
8511
- }
8512
- onOpen(callback){
8513
- this.on("opened", callback.bind(this));
8514
- return this;
8515
- }
8516
- onClose(callback){
8517
- this.on("closed", callback.bind(this));
8518
- return this;
8519
- }
8520
- #usePosition(position){
8521
- if(this.cache.config.position!==position){
8522
- this.cache.config.position=position;
8523
- const isOpen = this.isOpen;
8524
- this.close();
8525
- this.update();
8526
- if(isOpen)this.open();
8527
- }
8528
- }
8529
- useRight(){
8530
- this.#usePosition("left");
8531
- return this;
8532
- }
8533
- useRight(){
8534
- this.#usePosition("right");
8535
- return this;
8536
- }
8537
- useTop(){
8538
- this.#usePosition("top");
8539
- return this;
8540
- }
8541
- useBottom(){
8542
- this.#usePosition("bottom");
8543
- return this;
8544
- }
8545
- }
8546
- const menu3d = (controller, content) => new ZikoUIMenu3d(controller, content);
8547
- globalThis.menu3d = menu3d;
8548
-
8549
-
8550
- /*
8551
-
8552
- a = menu3d(Flex(text("Menu")), Flex(text("Content")))
8553
- .size("80vw", "50vh")
8554
- .style({ userSelect: "none" });
8555
- a.onOpen((e) => console.log(e));
8556
- a.open();
8557
- a.controller.onSwipe(0.05, 1, (e) => {
8558
- if (e.event.detail.direction.x === "left") a.close();
8559
- });
8560
- a.content.onSwipe(0.1, 1, (e) => {
8561
- if (e.event.detail.direction.x === "left") a.close();
8562
- if (e.event.detail.direction.x === "right") a.open();
8563
- });
8564
-
8565
-
8566
- */
8567
-
8568
- class ZikoUIModal extends ZikoUIContainerElement{
8569
- constructor(...UIElements){
8570
- super("dialog", "modal");
8571
- this.append(...UIElements);
8572
- Object.assign(this.cache,{
8573
- config:{
8574
- mode:"modal",
8575
- useTransition:true
8576
- }
8577
- });
8578
- this.style({
8579
- display:"flex",
8580
- justifyContent:"center",
8581
- alignItems:"center",
8582
- position: "absolute",
8583
- top: "50%",
8584
- left: "50%",
8585
- transform: "translate(-50%, -50%)",
8586
- padding: "20px",
8587
- border: "none",
8588
- backgroundCcolor: "#f5f5f5",
8589
- boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.1)",
8590
- borderRadius: "8px"
8591
- });
8592
- this.close();
8593
- }
8594
- open(){
8595
- if(!this.element.open){
8596
- switch(this.cache.config.mode){
8597
- case "modal": this.element.showModal(); break;
8598
- case "dialog": this.element.show(); break;
8599
- default : this.element.show(); break;
8600
- }
8601
- // this.style({
8602
- // display : "flex",
8603
- // })
8604
- this.st.fadeIn(1000);
8605
- this.emit("modal:opened");
8606
- }
8607
- return this;
8608
- }
8609
- close(){
8610
- // this.style({
8611
- // display : "none"
8612
- // })
8613
- this.st.fadeOut(1000);
8614
- if(this.element.open){
8615
- this.element.close();
8616
- }
8617
- this.emit("modal:closed");
8618
- return this;
8619
- }
8620
- closeAfter(t = 1000){
8621
- globalThis?.setTimeout(()=>this.close(), t);
8622
- return this;
8623
- }
8624
- onOpen(callback){
8625
- this.on("modal:opened",callback.bind(this));
8626
- return this;
8627
- }
8628
- onClose(callback){
8629
- this.on("modal:closed",callback.bind(this));
8630
- return this;
8631
- }
8632
- useModal(){
8633
- this.cache.config.mode = "modal";
8634
- return this;
8635
- }
8636
- useDialog(){
8637
- this.cache.config.mode = "dialog";
8638
- return this;
8639
- }
8640
- useTransition(enabled = true){
8641
- this.cache.config.useTransition = enabled;
8642
- return this;
8643
- }
8644
- }
8645
-
8646
- const Modal=(...UIElements)=>new ZikoUIModal(...UIElements);
8647
-
8648
- /*
8649
- a=Modal(text("Hello")).style({
8650
- width:"100%",
8651
- height:"100%"
8652
- })
8653
- Flex(a).size("400px","400px").style({border:"1px red solid"})
8654
- */
8655
-
8656
- class __ZikoUISlider__ extends ZikoUISection{
8657
- constructor(){
8658
- super("section","");
8659
- Object.assign(this.cache,{
8660
- currentIndex : 0,
8661
- slideBuilder : null,
8662
- });
8663
- this.container = Flex().size("100%","100%").vertical(0,0).style({
8664
- // width:"100%",
8665
- overflow:"hidden"
8666
- });
8667
- // this.style({
8668
- // // width:"100%",
8669
- // overflow:"hidden"
8670
- // });
8671
- this.container.setAttr({
8672
- ariaRoledescription : "carousel",
8673
- ariaLive: "polite",
8674
- ariaLabel : "Content Slider"
8675
- });
8676
- this.track = Section().size("100%","100%").style({
8677
- transition : "transform 0.3s ease-in-out",
8678
- });
8679
- this.bullets = Flex().style({
8680
- // position : "absolute",
8681
- // top : 0,
8682
- gap : "10px",
8683
- padding:"10px",
8684
- });
8685
- this.container.append(
8686
- this.track,
8687
- this.bullets
8688
- );
8689
- this.append(this.container);
8690
- }
8691
- #updateAriaHidden(){
8692
- for(let i=0;i<this.track.items.length;i++){
8693
- this.track[i].setAttr({
8694
- ariaHidden : (i!==this.cache.currentIndex)
8695
- });
8696
- }
8697
- }
8698
- goto(n = 0){
8699
- this.cache.currentIndex = n;
8700
- this.__updatePos();
8701
- this.#updateAriaHidden();
8702
- }
8703
- next(n = 1){
8704
- this.cache.currentIndex += n;
8705
- this.__updatePos();
8706
- this.#updateAriaHidden();
8707
- return this;
8708
- }
8709
- previous(n = 1){
8710
- this.cache.currentIndex -= n;
8711
- this.__updatePos();
8712
- this.#updateAriaHidden();
8713
- return this;
8714
- }
8715
- #update(){
8716
- const length = this.track.items.length;
8717
- for(let i=0;i<length;i++){
8718
- this.track.items[i].setAttr({
8719
- ariaLabel : `Slide ${i+1} of ${length}`,
8720
- dataSlideIndex : i
8721
- });
8722
- this.bullets.items[i].setAttr({
8723
- dataIndex : i,
8724
- ariaLabel : `Go to slide ${i}`
8725
- });
8726
- this.bullets[i].events.click?.destroy();
8727
- this.bullets[i].onClick(()=>this.goto(i));
8728
- }
8729
- }
8730
- #addSlide(UIElement){
8731
- this.track.append(this.cache.slideBuilder(UIElement).setAttr({
8732
- ariaRoledescription : "slide",
8733
- role : "group",
8734
- ariaLabel : "" // link to update
8735
- }));
8736
- const bullet = text$1().size("15px","15px").style({
8737
- borderRadius:"50%",
8738
- cursor : "pointer",
8739
- border : "3px solid blue",
8740
- background : "white"
8741
- }).setAttr({
8742
- role : "button",
8743
- tabIndex : 0
8744
- })
8745
- .onPtrEnter(e=>e.target.st.background("gold").scale(1.2,1.2))
8746
- .onPtrLeave(e=>e.target.st.background("white").scale(1,1));
8747
- this.bullets.append(
8748
- bullet
8749
- );
8750
- return this;
8751
- }
8752
- addSlides(...slides){
8753
- slides.forEach(n=>this.#addSlide(n));
8754
- this.#update();
8755
- this.#updateAriaHidden();
8756
- return this;
8757
- }
8758
- }
8759
-
8760
- class ZikoUIHorizontalSlider extends __ZikoUISlider__{
8761
- constructor(...slides){
8762
- super("section","hSlider");
8763
- this.container.vertical(0,0);
8764
- Object.assign(this.cache,{
8765
- slideBuilder : (UIElement) => Flex(UIElement).style({
8766
- minWidth : "100%",
8767
- width:"100%",
8768
- height:"100%",
8769
- }).vertical(0,0)
8770
- });
8771
- this.track.size("100%","90%").style({
8772
- display : "flex"
8773
- });
8774
- this.addSlides(...slides);
8775
- this.bullets.horizontal(0,0).style({
8776
- width : "100%",
8777
- height : "10%",
8778
- });
8779
- }
8780
- __updatePos(){
8781
- const width = this.container.width;
8782
- this.track.st.translateX(-this.cache.currentIndex * width);
8783
- }
8784
-
8785
- }
8786
-
8787
- const hSlider=(...slides)=>new ZikoUIHorizontalSlider(...slides);
8788
-
8789
- class ZikoUIVerticalSlider extends __ZikoUISlider__{
8790
- constructor(...slides){
8791
- super("section","vSlider");
8792
- Object.assign(this.cache,{
8793
- slideBuilder : (UIElement) => Flex(UIElement).size("100%","100%").vertical(0, 0)
8794
- });
8795
- this.addSlides(...slides);
8796
- this.container.horizontal(0,0);
8797
- this.track.size("90%","100%");
8798
- this.bullets.vertical(0,0).style({
8799
- height : "100%",
8800
- width : "10%"
8801
- });
8802
- }
8803
- __updatePos(){
8804
- const height = this.container.height;
8805
- this.track.st.translateY(-this.cache.currentIndex * height);
8806
- }
8807
- }
8808
-
8809
- const vSlider=(...slides)=>new ZikoUIVerticalSlider(...slides);
8810
-
8811
- const Slider = ({orintation = "horizontal",slides = []}) =>{
8812
- if(["v","vertical"].includes(orintation.toLowerCase())) return vSlider(...slides);
8813
- else if(["h","horizontal"].includes(orintation.toLowerCase())) return hSlider(...slides);
8814
- else ;
8815
- };
8816
-
8817
- var Derived = /*#__PURE__*/Object.freeze({
8818
- __proto__: null,
8819
- Accordion: Accordion,
8820
- Breadcrumbs: Breadcrumbs,
8821
- Carousel: Carousel,
8822
- CodeCell: CodeCell,
8823
- CodeNote: CodeNote,
8824
- Collapsible: Collapsible,
8825
- Flex: Flex$1,
8826
- Grid: Grid$1,
8827
- Modal: Modal,
8828
- Slider: Slider,
8829
- Splitter: Splitter,
8830
- Tabs: Tabs,
8831
- ZikoUIAccordion: ZikoUIAccordion,
8832
- ZikoUIBreadcrumbs: ZikoUIBreadcrumbs,
8833
- ZikoUICodeNote: ZikoUICodeNote,
8834
- ZikoUIFlex: ZikoUIFlex$1,
8835
- ZikoUIGrid: ZikoUIGrid,
8836
- ZikoUIHorizontalSlider: ZikoUIHorizontalSlider,
8837
- ZikoUIHorizontalSplitter: ZikoUIHorizontalSplitter,
8838
- ZikoUIMenu3d: ZikoUIMenu3d,
8839
- ZikoUIModal: ZikoUIModal,
8840
- ZikoUIVerticalSlider: ZikoUIVerticalSlider,
8841
- ZikoUIVerticalSplitter: ZikoUIVerticalSplitter,
8842
- dangerAlert: dangerAlert,
8843
- hSlider: hSlider,
8844
- hSplitter: hSplitter,
8845
- infoAlert: infoAlert,
8846
- menu3d: menu3d,
8847
- successAlert: successAlert,
8848
- vSlider: vSlider,
8849
- vSplitter: vSplitter,
8850
- warningAlert: warningAlert
8851
- });
8852
-
8853
- const UI$1 = {
8854
- ...Text$1,
8855
- ...List,
8856
- ...Io,
8857
- ...Media,
8858
- ...Table,
8859
- ...Semantic,
8860
- ...Misc,
8861
- ...Derived,
8862
- ZikoUIElement,
8863
- ZikoUIContainerElement
8864
- };
6883
+ const UI$1 = {
6884
+ ...Text$1,
6885
+ ...List,
6886
+ ...Io,
6887
+ ...Media,
6888
+ ...Table,
6889
+ ...Semantic,
6890
+ ...Misc,
6891
+ ...Flex$1,
6892
+ ...Grid$2,
6893
+ ZikoUIElement,
6894
+ };
8865
6895
 
8866
6896
  const svg2str=svg=>(new XMLSerializer()).serializeToString(svg);
8867
6897
  const svg2ascii=svg=>btoa(svg2str(svg));
@@ -9007,9 +7037,11 @@ function trimKeys(obj) {
9007
7037
  }, Array.isArray(obj) ? [] : {});
9008
7038
  }
9009
7039
 
7040
+ // export { markdown2html } from "./markdown.js";
7041
+ // export { adoc2html } from "./adoc.js";
7042
+
9010
7043
  var Converter = /*#__PURE__*/Object.freeze({
9011
7044
  __proto__: null,
9012
- adoc2html: adoc2html,
9013
7045
  arr2str: arr2str,
9014
7046
  csv2arr: csv2arr,
9015
7047
  csv2json: csv2json,
@@ -9024,7 +7056,6 @@ var Converter = /*#__PURE__*/Object.freeze({
9024
7056
  json2xmlFile: json2xmlFile,
9025
7057
  json2yml: json2yml,
9026
7058
  json2ymlFile: json2ymlFile,
9027
- markdown2html: markdown2html,
9028
7059
  obj2str: obj2str,
9029
7060
  svg2ascii: svg2ascii,
9030
7061
  svg2img: svg2img,
@@ -10397,7 +8428,7 @@ const Math$1 = {
10397
8428
  ...__Calculus__,
10398
8429
  };
10399
8430
 
10400
- class ZikoUISvg extends ZikoUIContainerElement {
8431
+ class ZikoUISvg extends ZikoUIElement {
10401
8432
  constructor(w=360,h=300) {
10402
8433
  super("svg","svg");
10403
8434
  //this.cache={};
@@ -10462,439 +8493,14 @@ class ZikoUISvg extends ZikoUIContainerElement {
10462
8493
 
10463
8494
  const Svg =(w,h)=>new ZikoUISvg(w,h);
10464
8495
 
10465
- class ZikoSvgElement extends ZikoUIElement{
10466
- constructor(type) {
10467
- super();
10468
- Object.assign(this.cache,{
10469
- type
10470
- });
10471
- }
10472
- pos(x,y){
10473
- return this.posX(x).posY(y);
10474
- }
10475
- posX(x){
10476
- if(["circle","ellipse"].includes(this.cache.type))this.element.cx.baseVal.value=x;
10477
- else this.element.x.baseVal.value=x;
10478
- return this;
10479
- }
10480
- posY(y){
10481
- if(["circle","ellipse"].includes(this.cache.type))this.element.cy.baseVal.value=y;
10482
- else this.element.y.baseVal.value=y;
10483
- return this;
10484
- }
10485
- translate(x,y){
10486
- return this;
10487
- }
10488
- color({ stroke, fill }) {
10489
- this.element?.setAttribute("stroke", stroke);
10490
- this.element?.setAttribute("fill", fill);
10491
- return this;
10492
- }
10493
- fill(color = "none") {
10494
- this.element?.setAttribute("fill", color);
10495
- return this;
10496
- }
10497
- stroke(color = "none", width) {
10498
- this.element?.setAttribute("stroke", color);
10499
- width && this.strokeWidth(width);
10500
- return this;
10501
- }
10502
- strokeWidth(width = 1) {
10503
- this.element?.setAttribute("stroke-width", width);
10504
- return this;
10505
- }
10506
- opacity(value = 1) {
10507
- this.element?.setAttribute("opacity", value);
10508
- return this;
10509
- }
10510
- }
10511
-
10512
- class ZikoSvgCircle extends ZikoSvgElement{
10513
- constructor(cx,cy,r){
10514
- super("circle");
10515
- this.element=document.createElementNS(
10516
- "http://www.w3.org/2000/svg",
10517
- "circle",
10518
- );
10519
- this.pos(cx,cy).setR(r);
10520
- }
10521
- setR(r){
10522
- this.element.r.baseVal.value=r;
10523
- return this;
10524
- }
10525
- get r(){
10526
- return this.element.baseVal.value;
10527
- }
10528
- get cx(){
10529
- return this.element.baseVal.value;
10530
- }
10531
- get cy(){
10532
- return this.element.baseVal.value;
10533
- }
10534
- }
10535
- const svgCircle=(x,y,r)=>new ZikoSvgCircle(x,y,r);
10536
-
10537
- class ZikoSvgEllipse extends ZikoSvgElement{
10538
- constructor(cx,cy,rx,ry){
10539
- super("ellipse");
10540
- this.element=document?.createElementNS(
10541
- "http://www.w3.org/2000/svg",
10542
- "ellipse",
10543
- );
10544
- this.pos(cx,cy).setRx(rx).setRy(ry);
10545
- }
10546
- setRx(rx){
10547
- this.element.rx.baseVal.value=rx;
10548
- return this;
10549
- }
10550
- setRy(ry){
10551
- this.element.ry.baseVal.value=ry;
10552
- return this;
10553
- }
10554
- }
10555
- const svgEllipse=(x,y,rx,ry)=>new ZikoSvgEllipse(x,y,rx,ry);
10556
-
10557
- class ZikoSvgForeignObject extends ZikoSvgElement{
10558
- constructor(x=0,y=0,w="100%",h="100%",...ZikoUIElement){
10559
- super("foreignObject");
10560
- this.items=[];
10561
- this.element=document?.createElementNS(
10562
- "http://www.w3.org/2000/svg",
10563
- "foreignObject",
10564
- );
10565
- this.container=Flex$1().setTarget(this.element).vertical(0,0).size("auto","auto");
10566
- this.container.st.scaleY(-1);
10567
- this.posX(x).posY(y).width(w).height(h);
10568
- }
10569
- width(w){
10570
- this.element.etAttribute("width",w);
10571
- return this;
10572
- }
10573
- height(h){
10574
- this.element.etAttribute("height",h);
10575
- return this;
10576
- }
10577
- add(...ZikoUIElement){
10578
- this.container.append(...ZikoUIElement);
10579
- return this;
10580
- }
10581
- remove(...ZikoUIElement){
10582
- this.container.append(...ZikoUIElement);
10583
- return this;
10584
- }
10585
- }
10586
- const svgObject=(x, y, w, h)=>new ZikoSvgForeignObject(x, y, w, h);
10587
-
10588
- class ZikoSvgGroupe extends ZikoSvgElement{
10589
- constructor(...svgElement){
10590
- super();
10591
- this.items=[];
10592
- this.element=document?.createElementNS(
10593
- "http://www.w3.org/2000/svg",
10594
- "g",
10595
- );
10596
- this.add(...svgElement);
10597
- }
10598
- add(...svgElement){
10599
- for(let i=0;i<svgElement.length;i++){
10600
- this.element?.appendChild(svgElement[i].element);
10601
- this.items.push(svgElement[i]);
10602
- }
10603
- if(svgElement.length===1)return svgElement[0]
10604
- return svgElement;
10605
- }
10606
- remove(...svgElement){
10607
- for(let i=0;i<svgElement.length;i++){
10608
- this.element?.removeChild(svgElement[i].element);
10609
- this.items=this.items.filter(n=>n!=svgElement);
10610
- }
10611
- return this;
10612
- }
10613
- }
10614
- const svgGroupe=(...svgElement)=>new ZikoSvgGroupe(...svgElement);
10615
-
10616
- class ZikoSvgImage extends ZikoSvgElement{
10617
- constructor(src="",w="100%",h="100%",x=0,y=0){
10618
- super();
10619
- this.element=document?.createElementNS(
10620
- "http://www.w3.org/2000/svg",
10621
- "image",
10622
- );
10623
- this.setSrc(src).width(w).height(h).x(x).y(y);
10624
- }
10625
- x(x){
10626
- this.element.x.baseVal.value=x;
10627
- return this;
10628
- }
10629
- y(y){
10630
- this.element.y.baseVal.value=y;
10631
- return this;
10632
- }
10633
- width(w){
10634
- this.element?.setAttribute("width",w);
10635
- return this;
10636
- }
10637
- height(h){
10638
- this.element?.setAttribute("height",h);
10639
- return this;
10640
- }
10641
- setSrc(src=""){
10642
- this.element?.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', src);
10643
- return this;
10644
- }
10645
- }
10646
- const svgImage=(src,w,h,x,y)=>new ZikoSvgImage(src,w,h,x,y);
10647
-
10648
- class ZikoSvgLine extends ZikoSvgElement{
10649
- constructor(x1,y1,x2,y2){
10650
- super();
10651
- this.element=document?.createElementNS(
10652
- "http://www.w3.org/2000/svg",
10653
- "line",
10654
- );
10655
- this.x1(x1).y1(y1).x2(x2).y2(y2).stroke("black");
10656
- }
10657
- x1(x1){
10658
- this.element.x1.baseVal.value=x1;
10659
- return this;
10660
- }
10661
- y1(y1){
10662
- this.element.y1.baseVal.value=y1;
10663
- return this;
10664
- }
10665
- x2(x2){
10666
- this.element.x2.baseVal.value=x2;
10667
- return this;
10668
- }
10669
- y2(y2){
10670
- this.element.y2.baseVal.value=y2;
10671
- return this;
10672
- }
10673
- }
10674
- const svgLine=(x1,y1,x2,y2)=>new ZikoSvgLine(x1,y1,x2,y2);
10675
-
10676
- class ZikoSvgLink extends ZikoSvgElement{
10677
- constructor(href,...svgElement){
10678
- super();
10679
- this.items=[];
10680
- this.element=document?.createElementNS(
10681
- "http://www.w3.org/2000/svg",
10682
- "a",
10683
- );
10684
- this.element.etAttribute("href",href);
10685
- this.add(...svgElement);
10686
- }
10687
- add(...svgElement){
10688
- for(let i=0;i<svgElement.length;i++){
10689
- this.element.ppendChild(svgElement[i].element);
10690
- this.items.push(svgElement[i]);
10691
- }
10692
- if(svgElement.length===1)return svgElement[0]
10693
- return svgElement;
10694
- }
10695
- remove(...svgElement){
10696
- for(let i=0;i<svgElement.length;i++){
10697
- this.element.moveChild(svgElement[i].element);
10698
- this.items=this.items.filter(n=>n!=svgElement);
10699
- }
10700
- return this;
10701
- }
10702
- }
10703
- const svgLink=(href,...svgElement)=>new ZikoSvgLink(href,...svgElement);
10704
-
10705
- class ZikoSvgPath extends ZikoSvgElement{
10706
- constructor(){
10707
- super();
10708
- this.element=document?.createElementNS(
10709
- "http://www.w3.org/2000/svg",
10710
- "path",
10711
- );
10712
- this.path="";
10713
-
10714
- }
10715
- setPath(){
10716
- this.element.etAttribute("d",this.path);
10717
- return this;
10718
- }
10719
- clear(){
10720
- this.path="";
10721
- this.setPath();
10722
- return this;
10723
- }
10724
- moveTo(x,y){
10725
- this.path+=`M${x} ${y} `;
10726
- this.setPath();
10727
- return this;
10728
- }
10729
- lineTo(x,y){
10730
- this.path+=`L${x} ${y} `;
10731
- this.setPath();
10732
- return this;
10733
- }
10734
- hr(x){
10735
- this.path+=`H${x} `;
10736
- this.setPath();
10737
- return this;
10738
- }
10739
- vr(y){
10740
- this.path+=`V${y} `;
10741
- this.setPath();
10742
- return this;
10743
- }
10744
- bezier(x1,y1,x2,y2,x,y){
10745
- this.path+=`C ${x1} ${y1},${x2} ${y2},${x} ${y} `;
10746
- this.setPath();
10747
- return this;
10748
- }
10749
- quadratic(x1,y1,x,y){
10750
- this.path+=`Q ${x1} ${y1} ${x} ${y} `;
10751
- this.setPath();
10752
- return this;
10753
- }
10754
- close(){
10755
- this.path+="Z";
10756
- this.setPath();
10757
- return this;
10758
- }
10759
- }
10760
-
10761
- const svgPath=()=>new ZikoSvgPath();
10762
-
10763
- class ZikoSvgPolygon extends ZikoSvgElement{
10764
- constructor(X=[],Y=[]){
10765
- super();
10766
- this.X=X;
10767
- this.Y=Y;
10768
- this.element=document?.createElementNS(
10769
- "http://www.w3.org/2000/svg",
10770
- "polygon",
10771
- );
10772
- this.element?.setAttribute("points","");
10773
- this.addPoints(X,Y);
10774
- }
10775
- addPoint(x,y){
10776
- let p=this.element.parentElement.createSVGPoint();
10777
- p.x=x;
10778
- p.y=y;
10779
- this.element.points.appendItem(p);
10780
- return this;
10781
- }
10782
- addPoints(X,Y){
10783
- for(let i=0;i<X.length;i++){
10784
- let p=this.element.parentElement.createSVGPoint();
10785
- p.x=X[i];
10786
- p.y=Y[i];
10787
- this.element.oints.appendItem(p);
10788
- }
10789
- return this;
10790
- }
10791
- }
10792
- const svgPolygon=(X,Y)=>new ZikoSvgPolygon(X,Y);
10793
-
10794
- class ZikoSvgRectangle extends ZikoSvgElement{
10795
- constructor(x,y,w,h,center=true){
10796
- super();
10797
- this.element=document?.createElementNS(
10798
- "http://www.w3.org/2000/svg",
10799
- "rect",
10800
- );
10801
- this.setX(x).setY(y).width(w).height(h);
10802
- this.rx=this.x+this.w/2;
10803
- this.ty=this.y+this.h/2;
10804
- }
10805
- setX(x){
10806
- this.element.x.baseVal.value=x;
10807
- this.x=x;
10808
- return this;
10809
- }
10810
- setY(y){
10811
- this.element.y.baseVal.value=y;
10812
- this.y=y;
10813
- return this;
10814
- }
10815
- r(rx,ry){
10816
- this.rx=rx;
10817
- this.ry=ry;
10818
- this.setX(this.rx-this.w/2);
10819
- this.setY(this.ry-this.h/2);
10820
- return this;
10821
- }
10822
- width(w){
10823
- this.element.width.baseVal.value=w;
10824
- this.w=w;
10825
- return this;
10826
- }
10827
- height(h){
10828
- this.element.height.baseVal.value=h;
10829
- this.h=h;
10830
- return this;
10831
- }
10832
- }
10833
- const svgRect=(x,y,w,h,center)=>new ZikoSvgRectangle(x,y,w,h,center);
10834
-
10835
- class ZikoSvgText extends ZikoSvgElement{
10836
- constructor(text,x,y){
10837
- super();
10838
- this.element=document?.createElementNS(
10839
- "http://www.w3.org/2000/svg",
10840
- "text",
10841
- );
10842
- this.setText(text);
10843
- this.x(x).y(y);
10844
- }
10845
- x(x){
10846
- this.element?.setAttribute("x",x);
10847
- return this;
10848
- }
10849
- y(y){
10850
- this.element?.setAttribute("y",y);
10851
- return this;
10852
- }
10853
- setText(text=""){
10854
- this.element.textContent=text;
10855
- return this;
10856
- }
10857
- }
10858
- const svgText=(text,x,y)=>new ZikoSvgText(text,x,y);
10859
-
10860
- const svgGrid=(w,h,r=10,c=10)=>{
10861
- let path=svgPath().fill("none").stroke("coral").strokeWidth(0.6);
10862
- console.log({x:w/r,y:h/c});
10863
- for(let i=0;i<w;i++) path.moveTo(0,i*w/r).hr(w);
10864
- for(let j=0;j<h;j++) path.moveTo(j*h/c,0).vr(h);
10865
- return path
10866
- };
10867
-
10868
8496
  var SVG = /*#__PURE__*/Object.freeze({
10869
8497
  __proto__: null,
10870
8498
  Svg: Svg,
10871
- ZikoSvgCircle: ZikoSvgCircle,
10872
- ZikoSvgEllipse: ZikoSvgEllipse,
10873
- ZikoSvgForeignObject: ZikoSvgForeignObject,
10874
- ZikoSvgGroupe: ZikoSvgGroupe,
10875
- ZikoSvgImage: ZikoSvgImage,
10876
- ZikoSvgLine: ZikoSvgLine,
10877
- ZikoSvgLink: ZikoSvgLink,
10878
- ZikoSvgPath: ZikoSvgPath,
10879
- ZikoSvgRectangle: ZikoSvgRectangle,
10880
- ZikoSvgText: ZikoSvgText,
10881
- ZikoUISvg: ZikoUISvg,
10882
- svgCircle: svgCircle,
10883
- svgEllipse: svgEllipse,
10884
- svgGrid: svgGrid,
10885
- svgGroupe: svgGroupe,
10886
- svgImage: svgImage,
10887
- svgLine: svgLine,
10888
- svgLink: svgLink,
10889
- svgObject: svgObject,
10890
- svgPath: svgPath,
10891
- svgPolygon: svgPolygon,
10892
- svgRect: svgRect,
10893
- svgText: svgText
8499
+ ZikoUISvg: ZikoUISvg
10894
8500
  });
10895
8501
 
10896
8502
  // import { convolute } from "../../math/signal/conv.js";
10897
- class ZikoUICanvas extends ZikoUIContainerElement{
8503
+ class ZikoUICanvas extends ZikoUIElement{
10898
8504
  constructor(w,h){
10899
8505
  super("canvas","canvas");
10900
8506
  this.ctx = this.element?.getContext("2d");
@@ -11064,288 +8670,10 @@ class ZikoUICanvas extends ZikoUIContainerElement{
11064
8670
 
11065
8671
  const Canvas=(w,h)=>new ZikoUICanvas(w,h);
11066
8672
 
11067
- class ZikoCanvasElement{
11068
- constructor(x,y){
11069
- this.parent=null;
11070
- this.position={
11071
- x,
11072
- y
11073
- };
11074
- this.cache={
11075
- interact:null/*avoid redraw*/,
11076
- config:{
11077
- draggable:false,
11078
- selected:false,
11079
- highlighted:false,
11080
- rendered:false
11081
- },
11082
- style:{
11083
- normal:{
11084
- strokeEnabled:true,
11085
- fillEnabled:false,
11086
- strokeColor:"#111111",
11087
- fillColor:"#777777",
11088
- },
11089
- highlighted:{
11090
- strokeEnabled:true,
11091
- fillEnabled:false,
11092
- strokeColor:null,
11093
- fillColor:null,
11094
- }
11095
- },
11096
- };
11097
- this.history={
11098
- position:[],
11099
- styles:[]
11100
- };
11101
- this.render();
11102
- }
11103
- get px(){
11104
- //_x=====>px
11105
- return (this.position.x??0)+(this.parent?.position?.x??0);
11106
- }
11107
- get py(){
11108
- //_y=====>py
11109
- return (this.position.y??0)+(this.parent?.position?.y??0);
11110
- }
11111
- isIntersectedWith(){
11112
-
11113
- }
11114
- isInStroke(x,y){
11115
- let is;
11116
- if(this.parent){
11117
- this.parent.ctx.setTransform(1,0,0,1,0,0);
11118
- is=this.parent.ctx.isPointInStroke(this.path,x,y);
11119
- this.parent.applyTransformMatrix();
11120
- }
11121
- return is;
11122
- }
11123
- isInPath(x,y){
11124
- let is;
11125
- if(this.parent){
11126
- this.parent.ctx.setTransform(1,0,0,1,0,0);
11127
- is=this.parent.ctx.isPointInPath(this.path,x,y);
11128
- this.parent.applyTransformMatrix();
11129
- }
11130
- return is;
11131
- }
11132
- posX(x){
11133
- this.position.x=x;
11134
- if(this.parent)this.parent.draw();
11135
- return this;
11136
- }
11137
- posY(y){
11138
- this.position.y=y;
11139
- if(this.parent)this.parent.draw();
11140
- return this;
11141
- }
11142
- color({stroke=this.cache.style.normal.strokeColor,fill=this.cache.style.normal.fillColor}={stroke,fill}){
11143
- this.cache.style.normal.strokeColor=stroke;
11144
- this.cache.style.normal.fillColor=fill;
11145
- if(this.parent)this.parent.draw();
11146
- return this;
11147
- }
11148
- translate(dx=0,dy=0){
11149
- this.position.x+=dx;
11150
- this.position.y+=dy;
11151
- if(this.parent)this.parent.draw();
11152
- return;
11153
- }
11154
- applyNormalStyle(ctx){
11155
- ctx.strokeStyle=this.cache.style.normal.strokeColor;
11156
- ctx.fillStyle=this.cache.style.normal.fillColor;
11157
- return this;
11158
- }
11159
- applyHighlightedStyle(ctx){
11160
- ctx.strokeStyle=this.cache.style.highlighted.strokeColor;
11161
- ctx.fillStyle=this.cache.style.highlighted.fillColor;
11162
- return this;
11163
- }
11164
- stroke(color=this.cache.style.normal.strokeColor,enabled=true){
11165
- this.cache.style.normal.strokeEnabled=enabled;
11166
- this.cache.style.normal.strokeColor=color;
11167
- if(this.parent)this.parent.draw();
11168
- return this
11169
- }
11170
- fill(color=this.cache.style.normal.fillColor,enabled=true){
11171
- this.cache.style.normal.fillEnabled=enabled;
11172
- this.cache.style.normal.filleColor=color;
11173
- if(this.parent)this.parent.draw();
11174
- return this;
11175
- }
11176
- render(render=true){
11177
- this.cache.config.rendered=render;
11178
- return this;
11179
- }
11180
- }
11181
-
11182
- class CanvasArc extends ZikoCanvasElement{
11183
- constructor(x,y,r,angle){
11184
- super(x,y);
11185
- this.r=r;
11186
- this.angle=angle;
11187
- this.path=null;
11188
- }
11189
- draw(ctx){
11190
- if(this.cache.config.rendered){
11191
- ctx.save();
11192
- this.applyNormalStyle(ctx);
11193
- ctx.beginPath();
11194
- this.path=new Path2D();
11195
- this.path.arc(this.px, this.py, this.r, 0, this.angle);
11196
- const{strokeEnabled,fillEnabled}=this.cache.style.normal;
11197
- if(strokeEnabled)ctx.stroke(this.path);
11198
- if(fillEnabled)ctx.fill(this.path);
11199
- ctx.closePath();
11200
- ctx.restore();
11201
- }
11202
- return this;
11203
- }
11204
- radius(r){
11205
- this.r=r;
11206
- if(this.parent)this.parent.draw();
11207
- return this;
11208
- }
11209
- // distanceFromCenter(x,y){
11210
- // return Math.sqrt(
11211
- // (this._x-x)**2-(this._y-y)**2
11212
- // )
11213
- // }
11214
- // isIn(x,y,strict=false){
11215
- // return strict?this.distanceFromCenter(x,y)<this.r:this.distanceFromCenter(x,y)<=this.r;
11216
- // }
11217
- // isInEdges(x,y){
11218
- // return this.distanceFromCenter(x,y)===this.r;
11219
- // }
11220
- }
11221
- const canvasArc=(x,y,r,phi)=>new CanvasArc(x,y,r,phi);
11222
- const canvasCircle=(x,y,r)=>new CanvasArc(x,y,r,2*Math.PI);
11223
-
11224
- class CanvasPoints extends ZikoCanvasElement{
11225
- constructor(ptsX,ptsY){
11226
- super();
11227
- this.pointsMatrix=null;
11228
- this.path=new Path2D();
11229
- this.fromXY(ptsX,ptsY);
11230
- }
11231
- get points(){
11232
- return this.pointsMatrix.T.arr;
11233
- }
11234
- draw(ctx){
11235
- if(this.cache.config.rendered){
11236
- ctx.save();
11237
- this.applyNormalStyle(ctx);
11238
- ctx.beginPath();
11239
- this.path.moveTo(this.points[1][0]+this._x,this.points[1][1]+this._y);
11240
- for(let i=1;i<this.points.length;i++){
11241
- this.path.lineTo(this.points[i][0]+this._x,this.points[i][1]+this._y);
11242
- }
11243
- ctx.stroke(this.path);
11244
- ctx.restore();
11245
- }
11246
- return this;
11247
- }
11248
- fromXY(X,Y){
11249
- this.pointsMatrix=matrix([X,Y]);
11250
- return this;
11251
- }
11252
- push(ptsX,ptsY){
11253
- this.pointsMatrix.hstack(matrix([ptsX,ptsY]));
11254
- if(this.parent)this.parent.draw();
11255
- return this;
11256
- }
11257
- isIn(x,y){
11258
- let is;
11259
- if(this.parent){
11260
- this.parent.ctx.setTransform(1,0,0,1,0,0);
11261
- is=this.parent.ctx.isPointInPath(this.path,x,y);
11262
- this.parent.applyTransformMatrix();
11263
- }
11264
- return is;
11265
- }
11266
- }
11267
-
11268
- const canvasPoints=(ptsX=[],ptsY=[])=>new CanvasPoints(ptsX,ptsY);
11269
-
11270
- class CanvasLine extends ZikoCanvasElement{
11271
- constructor(x0,y0,x1,y1){
11272
- super();
11273
- this.x0=x0;
11274
- this.x1=x1;
11275
- this.y0=y0;
11276
- this.y1=y1;
11277
- delete this.fill;
11278
- }
11279
- draw(ctx){
11280
- if(this.cache.config.rendered){
11281
- ctx.save();
11282
- this.applyNormalStyle(ctx);
11283
- ctx.beginPath();
11284
- ctx.moveTo(this.x0+this._x,this.y0+this._y_);
11285
- ctx.lineTo(this.x1+this._x,this.y1+this._y);
11286
- ctx.stroke();
11287
- if(this.cache.style.normal.strokeEnabled)ctx.stroke();
11288
- ctx.restore();
11289
- }
11290
- return this;
11291
- }
11292
- }
11293
- const canvasLine=(x0,y0,x1,y1)=>new CanvasLine(x0,y0,x1,y1);
11294
-
11295
- class CanvasRect extends ZikoCanvasElement{
11296
- constructor(x,y,w,h){
11297
- super(x,y);
11298
- this.w=w;
11299
- this.h=h;
11300
- this.path=new Path2D();
11301
- }
11302
- draw(ctx){
11303
- if(this.cache.config.rendered){
11304
- ctx.save();
11305
- this.applyNormalStyle(ctx);
11306
- ctx.beginPath();
11307
- this.path.rect(this.px, this.py,this.w,this.h);
11308
- const{strokeEnabled,fillEnabled}=this.cache.style.normal;
11309
- if(strokeEnabled)ctx.stroke(this.path);
11310
- if(fillEnabled)ctx.fill(this.path);
11311
- ctx.closePath();
11312
- ctx.restore();
11313
- }
11314
- return this;
11315
- }
11316
- width(w){
11317
- this.w=w;
11318
- if(this.parent)this.parent.draw();
11319
- return this;
11320
- }
11321
- height(h){
11322
- this.h=h;
11323
- if(this.parent)this.parent.draw();
11324
- return this;
11325
- }
11326
- // distanceFromCenter(x,y){
11327
- // return Math.sqrt(
11328
- // (this.position.x-x)**2-(this.position.y-y)**2
11329
- // )
11330
- // }
11331
- // isIn(x,y,strict=false){
11332
- // return strict?this.distanceFromCenter(x,y)<this.r:this.distanceFromCenter(x,y)<=this.r;
11333
- // }
11334
- // isInEdges(x,y){
11335
- // return this.distanceFromCenter(x,y)===this.r;
11336
- // }
11337
- }
11338
- const canvasRect=(x,y,w,h)=>new CanvasRect(x,y,w,h);
11339
-
11340
8673
  var CANVAS = /*#__PURE__*/Object.freeze({
11341
8674
  __proto__: null,
11342
8675
  Canvas: Canvas,
11343
- ZikoUICanvas: ZikoUICanvas,
11344
- canvasArc: canvasArc,
11345
- canvasCircle: canvasCircle,
11346
- canvasLine: canvasLine,
11347
- canvasPoints: canvasPoints,
11348
- canvasRect: canvasRect
8676
+ ZikoUICanvas: ZikoUICanvas
11349
8677
  });
11350
8678
 
11351
8679
  const Graphics = {
@@ -11650,7 +8978,7 @@ class ZikoSPA extends ZikoApp{
11650
8978
  constructor({head, wrapper, target, routes}){
11651
8979
  super({head, wrapper, target});
11652
8980
  this.routes=new Map([
11653
- ["404",text$1("Error 404")],
8981
+ ["404",text("Error 404")],
11654
8982
  ...Object.entries(routes)
11655
8983
  ]);
11656
8984
  this.clear();
@@ -11730,6 +9058,7 @@ function defineParamsGetter(target ){
11730
9058
  }
11731
9059
 
11732
9060
  const __UI__={};
9061
+ const __HYDRATION_MAP__ = new Map();
11733
9062
  const __Config__={
11734
9063
  default:{
11735
9064
  target:null,
@@ -11743,12 +9072,15 @@ const __Config__={
11743
9072
  const values=Object.values(pairs);
11744
9073
  for(let i=0;i<keys.length;i++)this.default[keys[i]]=values[i];
11745
9074
  },
11746
- init:()=>document.documentElement.setAttribute("data-engine","zikojs")
9075
+ init:()=>document.documentElement.setAttribute("data-engine","zikojs"),
9076
+ renderingMode :"spa",
9077
+ isSSC : false,
11747
9078
  };
11748
9079
 
11749
9080
  var Global = /*#__PURE__*/Object.freeze({
11750
9081
  __proto__: null,
11751
9082
  __Config__: __Config__,
9083
+ __HYDRATION_MAP__: __HYDRATION_MAP__,
11752
9084
  __UI__: __UI__
11753
9085
  });
11754
9086
 
@@ -11848,6 +9180,7 @@ if ( globalThis.__Ziko__ ) {
11848
9180
  globalThis.__Ziko__={
11849
9181
  ...Ziko,
11850
9182
  __UI__,
9183
+ __HYDRATION_MAP__,
11851
9184
  __Config__,
11852
9185
  ExtractAll,
11853
9186
  RemoveAll
@@ -11882,24 +9215,18 @@ function RemoveAll(){
11882
9215
  Data.RemoveAll();
11883
9216
  }
11884
9217
 
11885
- exports.Accordion = Accordion;
11886
9218
  exports.App = App$1;
11887
9219
  exports.Article = Article;
11888
9220
  exports.Aside = Aside;
11889
9221
  exports.Base = Base;
11890
- exports.Breadcrumbs = Breadcrumbs;
11891
9222
  exports.Canvas = Canvas;
11892
- exports.Carousel = Carousel;
11893
- exports.CodeCell = CodeCell;
11894
- exports.CodeNote = CodeNote;
11895
- exports.Collapsible = Collapsible;
11896
9223
  exports.Combinaison = Combinaison;
11897
9224
  exports.Complex = Complex;
11898
9225
  exports.E = E;
11899
9226
  exports.EPSILON = EPSILON;
11900
9227
  exports.Ease = Ease;
11901
9228
  exports.FileBasedRouting = FileBasedRouting;
11902
- exports.Flex = Flex$1;
9229
+ exports.Flex = Flex;
11903
9230
  exports.Footer = Footer;
11904
9231
  exports.Form = Form;
11905
9232
  exports.Grid = Grid$1;
@@ -11909,7 +9236,6 @@ exports.LinearSystem = LinearSystem;
11909
9236
  exports.Logic = Logic$1;
11910
9237
  exports.Main = Main;
11911
9238
  exports.Matrix = Matrix;
11912
- exports.Modal = Modal;
11913
9239
  exports.Nav = Nav;
11914
9240
  exports.PI = PI$1;
11915
9241
  exports.Permutation = Permutation;
@@ -11917,13 +9243,10 @@ exports.Random = Random;
11917
9243
  exports.SPA = SPA;
11918
9244
  exports.SVGWrapper = SVGWrapper;
11919
9245
  exports.Section = Section;
11920
- exports.Slider = Slider;
11921
- exports.Splitter = Splitter;
11922
9246
  exports.Str = Str;
11923
9247
  exports.Suspense = Suspense;
11924
9248
  exports.Svg = Svg;
11925
9249
  exports.Table = Table$1;
11926
- exports.Tabs = Tabs;
11927
9250
  exports.Utils = Utils$1;
11928
9251
  exports.ZikoApp = ZikoApp;
11929
9252
  exports.ZikoCustomEvent = ZikoCustomEvent;
@@ -11941,40 +9264,24 @@ exports.ZikoHead = ZikoHead$1;
11941
9264
  exports.ZikoJsonStyleSheet = ZikoJsonStyleSheet;
11942
9265
  exports.ZikoMutationObserver = ZikoMutationObserver;
11943
9266
  exports.ZikoSPA = ZikoSPA;
11944
- exports.ZikoSvgCircle = ZikoSvgCircle;
11945
- exports.ZikoSvgEllipse = ZikoSvgEllipse;
11946
- exports.ZikoSvgForeignObject = ZikoSvgForeignObject;
11947
- exports.ZikoSvgGroupe = ZikoSvgGroupe;
11948
- exports.ZikoSvgImage = ZikoSvgImage;
11949
- exports.ZikoSvgLine = ZikoSvgLine;
11950
- exports.ZikoSvgLink = ZikoSvgLink;
11951
- exports.ZikoSvgPath = ZikoSvgPath;
11952
- exports.ZikoSvgRectangle = ZikoSvgRectangle;
11953
- exports.ZikoSvgText = ZikoSvgText;
11954
9267
  exports.ZikoUIAbbrText = ZikoUIAbbrText;
11955
- exports.ZikoUIAccordion = ZikoUIAccordion;
11956
9268
  exports.ZikoUIArticle = ZikoUIArticle;
11957
9269
  exports.ZikoUIAside = ZikoUIAside;
11958
9270
  exports.ZikoUIAudio = ZikoUIAudio;
11959
9271
  exports.ZikoUIBlockQuote = ZikoUIBlockQuote;
11960
9272
  exports.ZikoUIBr = ZikoUIBr;
11961
- exports.ZikoUIBreadcrumbs = ZikoUIBreadcrumbs;
11962
9273
  exports.ZikoUICanvas = ZikoUICanvas;
11963
- exports.ZikoUICodeNote = ZikoUICodeNote;
11964
9274
  exports.ZikoUICodeText = ZikoUICodeText;
11965
- exports.ZikoUIContainerElement = ZikoUIContainerElement;
11966
9275
  exports.ZikoUIDefintion = ZikoUIDefintion;
11967
9276
  exports.ZikoUIElement = ZikoUIElement;
11968
9277
  exports.ZikoUIFigure = ZikoUIFigure;
11969
- exports.ZikoUIFlex = ZikoUIFlex$1;
9278
+ exports.ZikoUIFlex = ZikoUIFlex;
11970
9279
  exports.ZikoUIFooter = ZikoUIFooter;
11971
9280
  exports.ZikoUIForm = ZikoUIForm;
11972
9281
  exports.ZikoUIGrid = ZikoUIGrid;
11973
9282
  exports.ZikoUIHTMLWrapper = ZikoUIHTMLWrapper;
11974
9283
  exports.ZikoUIHeader = ZikoUIHeader;
11975
9284
  exports.ZikoUIHeading = ZikoUIHeading;
11976
- exports.ZikoUIHorizontalSlider = ZikoUIHorizontalSlider;
11977
- exports.ZikoUIHorizontalSplitter = ZikoUIHorizontalSplitter;
11978
9285
  exports.ZikoUIHr = ZikoUIHr;
11979
9286
  exports.ZikoUIHtmlTag = ZikoUIHtmlTag;
11980
9287
  exports.ZikoUIImage = ZikoUIImage;
@@ -11996,8 +9303,6 @@ exports.ZikoUIInputTime = ZikoUIInputTime;
11996
9303
  exports.ZikoUILabel = ZikoUILabel;
11997
9304
  exports.ZikoUILink = ZikoUILink;
11998
9305
  exports.ZikoUIMain = ZikoUIMain;
11999
- exports.ZikoUIMenu3d = ZikoUIMenu3d;
12000
- exports.ZikoUIModal = ZikoUIModal;
12001
9306
  exports.ZikoUINav = ZikoUINav;
12002
9307
  exports.ZikoUIParagraphe = ZikoUIParagraphe;
12003
9308
  exports.ZikoUIQuote = ZikoUIQuote;
@@ -12010,13 +9315,12 @@ exports.ZikoUISuspense = ZikoUISuspense;
12010
9315
  exports.ZikoUISvg = ZikoUISvg;
12011
9316
  exports.ZikoUIText = ZikoUIText;
12012
9317
  exports.ZikoUITextArea = ZikoUITextArea;
12013
- exports.ZikoUIVerticalSlider = ZikoUIVerticalSlider;
12014
- exports.ZikoUIVerticalSplitter = ZikoUIVerticalSplitter;
12015
9318
  exports.ZikoUIVideo = ZikoUIVideo;
12016
9319
  exports.ZikoUIXMLWrapper = ZikoUIXMLWrapper;
12017
9320
  exports.ZikoUseRoot = ZikoUseRoot;
12018
9321
  exports.ZikoUseStyle = ZikoUseStyle;
12019
9322
  exports.__Config__ = __Config__;
9323
+ exports.__HYDRATION_MAP__ = __HYDRATION_MAP__;
12020
9324
  exports.__UI__ = __UI__;
12021
9325
  exports.abbrText = abbrText;
12022
9326
  exports.abs = abs;
@@ -12025,7 +9329,6 @@ exports.acos = acos;
12025
9329
  exports.acosh = acosh;
12026
9330
  exports.acot = acot;
12027
9331
  exports.add = add;
12028
- exports.adoc2html = adoc2html;
12029
9332
  exports.arange = arange;
12030
9333
  exports.arr2str = arr2str;
12031
9334
  exports.asin = asin;
@@ -12040,11 +9343,6 @@ exports.blockQuote = blockQuote;
12040
9343
  exports.br = br;
12041
9344
  exports.brs = brs;
12042
9345
  exports.btn = btn;
12043
- exports.canvasArc = canvasArc;
12044
- exports.canvasCircle = canvasCircle;
12045
- exports.canvasLine = canvasLine;
12046
- exports.canvasPoints = canvasPoints;
12047
- exports.canvasRect = canvasRect;
12048
9346
  exports.cartesianProduct = cartesianProduct;
12049
9347
  exports.ceil = ceil;
12050
9348
  exports.checkbox = checkbox;
@@ -12065,7 +9363,6 @@ exports.csv2json = csv2json;
12065
9363
  exports.csv2matrix = csv2matrix;
12066
9364
  exports.csv2object = csv2object;
12067
9365
  exports.csv2sql = csv2sql;
12068
- exports.dangerAlert = dangerAlert;
12069
9366
  exports.datalist = datalist;
12070
9367
  exports.default = Ziko;
12071
9368
  exports.defineParamsGetter = defineParamsGetter;
@@ -12085,8 +9382,6 @@ exports.h3 = h3;
12085
9382
  exports.h4 = h4;
12086
9383
  exports.h5 = h5;
12087
9384
  exports.h6 = h6;
12088
- exports.hSlider = hSlider;
12089
- exports.hSplitter = hSplitter;
12090
9385
  exports.hTags = hTags;
12091
9386
  exports.hr = hr;
12092
9387
  exports.hrs = hrs;
@@ -12094,7 +9389,6 @@ exports.html = html;
12094
9389
  exports.hypot = hypot;
12095
9390
  exports.image = image;
12096
9391
  exports.inRange = inRange;
12097
- exports.infoAlert = infoAlert;
12098
9392
  exports.input = input;
12099
9393
  exports.inputCamera = inputCamera;
12100
9394
  exports.inputColor = inputColor;
@@ -12124,13 +9418,11 @@ exports.logspace = logspace;
12124
9418
  exports.luDecomposition = luDecomposition;
12125
9419
  exports.map = map;
12126
9420
  exports.mapfun = mapfun$1;
12127
- exports.markdown2html = markdown2html;
12128
9421
  exports.matrix = matrix;
12129
9422
  exports.matrix2 = matrix2;
12130
9423
  exports.matrix3 = matrix3;
12131
9424
  exports.matrix4 = matrix4;
12132
9425
  exports.max = max;
12133
- exports.menu3d = menu3d;
12134
9426
  exports.min = min;
12135
9427
  exports.modulo = modulo;
12136
9428
  exports.mul = mul;
@@ -12169,34 +9461,20 @@ exports.str = str;
12169
9461
  exports.sub = sub;
12170
9462
  exports.subSet = subSet;
12171
9463
  exports.subText = subText;
12172
- exports.successAlert = successAlert;
12173
9464
  exports.sum = sum;
12174
9465
  exports.supText = supText;
12175
9466
  exports.svg2ascii = svg2ascii;
12176
9467
  exports.svg2img = svg2img;
12177
9468
  exports.svg2imgUrl = svg2imgUrl;
12178
9469
  exports.svg2str = svg2str;
12179
- exports.svgCircle = svgCircle;
12180
- exports.svgEllipse = svgEllipse;
12181
- exports.svgGrid = svgGrid;
12182
- exports.svgGroupe = svgGroupe;
12183
- exports.svgImage = svgImage;
12184
- exports.svgLine = svgLine;
12185
- exports.svgLink = svgLink;
12186
- exports.svgObject = svgObject;
12187
- exports.svgPath = svgPath;
12188
- exports.svgPolygon = svgPolygon;
12189
- exports.svgRect = svgRect;
12190
- exports.svgText = svgText;
12191
9470
  exports.tan = tan;
12192
9471
  exports.tanh = tanh;
12193
- exports.text = text$1;
9472
+ exports.text = text;
12194
9473
  exports.textarea = textarea;
12195
9474
  exports.timeTaken = timeTaken;
12196
9475
  exports.time_memory_Taken = time_memory_Taken;
12197
9476
  exports.ul = ul;
12198
9477
  exports.useAnimation = useAnimation;
12199
- exports.useBattery = useBattery;
12200
9478
  exports.useChannel = useChannel$1;
12201
9479
  exports.useClickEvent = useClickEvent;
12202
9480
  exports.useClipboardEvent = useClipboardEvent;
@@ -12208,7 +9486,6 @@ exports.useEventEmitter = useEventEmitter;
12208
9486
  exports.useFavIcon = useFavIcon$1;
12209
9487
  exports.useFocusEvent = useFocusEvent;
12210
9488
  exports.useFps = useFps;
12211
- exports.useGeolocation = useGeolocation;
12212
9489
  exports.useHashEvent = useHashEvent;
12213
9490
  exports.useHead = useHead$1;
12214
9491
  exports.useInputEvent = useInputEvent;
@@ -12230,13 +9507,10 @@ exports.useTimeLoop = useTimeLoop;
12230
9507
  exports.useTitle = useTitle$1;
12231
9508
  exports.useType = useType;
12232
9509
  exports.useWheelEvent = useWheelEvent;
12233
- exports.vSlider = vSlider;
12234
- exports.vSplitter = vSplitter;
12235
9510
  exports.video = video;
12236
9511
  exports.wait = wait;
12237
9512
  exports.waitForUIElm = waitForUIElm;
12238
9513
  exports.waitForUIElmSync = waitForUIElmSync;
12239
- exports.warningAlert = warningAlert;
12240
9514
  exports.watch = watch;
12241
9515
  exports.watchAttr = watchAttr;
12242
9516
  exports.watchChildren = watchChildren;