ziko 0.0.23 → 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.
- package/dist/ziko.cjs +78 -2817
- package/dist/ziko.js +78 -2817
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +76 -2755
- package/package.json +1 -1
- package/src/app/globals.js +4 -2
- package/src/data/converter/index.js +2 -6
- package/src/graphics/canvas/index.js +176 -2
- package/src/graphics/canvas/utils/floodFill.js +0 -1
- package/src/graphics/svg/index.js +69 -2
- package/src/reactivity/hooks/index.js +1 -1
- package/src/ui/elements/{primitives/ZikoUIElement.js → ZikoUIElement.js} +8 -9
- package/src/ui/elements/derived ( To Be Moved)/index.js +12 -0
- package/src/ui/elements/{derived/flex → flex}/index.js +2 -2
- package/src/ui/elements/{derived/grid → grid}/index.js +2 -2
- package/src/ui/elements/{primitives/index.js → index.js} +3 -1
- package/src/ui/elements/{primitives/io → io}/Form/index.js +1 -1
- package/src/ui/elements/{primitives/io → io}/Inputs/__helpers__.js +1 -1
- package/src/ui/elements/{primitives/io → io}/Inputs/input/index.js +1 -1
- package/src/ui/elements/{primitives/list → list}/index.js +2 -3
- package/src/ui/elements/{primitives/misc → misc}/index.js +2 -3
- package/src/ui/elements/{primitives/semantic → semantic}/index.js +8 -8
- package/src/ui/elements/{primitives/table → table}/table.js +1 -1
- package/src/ui/elements/{primitives/text → text}/__ZikoUIText__.js +3 -4
- package/src/ui/index.js +21 -21
- package/src/ui/utils/index.js +1 -1
- package/src/data/parser/markdown.js +0 -0
- package/src/graphics/canvas/canvas.js +0 -176
- package/src/graphics/svg/svg.js +0 -69
- package/src/reactivity/hooks/Interactions/useSerial.js +0 -0
- package/src/types.js +0 -73
- package/src/ui/elements/derived/index.js +0 -12
- package/src/ui/elements/primitives/ZikoUIContainerElement.js +0 -123
- /package/src/{global → _global (To Be Replaced )}/_themes/dark.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/_themes/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/_themes/light.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/app/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/component/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/globals/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/params/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/router/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/seo/index.js +0 -0
- /package/src/{global → _global (To Be Replaced )}/style/index.js +0 -0
- /package/src/data/converter/{adoc.js → __(To Be Moved)adoc.js} +0 -0
- /package/src/data/converter/{markdown.js → __(To Be Moved)markdown.js} +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/arc.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/image.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/line.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/path.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/points.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polygon.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polyline.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/rect.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/text.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/histogram.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/plot.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/scatter.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/stem.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Element.js +0 -0
- /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/index.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/circle.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/ellipse.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/foreign-object.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/groupe.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/image.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/index.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/line.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/link.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/path.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polygon.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polyline.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/rect.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/text.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/grid.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/index.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/index.js +0 -0
- /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/ziko-svg-element.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/index.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useBattery.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useCamera.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useGeolocation.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useMicro.js +0 -0
- /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useOrientation.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/accordion.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/collapsible.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/alert.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/palette.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/carousel/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/SubElements.js.txt +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-cell.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-note.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/sub-elements.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/menu3d.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/modal/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/breadcrumbs.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/__ZikoUISlider__.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/hSlider.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/vSlider.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/__ZikoUISplitter__.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/hsplitter.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/index.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/vsplitter.js +0 -0
- /package/src/ui/elements/{derived → derived ( To Be Moved)}/tabs/index.js +0 -0
- /package/src/ui/elements/{primitives/embaded → embaded}/html.js +0 -0
- /package/src/ui/elements/{primitives/embaded → embaded}/index.js +0 -0
- /package/src/ui/elements/{primitives/embaded → embaded}/pdf.js +0 -0
- /package/src/ui/elements/{primitives/embaded → embaded}/youtube.js +0 -0
- /package/src/ui/elements/{primitives/hydrate.js → hydrate.js} +0 -0
- /package/src/ui/elements/{primitives/io → io}/Form/index.js.txt +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-camera/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-checkbox/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-color/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date-time.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-time.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-email.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-password.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-file.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-image.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-number/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-radio/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-search/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Inputs/input-slider/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Select/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/Textarea/index.js +0 -0
- /package/src/ui/elements/{primitives/io → io}/index.js +0 -0
- /package/src/ui/elements/{primitives/list → list}/elements.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/Audio/index.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/Image/figure.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/Image/image.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/Image/index.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/Video/index.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/__ZikoUIDynamicMediaELement__.js +0 -0
- /package/src/ui/elements/{primitives/media → media}/index.js +0 -0
- /package/src/ui/elements/{primitives/misc → misc}/hyperscript.js +0 -0
- /package/src/ui/elements/{primitives/misc → misc}/suspense.js +0 -0
- /package/src/ui/elements/{primitives/misc → misc}/xml-wrapper.js +0 -0
- /package/src/ui/elements/{primitives/table → table}/elements.js +0 -0
- /package/src/ui/elements/{primitives/table → table}/index.js +0 -0
- /package/src/ui/elements/{primitives/table → table}/utils.js +0 -0
- /package/src/ui/elements/{primitives/text → text}/heading.js +0 -0
- /package/src/ui/elements/{primitives/text → text}/index.js +0 -0
- /package/src/ui/elements/{primitives/text → text}/p.js +0 -0
- /package/src/ui/elements/{primitives/text → text}/pre.js +0 -0
- /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 :
|
|
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,
|
|
@@ -4906,10 +4628,9 @@ class ZikoUIElement {
|
|
|
4906
4628
|
globalThis.__Ziko__.__UI__[this.cache.name]?globalThis.__Ziko__.__UI__[this.cache.name]?.push(this):globalThis.__Ziko__.__UI__[this.cache.name]=[this];
|
|
4907
4629
|
element && globalThis.__Ziko__.__Config__.default.render && this.render();
|
|
4908
4630
|
this.setAttr("data-ref", this.uuid);
|
|
4909
|
-
globalThis.__Ziko__.
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
});
|
|
4631
|
+
if(globalThis.__Ziko__.__Config__.renderingMode !== "spa" && !globalThis.__Ziko__.__Config__.isSSC) {
|
|
4632
|
+
globalThis.__Ziko__.__HYDRATION_MAP__.set(this.uuid, ()=>this);
|
|
4633
|
+
}
|
|
4913
4634
|
}
|
|
4914
4635
|
get element(){
|
|
4915
4636
|
return this.__ele__;
|
|
@@ -4989,7 +4710,7 @@ class ZikoUIElement {
|
|
|
4989
4710
|
return this;
|
|
4990
4711
|
}
|
|
4991
4712
|
for (let i = 0; i < ele.length; i++) {
|
|
4992
|
-
if (["number", "string"].includes(typeof ele[i])) ele[i] = text
|
|
4713
|
+
if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
|
|
4993
4714
|
if (ele[i] instanceof ZikoUIElement) {
|
|
4994
4715
|
ele[i].cache.parent = this;
|
|
4995
4716
|
this.element[adder](ele[i].element);
|
|
@@ -5019,7 +4740,7 @@ class ZikoUIElement {
|
|
|
5019
4740
|
if (index >= this.element.children.length) this.append(...ele);
|
|
5020
4741
|
else
|
|
5021
4742
|
for (let i = 0; i < ele.length; i++) {
|
|
5022
|
-
if (["number", "string"].includes(typeof ele[i])) ele[i] = text
|
|
4743
|
+
if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
|
|
5023
4744
|
this.element?.insertBefore(ele[i].element, this.items[index].element);
|
|
5024
4745
|
this.items.splice(index, 0, ele[i]);
|
|
5025
4746
|
}
|
|
@@ -5438,128 +5159,7 @@ class ZikoUIElement {
|
|
|
5438
5159
|
}
|
|
5439
5160
|
}
|
|
5440
5161
|
|
|
5441
|
-
class
|
|
5442
|
-
constructor(element, name = "") {
|
|
5443
|
-
super(element, name);
|
|
5444
|
-
this.items = [];
|
|
5445
|
-
}
|
|
5446
|
-
// maintain() {
|
|
5447
|
-
// for (let i = 0; i < this.items.length; i++)
|
|
5448
|
-
// Object.assign(this, { [[i]]: this.items[i] });
|
|
5449
|
-
// this.length = this.items.length;
|
|
5450
|
-
// return this;
|
|
5451
|
-
// }
|
|
5452
|
-
// at(index) {
|
|
5453
|
-
// return this.items.at(index);
|
|
5454
|
-
// }
|
|
5455
|
-
// #addItem(adder, pusher, ...ele) {
|
|
5456
|
-
// if (this.cache.isFrozzen) {
|
|
5457
|
-
// console.warn("You can't append new item to frozzen element");
|
|
5458
|
-
// return this;
|
|
5459
|
-
// }
|
|
5460
|
-
// for (let i = 0; i < ele.length; i++) {
|
|
5461
|
-
// if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
|
|
5462
|
-
// if (ele[i] instanceof ZikoUIElement) {
|
|
5463
|
-
// ele[i].cache.parent = this;
|
|
5464
|
-
// this.element[adder](ele[i].element);
|
|
5465
|
-
// ele[i].target = this.element;
|
|
5466
|
-
// this.items[pusher](ele[i]);
|
|
5467
|
-
// } else if (ele[i] instanceof Object) {
|
|
5468
|
-
// if (ele[i]?.style) this.style(ele[i]?.style);
|
|
5469
|
-
// if (ele[i]?.attr) {
|
|
5470
|
-
// Object.entries(ele[i].attr).forEach((n) =>
|
|
5471
|
-
// this.setAttr("" + n[0], n[1]),
|
|
5472
|
-
// );
|
|
5473
|
-
// }
|
|
5474
|
-
// }
|
|
5475
|
-
// }
|
|
5476
|
-
// this.maintain();
|
|
5477
|
-
// return this;
|
|
5478
|
-
// }
|
|
5479
|
-
// append(...ele) {
|
|
5480
|
-
// this.#addItem("append", "push", ...ele);
|
|
5481
|
-
// return this;
|
|
5482
|
-
// }
|
|
5483
|
-
// prepend(...ele) {
|
|
5484
|
-
// this.#addItem("prepend", "unshift", ...ele);
|
|
5485
|
-
// return this;
|
|
5486
|
-
// }
|
|
5487
|
-
// insertAt(index, ...ele) {
|
|
5488
|
-
// if (index >= this.element.children.length) this.append(...ele);
|
|
5489
|
-
// else
|
|
5490
|
-
// for (let i = 0; i < ele.length; i++) {
|
|
5491
|
-
// if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
|
|
5492
|
-
// this.element?.insertBefore(ele[i].element, this.items[index].element);
|
|
5493
|
-
// this.items.splice(index, 0, ele[i]);
|
|
5494
|
-
// }
|
|
5495
|
-
// return this;
|
|
5496
|
-
// }
|
|
5497
|
-
// remove(...ele) {
|
|
5498
|
-
// const remove = (ele) => {
|
|
5499
|
-
// if (typeof ele === "number") ele = this.items[ele];
|
|
5500
|
-
// if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
|
|
5501
|
-
// this.items = this.items.filter((n) => n !== ele);
|
|
5502
|
-
// };
|
|
5503
|
-
// for (let i = 0; i < ele.length; i++) remove(ele[i]);
|
|
5504
|
-
// for (let i = 0; i < this.items.length; i++)
|
|
5505
|
-
// Object.assign(this, { [[i]]: this.items[i] });
|
|
5506
|
-
// // Remove from item
|
|
5507
|
-
// return this;
|
|
5508
|
-
// }
|
|
5509
|
-
// forEach(callback) {
|
|
5510
|
-
// this.items.forEach(callback);
|
|
5511
|
-
// return this;
|
|
5512
|
-
// }
|
|
5513
|
-
// map(callback) {
|
|
5514
|
-
// return this.items.map(callback);
|
|
5515
|
-
// }
|
|
5516
|
-
// find(condition) {
|
|
5517
|
-
// return this.items.filter(condition);
|
|
5518
|
-
// }
|
|
5519
|
-
// filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
|
|
5520
|
-
// const FilterItems = this.items.filter(condition_callback);
|
|
5521
|
-
// FilterItems.forEach(if_callback);
|
|
5522
|
-
// this.items
|
|
5523
|
-
// .filter((item) => !FilterItems.includes(item))
|
|
5524
|
-
// .forEach(else_callback);
|
|
5525
|
-
// return this;
|
|
5526
|
-
// }
|
|
5527
|
-
// filterByTextContent(text, exactMatch = false) {
|
|
5528
|
-
// this.items.forEach((n) => n.render());
|
|
5529
|
-
// this.filter(
|
|
5530
|
-
// (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
|
|
5531
|
-
// (e) => e.unrender(),
|
|
5532
|
-
// );
|
|
5533
|
-
// // this.items.filter(n=>{
|
|
5534
|
-
// // const content=n.element.textContent;
|
|
5535
|
-
// // return !(exactMatch?content===text:content.includes(text))
|
|
5536
|
-
// // }).map(n=>n.unrender());
|
|
5537
|
-
// // return this;
|
|
5538
|
-
// }
|
|
5539
|
-
// filterByClass(value) {
|
|
5540
|
-
// this.items.map((n) => n.render());
|
|
5541
|
-
// this.items
|
|
5542
|
-
// .filter((n) => !n.classes.includes(value))
|
|
5543
|
-
// .map((n) => n.unrender());
|
|
5544
|
-
// return this;
|
|
5545
|
-
// }
|
|
5546
|
-
// sortByTextContent(value, displays) {
|
|
5547
|
-
// let item = this.children;
|
|
5548
|
-
// item
|
|
5549
|
-
// .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
|
|
5550
|
-
// .map((n) => {
|
|
5551
|
-
// n.style.display = "none";
|
|
5552
|
-
// });
|
|
5553
|
-
// item
|
|
5554
|
-
// .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
|
|
5555
|
-
// .map((n, i) => (n.style.display = displays[i]));
|
|
5556
|
-
// //return item.filter(n=>n.style.display!="none")
|
|
5557
|
-
// item.filter((n) => n.style.display != "none");
|
|
5558
|
-
// return this;
|
|
5559
|
-
// }
|
|
5560
|
-
}
|
|
5561
|
-
|
|
5562
|
-
class __ZikoUIText__ extends ZikoUIContainerElement {
|
|
5162
|
+
class __ZikoUIText__ extends ZikoUIElement {
|
|
5563
5163
|
constructor(tag, name, lineBreak,...value) {
|
|
5564
5164
|
super(tag, name);
|
|
5565
5165
|
this.addValue(...value);
|
|
@@ -5664,7 +5264,7 @@ class ZikoUIAbbrText extends __ZikoUIText__ {
|
|
|
5664
5264
|
return true
|
|
5665
5265
|
}
|
|
5666
5266
|
}
|
|
5667
|
-
const text
|
|
5267
|
+
const text = (...str) => new ZikoUIText(...str);
|
|
5668
5268
|
const quote = (...str) => new ZikoUIQuote(...str);
|
|
5669
5269
|
const dfnText = (...str) => new ZikoUIDefintion(...str);
|
|
5670
5270
|
const supText = (...str) => new ZikoUISupText(...str);
|
|
@@ -5745,10 +5345,10 @@ var Text$1 = /*#__PURE__*/Object.freeze({
|
|
|
5745
5345
|
quote: quote,
|
|
5746
5346
|
subText: subText,
|
|
5747
5347
|
supText: supText,
|
|
5748
|
-
text: text
|
|
5348
|
+
text: text
|
|
5749
5349
|
});
|
|
5750
5350
|
|
|
5751
|
-
class ZikoUILI extends
|
|
5351
|
+
class ZikoUILI extends ZikoUIElement{
|
|
5752
5352
|
constructor(UI){
|
|
5753
5353
|
super("li","li");
|
|
5754
5354
|
this.append(UI);
|
|
@@ -5757,7 +5357,7 @@ class ZikoUILI extends ZikoUIContainerElement{
|
|
|
5757
5357
|
return true;
|
|
5758
5358
|
}
|
|
5759
5359
|
}
|
|
5760
|
-
class ZikoUIList extends
|
|
5360
|
+
class ZikoUIList extends ZikoUIElement {
|
|
5761
5361
|
constructor(element,name) {
|
|
5762
5362
|
super(element,name);
|
|
5763
5363
|
delete this.append;
|
|
@@ -5769,7 +5369,7 @@ class ZikoUIList extends ZikoUIContainerElement {
|
|
|
5769
5369
|
append(...arr){
|
|
5770
5370
|
for (let i = 0; i < arr.length; i++) {
|
|
5771
5371
|
let li = null;
|
|
5772
|
-
if(["string","number"].includes(typeof arr[i]))arr[i]=text
|
|
5372
|
+
if(["string","number"].includes(typeof arr[i]))arr[i]=text(arr[i]);
|
|
5773
5373
|
if (arr[i] instanceof ZikoUIElement)li=new ZikoUILI(arr[i]);
|
|
5774
5374
|
li.setTarget(this.element);
|
|
5775
5375
|
this.items.push(li[0]);
|
|
@@ -5797,7 +5397,7 @@ class ZikoUIList extends ZikoUIContainerElement {
|
|
|
5797
5397
|
else
|
|
5798
5398
|
for (let i = 0; i < ele.length; i++) {
|
|
5799
5399
|
let li = null;
|
|
5800
|
-
if(["number","string"].includes(typeof ele[i]))ele[i]=text
|
|
5400
|
+
if(["number","string"].includes(typeof ele[i]))ele[i]=text(ele[i]);
|
|
5801
5401
|
if (ele[i] instanceof ZikoUIElement)li=new ZikoUILI(ele[i]);
|
|
5802
5402
|
this.element?.insertBefore(li.element, this.items[index].parent.element);
|
|
5803
5403
|
this.items.splice(index, 0, ele[i][0]);
|
|
@@ -6405,7 +6005,7 @@ const sTags = SVGTags.reduce((acc, key) => {
|
|
|
6405
6005
|
return acc;
|
|
6406
6006
|
}, {});
|
|
6407
6007
|
|
|
6408
|
-
class ZikoUIHtmlTag extends
|
|
6008
|
+
class ZikoUIHtmlTag extends ZikoUIElement {
|
|
6409
6009
|
constructor(element) {
|
|
6410
6010
|
super(element,"html");
|
|
6411
6011
|
}
|
|
@@ -6458,7 +6058,7 @@ class ZikoUIBr extends ZikoUIElement {
|
|
|
6458
6058
|
return true
|
|
6459
6059
|
}
|
|
6460
6060
|
}
|
|
6461
|
-
class ZikoUILink extends
|
|
6061
|
+
class ZikoUILink extends ZikoUIElement{
|
|
6462
6062
|
constructor(href){
|
|
6463
6063
|
super("a","link");
|
|
6464
6064
|
Object.assign(this.cache,{
|
|
@@ -6792,7 +6392,7 @@ class ZikoUITextArea extends ZikoUIElement {
|
|
|
6792
6392
|
}
|
|
6793
6393
|
const textarea =()=> new ZikoUITextArea();
|
|
6794
6394
|
|
|
6795
|
-
|
|
6395
|
+
class ZikoUIFlex extends ZikoUIElement {
|
|
6796
6396
|
constructor(tag = "div", w = "100%", h = "100%") {
|
|
6797
6397
|
super(tag ,"Flex");
|
|
6798
6398
|
this.direction = "cols";
|
|
@@ -6840,18 +6440,18 @@ let ZikoUIFlex$1 = class ZikoUIFlex extends ZikoUIContainerElement {
|
|
|
6840
6440
|
return this;
|
|
6841
6441
|
}
|
|
6842
6442
|
vertical(x, y, order=1) {
|
|
6843
|
-
set_vertical
|
|
6443
|
+
set_vertical.call(this,order);
|
|
6844
6444
|
this.style({
|
|
6845
|
-
alignItems: typeof(x)==="number"?map_pos_x
|
|
6846
|
-
justifyContent: typeof(y)=="number"?map_pos_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
|
|
6847
6447
|
});
|
|
6848
6448
|
return this;
|
|
6849
6449
|
}
|
|
6850
6450
|
horizontal(x, y, order=1) {
|
|
6851
|
-
set_horizontal
|
|
6451
|
+
set_horizontal.call(this,order);
|
|
6852
6452
|
this.style({
|
|
6853
|
-
alignItems: typeof(y)=="number"?map_pos_y
|
|
6854
|
-
justifyContent: typeof(x)==="number"?map_pos_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
|
|
6855
6455
|
});
|
|
6856
6456
|
return this;
|
|
6857
6457
|
}
|
|
@@ -6860,38 +6460,44 @@ let ZikoUIFlex$1 = class ZikoUIFlex extends ZikoUIContainerElement {
|
|
|
6860
6460
|
this.style({ display: "flex" });
|
|
6861
6461
|
return this;
|
|
6862
6462
|
}
|
|
6863
|
-
}
|
|
6463
|
+
}
|
|
6864
6464
|
|
|
6865
|
-
const Flex
|
|
6465
|
+
const Flex = (...ZikoUIElement) =>{
|
|
6866
6466
|
let tag="div";
|
|
6867
6467
|
if(typeof ZikoUIElement[0]==="string"){
|
|
6868
6468
|
tag=ZikoUIElement[0];
|
|
6869
6469
|
ZikoUIElement.pop();
|
|
6870
6470
|
}
|
|
6871
|
-
return new ZikoUIFlex
|
|
6471
|
+
return new ZikoUIFlex(tag).append(...ZikoUIElement);
|
|
6872
6472
|
};
|
|
6873
|
-
function set_vertical
|
|
6473
|
+
function set_vertical(direction){
|
|
6874
6474
|
direction == 1
|
|
6875
6475
|
? this.style({ flexDirection: "column" })
|
|
6876
6476
|
: direction == -1 && this.style({ flexDirection: "column-reverse" });
|
|
6877
6477
|
return this;
|
|
6878
6478
|
}
|
|
6879
|
-
function set_horizontal
|
|
6479
|
+
function set_horizontal(direction){
|
|
6880
6480
|
direction == 1
|
|
6881
6481
|
? this.style({ flexDirection: "row" })
|
|
6882
6482
|
: direction == -1 && this.style({ flexDirection: "row-reverse" });
|
|
6883
6483
|
return this;
|
|
6884
6484
|
}
|
|
6885
|
-
function map_pos_x
|
|
6485
|
+
function map_pos_x(align){
|
|
6886
6486
|
let pos = ["flex-start", "center", "flex-end"];
|
|
6887
6487
|
if (typeof align === "number") align = pos[align + 1];
|
|
6888
6488
|
return align;
|
|
6889
6489
|
}
|
|
6890
|
-
function map_pos_y
|
|
6891
|
-
return map_pos_x
|
|
6490
|
+
function map_pos_y(align){
|
|
6491
|
+
return map_pos_x(-align);
|
|
6892
6492
|
}
|
|
6893
6493
|
|
|
6894
|
-
|
|
6494
|
+
var Flex$1 = /*#__PURE__*/Object.freeze({
|
|
6495
|
+
__proto__: null,
|
|
6496
|
+
Flex: Flex,
|
|
6497
|
+
ZikoUIFlex: ZikoUIFlex
|
|
6498
|
+
});
|
|
6499
|
+
|
|
6500
|
+
class ZikoUIForm extends ZikoUIFlex{
|
|
6895
6501
|
constructor(...items){
|
|
6896
6502
|
super("form", "Form");
|
|
6897
6503
|
this.append(...items);
|
|
@@ -7009,7 +6615,7 @@ class ZikoUICaption extends ZikoUIElement{
|
|
|
7009
6615
|
const tr=(...ZikoUIElement)=>new ZikoUITr(...ZikoUIElement);
|
|
7010
6616
|
const td=(...UI)=>{
|
|
7011
6617
|
UI=UI.map(n=>{
|
|
7012
|
-
if(!(n instanceof ZikoUIElement))n=text
|
|
6618
|
+
if(!(n instanceof ZikoUIElement))n=text(n);
|
|
7013
6619
|
return n
|
|
7014
6620
|
});
|
|
7015
6621
|
return new ZikoUITd(...UI)
|
|
@@ -7152,7 +6758,7 @@ var Table = /*#__PURE__*/Object.freeze({
|
|
|
7152
6758
|
Table: Table$1
|
|
7153
6759
|
});
|
|
7154
6760
|
|
|
7155
|
-
class ZikoUIMain extends
|
|
6761
|
+
class ZikoUIMain extends ZikoUIElement{
|
|
7156
6762
|
constructor(){
|
|
7157
6763
|
super("main","Main");
|
|
7158
6764
|
}
|
|
@@ -7160,7 +6766,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7160
6766
|
return true
|
|
7161
6767
|
}
|
|
7162
6768
|
}
|
|
7163
|
-
class ZikoUIHeader extends
|
|
6769
|
+
class ZikoUIHeader extends ZikoUIElement{
|
|
7164
6770
|
constructor(){
|
|
7165
6771
|
super("header","Header");
|
|
7166
6772
|
}
|
|
@@ -7168,7 +6774,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7168
6774
|
return true
|
|
7169
6775
|
}
|
|
7170
6776
|
}
|
|
7171
|
-
class ZikoUINav extends
|
|
6777
|
+
class ZikoUINav extends ZikoUIElement{
|
|
7172
6778
|
constructor(){
|
|
7173
6779
|
super("nav","Nav");
|
|
7174
6780
|
}
|
|
@@ -7176,7 +6782,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7176
6782
|
return true
|
|
7177
6783
|
}
|
|
7178
6784
|
}
|
|
7179
|
-
class ZikoUISection extends
|
|
6785
|
+
class ZikoUISection extends ZikoUIElement{
|
|
7180
6786
|
constructor(){
|
|
7181
6787
|
super("section","Section");
|
|
7182
6788
|
this.style({position:"relative"});
|
|
@@ -7185,7 +6791,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7185
6791
|
return true
|
|
7186
6792
|
}
|
|
7187
6793
|
}
|
|
7188
|
-
class ZikoUIArticle extends
|
|
6794
|
+
class ZikoUIArticle extends ZikoUIElement{
|
|
7189
6795
|
constructor(){
|
|
7190
6796
|
super("article","Article");
|
|
7191
6797
|
}
|
|
@@ -7193,7 +6799,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7193
6799
|
return true
|
|
7194
6800
|
}
|
|
7195
6801
|
}
|
|
7196
|
-
class ZikoUIAside extends
|
|
6802
|
+
class ZikoUIAside extends ZikoUIElement{
|
|
7197
6803
|
constructor(){
|
|
7198
6804
|
super("aside","Aside");
|
|
7199
6805
|
}
|
|
@@ -7201,7 +6807,7 @@ class ZikoUIMain extends ZikoUIContainerElement{
|
|
|
7201
6807
|
return true
|
|
7202
6808
|
}
|
|
7203
6809
|
}
|
|
7204
|
-
class ZikoUIFooter extends
|
|
6810
|
+
class ZikoUIFooter extends ZikoUIElement{
|
|
7205
6811
|
constructor(){
|
|
7206
6812
|
super("footer","Footer");
|
|
7207
6813
|
this.element=document?.createElement("footer");
|
|
@@ -7236,7 +6842,7 @@ var Semantic = /*#__PURE__*/Object.freeze({
|
|
|
7236
6842
|
ZikoUISection: ZikoUISection
|
|
7237
6843
|
});
|
|
7238
6844
|
|
|
7239
|
-
class ZikoUIGrid extends
|
|
6845
|
+
class ZikoUIGrid extends ZikoUIElement {
|
|
7240
6846
|
constructor(tag ="div", w = "50vw", h = "50vh") {
|
|
7241
6847
|
super(tag,"Grid");
|
|
7242
6848
|
this.direction = "cols";
|
|
@@ -7268,1609 +6874,24 @@ class ZikoUIGrid extends ZikoUIContainerElement {
|
|
|
7268
6874
|
}
|
|
7269
6875
|
const Grid$1 = (...ZikoUIElement) => new ZikoUIGrid("div").append(...ZikoUIElement);
|
|
7270
6876
|
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
open : openIcon,
|
|
7277
|
-
close : closeIcon
|
|
7278
|
-
}
|
|
7279
|
-
});
|
|
7280
|
-
this.summary=html("summary",summary).style({
|
|
7281
|
-
fontSize:"1.1em",
|
|
7282
|
-
padding:"0.625rem",
|
|
7283
|
-
fontWeight:"bold",
|
|
7284
|
-
listStyleType:`"${openIcon}"`,
|
|
7285
|
-
cursor:"pointer",
|
|
7286
|
-
});
|
|
7287
|
-
this.summary[0].style({
|
|
7288
|
-
marginLeft:"0.5em",
|
|
7289
|
-
});
|
|
7290
|
-
this.content=content.style({
|
|
7291
|
-
margin:"0.7em",
|
|
7292
|
-
});
|
|
7293
|
-
this.element?.append(this.summary.element,this.content.element);
|
|
7294
|
-
this.style({
|
|
7295
|
-
marginBottom:"0.7em",
|
|
7296
|
-
});
|
|
7297
|
-
watchAttr(this, e=>{
|
|
7298
|
-
if(e.target.isOpen){
|
|
7299
|
-
e.target.emit("open");
|
|
7300
|
-
if(this?.parent?.isAccordion){
|
|
7301
|
-
if(this.parent.cache.autoClose)this.parent.closeExcept(this);
|
|
7302
|
-
}
|
|
7303
|
-
this.summary.style({
|
|
7304
|
-
listStyleType:`"${this.cache.icons.close}"`
|
|
7305
|
-
});
|
|
7306
|
-
}
|
|
7307
|
-
else {
|
|
7308
|
-
e.target.emit("close");
|
|
7309
|
-
this.summary.style({
|
|
7310
|
-
listStyleType:`"${this.cache.icons.open}"`
|
|
7311
|
-
});
|
|
7312
|
-
}
|
|
7313
|
-
});
|
|
7314
|
-
}
|
|
7315
|
-
get isCollapsible(){
|
|
7316
|
-
return true;
|
|
7317
|
-
}
|
|
7318
|
-
get isOpen(){
|
|
7319
|
-
return this.element.open;
|
|
7320
|
-
}
|
|
7321
|
-
open(details=this){
|
|
7322
|
-
this.element.open=true;
|
|
7323
|
-
this.emit("open",details);
|
|
7324
|
-
return this;
|
|
7325
|
-
}
|
|
7326
|
-
close(){
|
|
7327
|
-
this.element.open=false;
|
|
7328
|
-
return this;
|
|
7329
|
-
}
|
|
7330
|
-
onOpen(callback){
|
|
7331
|
-
this.on("open", callback);
|
|
7332
|
-
return this;
|
|
7333
|
-
}
|
|
7334
|
-
onClose(callback){
|
|
7335
|
-
this.on("close", callback);
|
|
7336
|
-
return this;
|
|
7337
|
-
}
|
|
7338
|
-
toggle(){
|
|
7339
|
-
this.element.open=!this.element.open;
|
|
7340
|
-
return this;
|
|
7341
|
-
}
|
|
7342
|
-
}
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
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
|
+
});
|
|
7346
6882
|
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
this.items.forEach(n=>n.close());
|
|
7360
|
-
return this;
|
|
7361
|
-
}
|
|
7362
|
-
closeExcept(...Collapsibles){
|
|
7363
|
-
this.items.filter(n=>!Collapsibles.includes(n)).forEach(n=>n.close());
|
|
7364
|
-
return this;
|
|
7365
|
-
}
|
|
7366
|
-
open(CollapsibleOrIndex){
|
|
7367
|
-
CollapsibleOrIndex.isCollapsible? CollapsibleOrIndex.open(): this.items[CollapsibleOrIndex].open();
|
|
7368
|
-
this.closeExcept(CollapsibleOrIndex.isCollapsible? CollapsibleOrIndex: this.items[CollapsibleOrIndex]);
|
|
7369
|
-
return this;
|
|
7370
|
-
}
|
|
7371
|
-
enableAutoClose(){
|
|
7372
|
-
this.cache.autoClose = true;
|
|
7373
|
-
return this;
|
|
7374
|
-
}
|
|
7375
|
-
disableAutoClose(){
|
|
7376
|
-
this.cache.autoClose = false;
|
|
7377
|
-
return this;
|
|
7378
|
-
}
|
|
7379
|
-
toggleAutoClose(){
|
|
7380
|
-
this.cache.autoClose = !this.cache.autoClose;
|
|
7381
|
-
}
|
|
7382
|
-
}
|
|
7383
|
-
const Accordion = (... Collapsible) => new ZikoUIAccordion(...Collapsible);
|
|
7384
|
-
|
|
7385
|
-
class ZikoUIFlex extends ZikoUIContainerElement {
|
|
7386
|
-
constructor(tag = "div", w = "100%", h = "100%") {
|
|
7387
|
-
super(tag ,"Flex");
|
|
7388
|
-
this.direction = "cols";
|
|
7389
|
-
if (typeof w == "number") w += "%";
|
|
7390
|
-
if (typeof h == "number") h += "%";
|
|
7391
|
-
this.style({ width: w, height: h });
|
|
7392
|
-
this.style({ display: "flex" });
|
|
7393
|
-
// this.render();
|
|
7394
|
-
}
|
|
7395
|
-
get isFlex(){
|
|
7396
|
-
return true;
|
|
7397
|
-
}
|
|
7398
|
-
resp(px,wrap = true) {
|
|
7399
|
-
this.wrap(wrap);
|
|
7400
|
-
if (this.element.clientWidth < px) this.vertical();
|
|
7401
|
-
else this.horizontal();
|
|
7402
|
-
return this;
|
|
7403
|
-
}
|
|
7404
|
-
setSpaceAround() {
|
|
7405
|
-
this.style({ justifyContent: "space-around" });
|
|
7406
|
-
return this;
|
|
7407
|
-
}
|
|
7408
|
-
setSpaceBetween() {
|
|
7409
|
-
this.style({ justifyContent: "space-between" });
|
|
7410
|
-
return this;
|
|
7411
|
-
}
|
|
7412
|
-
setBaseline() {
|
|
7413
|
-
this.style({ alignItems: "baseline" });
|
|
7414
|
-
return this;
|
|
7415
|
-
}
|
|
7416
|
-
gap(g) {
|
|
7417
|
-
if (this.direction === "row") this.style({ columnGap: g });
|
|
7418
|
-
else if (this.direction === "column") this.style({ rowGap: g });
|
|
7419
|
-
return this;
|
|
7420
|
-
}
|
|
7421
|
-
wrap(value = "wrap") {
|
|
7422
|
-
const values = ["no-wrap", "wrap","wrap-reverse"];
|
|
7423
|
-
this.style({
|
|
7424
|
-
flexWrap: typeof value === "string" ? value : values[+value],
|
|
7425
|
-
});
|
|
7426
|
-
return this;
|
|
7427
|
-
}
|
|
7428
|
-
_justifyContent(align = "center") {
|
|
7429
|
-
this.style({ justifyContent: align });
|
|
7430
|
-
return this;
|
|
7431
|
-
}
|
|
7432
|
-
vertical(x, y, order=1) {
|
|
7433
|
-
set_vertical.call(this,order);
|
|
7434
|
-
this.style({
|
|
7435
|
-
alignItems: typeof(x)==="number"?map_pos_x.call(this,x):x,
|
|
7436
|
-
justifyContent: typeof(y)=="number"?map_pos_y.call(this,y):y
|
|
7437
|
-
});
|
|
7438
|
-
return this;
|
|
7439
|
-
}
|
|
7440
|
-
horizontal(x, y, order=1) {
|
|
7441
|
-
set_horizontal.call(this,order);
|
|
7442
|
-
this.style({
|
|
7443
|
-
alignItems: typeof(y)=="number"?map_pos_y.call(this,y):y,
|
|
7444
|
-
justifyContent: typeof(x)==="number"?map_pos_x.call(this,x):x
|
|
7445
|
-
});
|
|
7446
|
-
return this;
|
|
7447
|
-
}
|
|
7448
|
-
show() {
|
|
7449
|
-
this.isHidden = false;
|
|
7450
|
-
this.style({ display: "flex" });
|
|
7451
|
-
return this;
|
|
7452
|
-
}
|
|
7453
|
-
}
|
|
7454
|
-
|
|
7455
|
-
const Flex = (...ZikoUIElement) =>{
|
|
7456
|
-
let tag="div";
|
|
7457
|
-
if(typeof ZikoUIElement[0]==="string"){
|
|
7458
|
-
tag=ZikoUIElement[0];
|
|
7459
|
-
ZikoUIElement.pop();
|
|
7460
|
-
}
|
|
7461
|
-
return new ZikoUIFlex(tag).append(...ZikoUIElement);
|
|
7462
|
-
};
|
|
7463
|
-
function set_vertical(direction){
|
|
7464
|
-
direction == 1
|
|
7465
|
-
? this.style({ flexDirection: "column" })
|
|
7466
|
-
: direction == -1 && this.style({ flexDirection: "column-reverse" });
|
|
7467
|
-
return this;
|
|
7468
|
-
}
|
|
7469
|
-
function set_horizontal(direction){
|
|
7470
|
-
direction == 1
|
|
7471
|
-
? this.style({ flexDirection: "row" })
|
|
7472
|
-
: direction == -1 && this.style({ flexDirection: "row-reverse" });
|
|
7473
|
-
return this;
|
|
7474
|
-
}
|
|
7475
|
-
function map_pos_x(align){
|
|
7476
|
-
let pos = ["flex-start", "center", "flex-end"];
|
|
7477
|
-
if (typeof align === "number") align = pos[align + 1];
|
|
7478
|
-
return align;
|
|
7479
|
-
}
|
|
7480
|
-
function map_pos_y(align){
|
|
7481
|
-
return map_pos_x(-align);
|
|
7482
|
-
}
|
|
7483
|
-
|
|
7484
|
-
class ZikoUICarousel extends ZikoUIFlex{
|
|
7485
|
-
constructor(...ZikoUIElement){
|
|
7486
|
-
super();
|
|
7487
|
-
this.style({
|
|
7488
|
-
position:"relative",
|
|
7489
|
-
overflow:"hidden",
|
|
7490
|
-
touchAction:"none",
|
|
7491
|
-
userSelect:"none"
|
|
7492
|
-
});
|
|
7493
|
-
this.horizontal("space-around",0);
|
|
7494
|
-
this.track = Section(...ZikoUIElement).style({ display: "inline-flex" });
|
|
7495
|
-
this.track.size(this.track.children.length * 100 + "vw");
|
|
7496
|
-
this.track.setTarget(this);
|
|
7497
|
-
this.track.items.map((n) =>
|
|
7498
|
-
n.style({ pointerEvents: "none", margin: "auto 10px" })
|
|
7499
|
-
);
|
|
7500
|
-
this.x0 = null;
|
|
7501
|
-
this.tx = 0;
|
|
7502
|
-
this.onPtrMove(e=>{
|
|
7503
|
-
if(e.isDown){
|
|
7504
|
-
let x = e.event.pageX;
|
|
7505
|
-
let dx = x - this.x0;
|
|
7506
|
-
this.track.st.translateX(
|
|
7507
|
-
this.tx + dx,
|
|
7508
|
-
0
|
|
7509
|
-
);
|
|
7510
|
-
}
|
|
7511
|
-
});
|
|
7512
|
-
this.onPtrDown(e=>{
|
|
7513
|
-
console.log(e.event);
|
|
7514
|
-
this.x0 = e.event.pageX;
|
|
7515
|
-
const transformMatrix = window
|
|
7516
|
-
.getComputedStyle(this.track.element)
|
|
7517
|
-
.getPropertyValue("transform");
|
|
7518
|
-
if (transformMatrix !== "none") {
|
|
7519
|
-
this.tx = +transformMatrix.split(",")[4];
|
|
7520
|
-
}
|
|
7521
|
-
});
|
|
7522
|
-
this.onPtrUp(e=>console.log(e.isDown));
|
|
7523
|
-
this.onPtrLeave(e=>{
|
|
7524
|
-
// Handle outside up
|
|
7525
|
-
});
|
|
7526
|
-
}
|
|
7527
|
-
get isCarousel(){
|
|
7528
|
-
return true;
|
|
7529
|
-
}
|
|
7530
|
-
}
|
|
7531
|
-
const Carousel=(...ZikoUIElement)=>new ZikoUICarousel(...ZikoUIElement);
|
|
7532
|
-
|
|
7533
|
-
class ZikoUICodeNote extends ZikoUIFlex{
|
|
7534
|
-
constructor(){
|
|
7535
|
-
super("section");
|
|
7536
|
-
Object.assign(this.cache,{
|
|
7537
|
-
order:0,
|
|
7538
|
-
currentNote:null,
|
|
7539
|
-
currentNoteIndex:null
|
|
7540
|
-
});
|
|
7541
|
-
this.vertical(0,0);
|
|
7542
|
-
}
|
|
7543
|
-
get isCodeNote(){
|
|
7544
|
-
return true;
|
|
7545
|
-
}
|
|
7546
|
-
setCurrentNote(currentNote){
|
|
7547
|
-
this.cache.currentNote=currentNote;
|
|
7548
|
-
this.cache.currentNoteIndex=this.items.findIndex(n=>n===currentNote);
|
|
7549
|
-
currentNote.focus();
|
|
7550
|
-
this.items.forEach(n=>n.Input.style({
|
|
7551
|
-
border: "1px solid #ccc"
|
|
7552
|
-
}));
|
|
7553
|
-
currentNote.Input.style({
|
|
7554
|
-
border:"2px lightgreen solid"
|
|
7555
|
-
});
|
|
7556
|
-
return this;
|
|
7557
|
-
}
|
|
7558
|
-
addNote(text=""){
|
|
7559
|
-
this.append(CodeCell(text));
|
|
7560
|
-
return this;
|
|
7561
|
-
}
|
|
7562
|
-
execute(){
|
|
7563
|
-
this.cache.currentNote.execute();
|
|
7564
|
-
this.incrementOrder();
|
|
7565
|
-
return this;
|
|
7566
|
-
}
|
|
7567
|
-
incrementOrder(){
|
|
7568
|
-
this.cache.order++;
|
|
7569
|
-
this.cache.currentNote.setOrder(this.cache.order);
|
|
7570
|
-
return this;
|
|
7571
|
-
}
|
|
7572
|
-
next(){
|
|
7573
|
-
if(this.cache.currentNote===this.items.at(-1)){
|
|
7574
|
-
this.addNote();
|
|
7575
|
-
this.setCurrentNote(this.items.at(-1));
|
|
7576
|
-
}
|
|
7577
|
-
else this.setCurrentNote(this.items[this.cache.currentNoteIndex+1]);
|
|
7578
|
-
return this;
|
|
7579
|
-
}
|
|
7580
|
-
previous(){
|
|
7581
|
-
// add append before
|
|
7582
|
-
if(this.cache.currentNote!==this.items[0]){
|
|
7583
|
-
this.setCurrentNote(this.items[this.cache.currentNoteIndex-1]);
|
|
7584
|
-
}
|
|
7585
|
-
return this;
|
|
7586
|
-
}
|
|
7587
|
-
data(){
|
|
7588
|
-
return this.items.map(n=>n.cellData());
|
|
7589
|
-
}
|
|
7590
|
-
serialize(){
|
|
7591
|
-
return JSON.stringify(this.data());
|
|
7592
|
-
}
|
|
7593
|
-
import(data=[]){
|
|
7594
|
-
data.forEach((n,i)=>this.addNote(data[i].input));
|
|
7595
|
-
return this;
|
|
7596
|
-
}
|
|
7597
|
-
}
|
|
7598
|
-
const CodeNote=()=>new ZikoUICodeNote();
|
|
7599
|
-
|
|
7600
|
-
const Input=(codeText="")=>html("code",codeText).style({
|
|
7601
|
-
width:"100%",
|
|
7602
|
-
height:"auto",
|
|
7603
|
-
padding:"10px",
|
|
7604
|
-
boxSizing:"border-box",
|
|
7605
|
-
border: "1px solid #ccc",
|
|
7606
|
-
outline: "none",
|
|
7607
|
-
fontSize: "1rem",
|
|
7608
|
-
fontFamily: "Lucida Console, Courier New, monospace",
|
|
7609
|
-
padding: "1rem 0.5rem",
|
|
7610
|
-
wordBreak:"break-all",
|
|
7611
|
-
background:"#f6f8fa",
|
|
7612
|
-
color:"#0062C3"
|
|
7613
|
-
}).setAttr("contenteditable",true).setAttr("spellcheck",false);
|
|
7614
|
-
|
|
7615
|
-
const Output=()=>html("output").style({
|
|
7616
|
-
width:"100%",
|
|
7617
|
-
height:"auto",
|
|
7618
|
-
padding:"5px 0",
|
|
7619
|
-
});
|
|
7620
|
-
const Left=(ctx)=>Flex$1(
|
|
7621
|
-
text$1("[ ]")
|
|
7622
|
-
).style({
|
|
7623
|
-
width:"50px",
|
|
7624
|
-
//height:getComputedStyle(ctx.Input.element).height,
|
|
7625
|
-
height:"50px",
|
|
7626
|
-
margin:"10px 4px",
|
|
7627
|
-
padding:"5px",
|
|
7628
|
-
color:"darkblue",
|
|
7629
|
-
borderBottom:"4px solid gold",
|
|
7630
|
-
}).horizontal(0,0);
|
|
7631
|
-
const BTN_STYLE={
|
|
7632
|
-
background:"none",
|
|
7633
|
-
width:"25px",
|
|
7634
|
-
height:"25px",
|
|
7635
|
-
fontSize:"1.2rem",
|
|
7636
|
-
cursor:"pointer"
|
|
7637
|
-
};
|
|
7638
|
-
const Right=(ctx)=>Flex$1(
|
|
7639
|
-
text$1('▶️').style(BTN_STYLE).onClick(e=>{
|
|
7640
|
-
if(ctx.parent instanceof ZikoUICodeNote)ctx.parent.setCurrentNote(ctx);
|
|
7641
|
-
ctx.execute();
|
|
7642
|
-
globalThis.__Ziko__.__Config__.default.target=e.target.parent.parent[1][1];
|
|
7643
|
-
}),
|
|
7644
|
-
text$1('📋').style(BTN_STYLE).onClick(()=>{
|
|
7645
|
-
navigator.clipboard.writeText(ctx.codeText);
|
|
7646
|
-
}),
|
|
7647
|
-
text$1('✖️').style(BTN_STYLE).onClick(()=>ctx.remove()),
|
|
7648
|
-
text$1('✖️').style(BTN_STYLE).onClick(()=>ctx.remove()),
|
|
7649
|
-
).style({
|
|
7650
|
-
width:"70px",
|
|
7651
|
-
height:"50px",
|
|
7652
|
-
//background:"cyan",
|
|
7653
|
-
margin:"10px 0"
|
|
7654
|
-
}).horizontal(0,0).wrap(true);
|
|
7655
|
-
|
|
7656
|
-
class ZikoUICodeCell extends ZikoUIFlex{
|
|
7657
|
-
constructor(code="",{type="js",order=null}={}){
|
|
7658
|
-
super("section");
|
|
7659
|
-
Object.assign(this.cache,{
|
|
7660
|
-
state:null,
|
|
7661
|
-
order,
|
|
7662
|
-
type,
|
|
7663
|
-
metadata:{
|
|
7664
|
-
created:Date.now(),
|
|
7665
|
-
updated:null
|
|
7666
|
-
}
|
|
7667
|
-
});
|
|
7668
|
-
this.Input=Input(code);
|
|
7669
|
-
this.Output=Output();
|
|
7670
|
-
this.InOut=Flex(
|
|
7671
|
-
this.Input,
|
|
7672
|
-
this.Output
|
|
7673
|
-
).vertical().style({
|
|
7674
|
-
width:"100%",
|
|
7675
|
-
margin:"10px auto"
|
|
7676
|
-
});
|
|
7677
|
-
this.RightControl=Right(this);
|
|
7678
|
-
this.LeftControl=Left();
|
|
7679
|
-
this.append(
|
|
7680
|
-
this.LeftControl,
|
|
7681
|
-
this.InOut,
|
|
7682
|
-
this.RightControl
|
|
7683
|
-
);
|
|
7684
|
-
this.horizontal(-1,1).style({
|
|
7685
|
-
//background:"#444",
|
|
7686
|
-
width:"95vw",
|
|
7687
|
-
margin:"0 auto",
|
|
7688
|
-
border:"1px darkblue dotted"
|
|
7689
|
-
});
|
|
7690
|
-
let cm_content = this.Input.element.getElementsByClassName("cm-content")[0];
|
|
7691
|
-
if( cm_content ){
|
|
7692
|
-
cm_content.addEventListener("keydown",e=>{
|
|
7693
|
-
if(e.key === "Enter" && e.shiftKey){
|
|
7694
|
-
e.preventDefault();
|
|
7695
|
-
this.execute(this.cache.order);
|
|
7696
|
-
}
|
|
7697
|
-
});
|
|
7698
|
-
}
|
|
7699
|
-
else {
|
|
7700
|
-
this.Input.onKeyDown(e=>{
|
|
7701
|
-
if(e.kd==="Enter"){
|
|
7702
|
-
if(e.event.shiftKey){
|
|
7703
|
-
e.event.preventDefault();
|
|
7704
|
-
this.execute(this.cache.order);
|
|
7705
|
-
}
|
|
7706
|
-
}
|
|
7707
|
-
if(this.cache.parent instanceof ZikoUICodeNote){
|
|
7708
|
-
if(e.kd==="ArrowDown" && e.event.shiftKey ){
|
|
7709
|
-
this.cache.parent.next();
|
|
7710
|
-
}
|
|
7711
|
-
if(e.kd==="ArrowUp" && e.event.shiftKey){
|
|
7712
|
-
this.cache.parent.previous();
|
|
7713
|
-
}
|
|
7714
|
-
}
|
|
7715
|
-
}
|
|
7716
|
-
);
|
|
7717
|
-
this.Input.onFocus(()=>{
|
|
7718
|
-
if(this.cache.parent instanceof ZikoUICodeNote){
|
|
7719
|
-
this.cache.parent.cache.currentNote=this;
|
|
7720
|
-
this.cache.parent.setCurrentNote(this);
|
|
7721
|
-
}
|
|
7722
|
-
});
|
|
7723
|
-
this.Input.onPaste((e)=>{
|
|
7724
|
-
//e.event.preventDefault();
|
|
7725
|
-
//this.setValue(this.codeText.trim())
|
|
7726
|
-
});
|
|
7727
|
-
// this.Input.onKeyPress(e=>{
|
|
7728
|
-
// if(e.kp==="(")a.Input.element.textContent+=")";
|
|
7729
|
-
// if(e.kp==="[")a.Input.element.textContent+="]";
|
|
7730
|
-
// if(e.kp==="{")a.Input.element.textContent+="}";
|
|
7731
|
-
// })
|
|
7732
|
-
}
|
|
7733
|
-
}
|
|
7734
|
-
get isCodeCell(){
|
|
7735
|
-
return true;
|
|
7736
|
-
}
|
|
7737
|
-
// space  
|
|
7738
|
-
get codeText() {
|
|
7739
|
-
return (this.Input.element.getElementsByClassName("cm-content")[0])
|
|
7740
|
-
?this.Input.element.getElementsByClassName("cm-content")[0].innerText.trim()
|
|
7741
|
-
:this.Input.element.innerText.trim()
|
|
7742
|
-
// return this.Input.element.innerText.trim();
|
|
7743
|
-
}
|
|
7744
|
-
get codeHTML() {
|
|
7745
|
-
return this.Input.element.innerHTML;
|
|
7746
|
-
}
|
|
7747
|
-
get outputHTML(){
|
|
7748
|
-
return this.Output.element.innerHTML;
|
|
7749
|
-
}
|
|
7750
|
-
setValue(codeText){
|
|
7751
|
-
this.Input[0].setValue(codeText);
|
|
7752
|
-
return this;
|
|
7753
|
-
}
|
|
7754
|
-
cellData(){
|
|
7755
|
-
return {
|
|
7756
|
-
input:this.codeText,
|
|
7757
|
-
output:this.outputHTML,
|
|
7758
|
-
order:this.cache.order,
|
|
7759
|
-
type:this.cache.type
|
|
7760
|
-
}
|
|
7761
|
-
}
|
|
7762
|
-
execute(order){
|
|
7763
|
-
this.clearOutput();
|
|
7764
|
-
this.evaluate(order);
|
|
7765
|
-
this.cache.metadata.updated=Date.now();
|
|
7766
|
-
return this;
|
|
7767
|
-
}
|
|
7768
|
-
#evaluateJs(order){
|
|
7769
|
-
try{
|
|
7770
|
-
this.LeftControl[0].setValue("pending");
|
|
7771
|
-
this.cache.state="pending";
|
|
7772
|
-
// globalThis.eval(this.Input.element.innerText);
|
|
7773
|
-
globalThis.eval(this.codeText);
|
|
7774
|
-
|
|
7775
|
-
}
|
|
7776
|
-
catch(err){
|
|
7777
|
-
console.log(err);
|
|
7778
|
-
text(`Error : ${err.message}`).style({
|
|
7779
|
-
color:"red",
|
|
7780
|
-
background:"gold",
|
|
7781
|
-
border:"2px red solid",
|
|
7782
|
-
padding:"10px",
|
|
7783
|
-
margin:"10px 0",
|
|
7784
|
-
display:"flex",
|
|
7785
|
-
justifyContent: "center",
|
|
7786
|
-
});
|
|
7787
|
-
this.LeftControl[0].setValue("Err");
|
|
7788
|
-
this.cache.state="Error";
|
|
7789
|
-
}
|
|
7790
|
-
finally{
|
|
7791
|
-
if(this.cache.state==="pending"){
|
|
7792
|
-
this.cache.state="success";
|
|
7793
|
-
this.setOrder(order);
|
|
7794
|
-
if(this.cache.parent instanceof ZikoUICodeNote){
|
|
7795
|
-
this.cache.parent.incrementOrder();
|
|
7796
|
-
this.cache.parent.next();
|
|
7797
|
-
}
|
|
7798
|
-
}
|
|
7799
|
-
}
|
|
7800
|
-
}
|
|
7801
|
-
#evaluateMd(){
|
|
7802
|
-
|
|
7803
|
-
}
|
|
7804
|
-
#evaluateHtml(){
|
|
7805
|
-
|
|
7806
|
-
}
|
|
7807
|
-
evaluate(order){
|
|
7808
|
-
globalThis.__Ziko__.__Config__.default.target=this.Output.element;
|
|
7809
|
-
switch(this.cache.type){
|
|
7810
|
-
case "js":this.#evaluateJs(order);break;
|
|
7811
|
-
}
|
|
7812
|
-
return this;
|
|
7813
|
-
}
|
|
7814
|
-
clearInput(){
|
|
7815
|
-
this.Output.element.innerText="";
|
|
7816
|
-
return this;
|
|
7817
|
-
}
|
|
7818
|
-
clearOutput(){
|
|
7819
|
-
this.Output.element.innerText="";
|
|
7820
|
-
return this;
|
|
7821
|
-
}
|
|
7822
|
-
setOrder(order,render=true){
|
|
7823
|
-
this.cache.order=order;
|
|
7824
|
-
if(render){
|
|
7825
|
-
(typeof order === "number")?this.LeftControl[0].setValue(`[${order}]`):this.LeftControl[0].setValue("[-]");
|
|
7826
|
-
}
|
|
7827
|
-
return this;
|
|
7828
|
-
}
|
|
7829
|
-
focus(){
|
|
7830
|
-
this.Input.element.focus();
|
|
7831
|
-
return this;
|
|
7832
|
-
}
|
|
7833
|
-
}
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
const CodeCell=(codeText,{type,order}={})=>new ZikoUICodeCell(codeText,{type,order});
|
|
7837
|
-
|
|
7838
|
-
// Next
|
|
7839
|
-
// Previous
|
|
7840
|
-
// Vertical
|
|
7841
|
-
// Horizontal
|
|
7842
|
-
class ZikoUITabs extends ZikoUIFlex{
|
|
7843
|
-
#ACTIVE_ELEMENT_INDEX=0;
|
|
7844
|
-
constructor(Controllers,Contents){
|
|
7845
|
-
super("div","Tabs");
|
|
7846
|
-
Object.assign(this.cache,{
|
|
7847
|
-
config:{
|
|
7848
|
-
controllersPercent : .50
|
|
7849
|
-
}
|
|
7850
|
-
});
|
|
7851
|
-
this.style({
|
|
7852
|
-
boxSizing:"border-box",
|
|
7853
|
-
backgroundColor: "blanchedalmond",
|
|
7854
|
-
border:"1px red solid",
|
|
7855
|
-
margin:"30px",
|
|
7856
|
-
});
|
|
7857
|
-
this.controllersContainer = Flex().size("auto","auto").style({
|
|
7858
|
-
boxSizing:"border-box",
|
|
7859
|
-
justifyContent:"center",
|
|
7860
|
-
alignItems:"center",
|
|
7861
|
-
textAlign:"center",
|
|
7862
|
-
|
|
7863
|
-
minWidth:"50px",
|
|
7864
|
-
minHeight:"50px",
|
|
7865
|
-
|
|
7866
|
-
backgroundColor:"darkblue",
|
|
7867
|
-
border:"1px darkblue solid",
|
|
7868
|
-
|
|
7869
|
-
}).setAttr("role","tablist");
|
|
7870
|
-
this.contentContainer = Flex().style({
|
|
7871
|
-
boxSizing:"border-box",
|
|
7872
|
-
justifyContent:"center",
|
|
7873
|
-
alignItems:"center",
|
|
7874
|
-
textAlign:"center",
|
|
7875
|
-
|
|
7876
|
-
width:"100%",
|
|
7877
|
-
height:"100%",
|
|
7878
|
-
backgroundColor:"darkslategrey",
|
|
7879
|
-
});
|
|
7880
|
-
this.append(
|
|
7881
|
-
this.controllersContainer,
|
|
7882
|
-
this.contentContainer
|
|
7883
|
-
);
|
|
7884
|
-
if(Controllers.length!==Contents.length)console.error("");
|
|
7885
|
-
else {
|
|
7886
|
-
this.controllersContainer.append(...Controllers);
|
|
7887
|
-
this.contentContainer.append(...Contents);
|
|
7888
|
-
}
|
|
7889
|
-
this.init();
|
|
7890
|
-
this.display(0);
|
|
7891
|
-
this.useVertical();
|
|
7892
|
-
}
|
|
7893
|
-
get isTabs(){
|
|
7894
|
-
return true;
|
|
7895
|
-
}
|
|
7896
|
-
init(){
|
|
7897
|
-
// Remove old listener
|
|
7898
|
-
for(let i=0;i<this.controllersContainer.length;i++){
|
|
7899
|
-
this.controllersContainer[i].setAttr("role","tab").setAttr("aria-controls",`tab${i}`);
|
|
7900
|
-
this.contentContainer[i].setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${i}`).setAttr("tabindex",-1);
|
|
7901
|
-
}
|
|
7902
|
-
this.controllersContainer.forEach(item=>item.onClick(e=>{
|
|
7903
|
-
const tab=e.target.element.getAttribute("aria-controls");
|
|
7904
|
-
const index=+tab.slice(3);
|
|
7905
|
-
this.contentContainer.filter(n=>n.element.getAttribute("aria-labelledby")===tab,()=>{
|
|
7906
|
-
if(this.#ACTIVE_ELEMENT_INDEX!==index)this.display(index);
|
|
7907
|
-
});
|
|
7908
|
-
}));
|
|
7909
|
-
return this;
|
|
7910
|
-
}
|
|
7911
|
-
addPairs(ControllerItem,ContentItem){
|
|
7912
|
-
this.controllersContainer.append(ControllerItem);
|
|
7913
|
-
this.contentContainer.append(ContentItem);
|
|
7914
|
-
const length=this.controllersContainer.length;
|
|
7915
|
-
this.controllersContainer.at(-1).setAttr("role","tab").setAttr("aria-controls",`tab${length-1}`);
|
|
7916
|
-
this.contentContainer.at(-1).setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${length-1}`).setAttr("tabindex",-1);
|
|
7917
|
-
// Add listener
|
|
7918
|
-
return this;
|
|
7919
|
-
}
|
|
7920
|
-
removePairs(index){
|
|
7921
|
-
|
|
7922
|
-
}
|
|
7923
|
-
display(index){
|
|
7924
|
-
this.#ACTIVE_ELEMENT_INDEX=index%this.contentContainer.length;
|
|
7925
|
-
const ActiveContent = this.contentContainer.at(this.#ACTIVE_ELEMENT_INDEX);
|
|
7926
|
-
this.controllersContainer.forEach(n=>n.setAttr("tabindex",-1).setAttr("aria-selected",false));
|
|
7927
|
-
this.controllersContainer.at(this.#ACTIVE_ELEMENT_INDEX).setAttr("tabindex",0).setAttr("aria-selected",true);
|
|
7928
|
-
|
|
7929
|
-
this.contentContainer.forEach(n=>n.st.hide());
|
|
7930
|
-
|
|
7931
|
-
ActiveContent.st.translateX(100,0);
|
|
7932
|
-
ActiveContent.setAttr("tabindex",0).st.show();
|
|
7933
|
-
ActiveContent.st.translateX(0,1000);
|
|
7934
|
-
|
|
7935
|
-
return this;
|
|
7936
|
-
}
|
|
7937
|
-
next(i=1){
|
|
7938
|
-
this.display(this.#ACTIVE_ELEMENT_INDEX+i);
|
|
7939
|
-
return this;
|
|
7940
|
-
}
|
|
7941
|
-
previous(i=1){
|
|
7942
|
-
this.display(this.#ACTIVE_ELEMENT_INDEX-i);
|
|
7943
|
-
return this;
|
|
7944
|
-
}
|
|
7945
|
-
useVertical(){
|
|
7946
|
-
this.vertical(0,0);
|
|
7947
|
-
this.controllersContainer.horizontal(0,0);
|
|
7948
|
-
this.controllersContainer.style({
|
|
7949
|
-
width : "100%",
|
|
7950
|
-
height : `${this.cache.config.controllersPercent*100}%`
|
|
7951
|
-
});
|
|
7952
|
-
this.contentContainer.style({
|
|
7953
|
-
width : "100%",
|
|
7954
|
-
height : `${(1-this.cache.config.controllersPercent)*100}%`
|
|
7955
|
-
});
|
|
7956
|
-
return this;
|
|
7957
|
-
}
|
|
7958
|
-
useHorizontal(){
|
|
7959
|
-
this.horizontal(0,0);
|
|
7960
|
-
this.controllersContainer.vertical(0, 0);
|
|
7961
|
-
this.controllersContainer.style({
|
|
7962
|
-
height : "100%",
|
|
7963
|
-
width : `${this.cache.config.controllersPercent*100}%`
|
|
7964
|
-
});
|
|
7965
|
-
this.contentContainer.style({
|
|
7966
|
-
height : "100%",
|
|
7967
|
-
width : `${(1-this.cache.config.controllersPercent)*100}%`
|
|
7968
|
-
});
|
|
7969
|
-
return this;
|
|
7970
|
-
}
|
|
7971
|
-
// useHorizontalSwippe(){
|
|
7972
|
-
// this.onPtrDown();
|
|
7973
|
-
// this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_x)));
|
|
7974
|
-
// return this;
|
|
7975
|
-
// }
|
|
7976
|
-
// useVerticalSwippe(){
|
|
7977
|
-
// this.onPtrDown();
|
|
7978
|
-
// this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_y)));
|
|
7979
|
-
// return this;
|
|
7980
|
-
// }
|
|
7981
|
-
}
|
|
7982
|
-
|
|
7983
|
-
const Tabs=(Controllers,Contents)=>new ZikoUITabs(Controllers,Contents);
|
|
7984
|
-
|
|
7985
|
-
/*
|
|
7986
|
-
|
|
7987
|
-
const cont=(txt = "A")=>btn(txt).style({width:"170px"})
|
|
7988
|
-
a=Tabs(
|
|
7989
|
-
[cont("A1"),cont("A2"),cont("A3"),cont("A4")],
|
|
7990
|
-
[cont("A1"),cont("A2"),cont("A3"),cont("A4")]
|
|
7991
|
-
).vertical().size("400px")
|
|
7992
|
-
a.controllersContainer.style({
|
|
7993
|
-
overflowX:"auto"
|
|
7994
|
-
})
|
|
7995
|
-
a.useHorizontal()
|
|
7996
|
-
|
|
7997
|
-
*/
|
|
7998
|
-
|
|
7999
|
-
/*
|
|
8000
|
-
|
|
8001
|
-
a=Flex().size("400px","400px").style({background:"red"})
|
|
8002
|
-
a.element.animate([
|
|
8003
|
-
{ borderRadius: "0" , background : "red" },
|
|
8004
|
-
{ borderRadius: "50% 0" },
|
|
8005
|
-
{ borderRadius: "50% 50%" },
|
|
8006
|
-
{ borderRadius: "0 50%" },
|
|
8007
|
-
{ borderRadius: "0", background : "yellow" },
|
|
8008
|
-
],
|
|
8009
|
-
{
|
|
8010
|
-
// temporisation
|
|
8011
|
-
duration: 2000,
|
|
8012
|
-
iterations: Infinity,
|
|
8013
|
-
})
|
|
8014
|
-
|
|
8015
|
-
*/
|
|
8016
|
-
|
|
8017
|
-
const palette = {
|
|
8018
|
-
success: {
|
|
8019
|
-
titleColor:"green",
|
|
8020
|
-
contentColor: "#35495e",
|
|
8021
|
-
bgColor: "#d4edda", // Fixed
|
|
8022
|
-
bgColor:"linear-gradient(-225deg, #DFFFCD 0%, #90F9C4 48%, #39F3BB 100%)",
|
|
8023
|
-
borderColor: "#28a745", // Fixed
|
|
8024
|
-
icon: "✅"
|
|
8025
|
-
},
|
|
8026
|
-
info: {
|
|
8027
|
-
titleColor:"blue",
|
|
8028
|
-
contentColor: "#00204a",
|
|
8029
|
-
bgColor: "#93deff", // Fixed
|
|
8030
|
-
bgColor:"radial-gradient(circle at 10% 20%, rgb(147, 230, 241) 0%, rgb(145, 192, 241) 45.5%)",
|
|
8031
|
-
borderColor: "#005689", // Fixed
|
|
8032
|
-
icon: "ℹ️"
|
|
8033
|
-
},
|
|
8034
|
-
warning: {
|
|
8035
|
-
titleColor:"#e4663a",
|
|
8036
|
-
contentColor: "#45171d",
|
|
8037
|
-
bgColor:"#fdffcd",
|
|
8038
|
-
bgColor:"radial-gradient(907px at 3.4% 19.8%, rgb(255, 243, 122) 0%, rgb(255, 102, 145) 97.4%)",
|
|
8039
|
-
borderColor: "#efd510",
|
|
8040
|
-
icon: "⚠️"
|
|
8041
|
-
},
|
|
8042
|
-
danger: {
|
|
8043
|
-
titleColor:"red",
|
|
8044
|
-
contentColor: "#721c24",
|
|
8045
|
-
bgColor: "#f8d7da", // Fixed
|
|
8046
|
-
bgColor:"linear-gradient(90deg, rgb(255, 157, 129) 24.3%, rgb(255, 138, 138) 78.3%)",
|
|
8047
|
-
borderColor: "#c50000", // Fixed
|
|
8048
|
-
icon: "❌"
|
|
8049
|
-
},
|
|
8050
|
-
tips: {
|
|
8051
|
-
titleColor:null,
|
|
8052
|
-
contentColor: null,
|
|
8053
|
-
bgColor: null,
|
|
8054
|
-
borderColor: null,
|
|
8055
|
-
icon: "💡"
|
|
8056
|
-
},
|
|
8057
|
-
important: {
|
|
8058
|
-
titleColor:null,
|
|
8059
|
-
contentColor: null,
|
|
8060
|
-
bgColor: null,
|
|
8061
|
-
borderColor: null,
|
|
8062
|
-
icon: "📌"
|
|
8063
|
-
},
|
|
8064
|
-
|
|
8065
|
-
};
|
|
8066
|
-
|
|
8067
|
-
class ZikoUIAlert extends ZikoUIFlex$1{
|
|
8068
|
-
constructor(type, title, content){
|
|
8069
|
-
super();
|
|
8070
|
-
this.title = h3(title);
|
|
8071
|
-
this.icon = text$1(palette[type].icon).style({
|
|
8072
|
-
display: "flex",
|
|
8073
|
-
justifyContent:"center",
|
|
8074
|
-
borderRadius:"50%",
|
|
8075
|
-
minWidth:"30px",
|
|
8076
|
-
minHeight:"30px",
|
|
8077
|
-
});
|
|
8078
|
-
this.content = content;
|
|
8079
|
-
this.vertical()
|
|
8080
|
-
.size("200px", "auto")
|
|
8081
|
-
.style({
|
|
8082
|
-
borderRadius:"10px",
|
|
8083
|
-
padding:"10px"
|
|
8084
|
-
});
|
|
8085
|
-
this.append(
|
|
8086
|
-
Flex$1(
|
|
8087
|
-
this.title,
|
|
8088
|
-
this.icon
|
|
8089
|
-
).size("100%", "40px").style({}).horizontal("space-between",0),
|
|
8090
|
-
this.content
|
|
8091
|
-
);
|
|
8092
|
-
this.useType(type);
|
|
8093
|
-
}
|
|
8094
|
-
get isAlert(){
|
|
8095
|
-
return true;
|
|
8096
|
-
}
|
|
8097
|
-
useType(type){
|
|
8098
|
-
this.style({
|
|
8099
|
-
color:palette[type].color,
|
|
8100
|
-
background:palette[type].bgColor,
|
|
8101
|
-
border: `1px darkblue solid`,
|
|
8102
|
-
borderLeft: `15px ${palette[type].borderColor} solid`,
|
|
8103
|
-
});
|
|
8104
|
-
this.title.style({
|
|
8105
|
-
color:palette[type].titleColor
|
|
8106
|
-
});
|
|
8107
|
-
this.content.st.color(palette[type].titleColor);
|
|
8108
|
-
this.icon.setValue(palette[type].icon).style({
|
|
8109
|
-
border:`2px ${palette[type].borderColor} solid`,
|
|
8110
|
-
alignItems: type==="warning"?"flex-start":"center",
|
|
8111
|
-
});
|
|
8112
|
-
return this;
|
|
8113
|
-
}
|
|
8114
|
-
useSuccess(){
|
|
8115
|
-
this.useType("success");
|
|
8116
|
-
return this;
|
|
8117
|
-
}
|
|
8118
|
-
useInfo(){
|
|
8119
|
-
this.useType("info");
|
|
8120
|
-
return this;
|
|
8121
|
-
}
|
|
8122
|
-
useWarning(){
|
|
8123
|
-
this.useType("warning");
|
|
8124
|
-
return this;
|
|
8125
|
-
}
|
|
8126
|
-
useDanger(){
|
|
8127
|
-
this.useType("danger");
|
|
8128
|
-
return this;
|
|
8129
|
-
}
|
|
8130
|
-
}
|
|
8131
|
-
|
|
8132
|
-
const successAlert=(title, content)=>new ZikoUIAlert("success", title, content);
|
|
8133
|
-
const infoAlert=(title, content)=>new ZikoUIAlert("info", title, content);
|
|
8134
|
-
const warningAlert=(title, content)=>new ZikoUIAlert("warning", title, content);
|
|
8135
|
-
const dangerAlert=(title, content)=>new ZikoUIAlert("danger", title, content);
|
|
8136
|
-
|
|
8137
|
-
class __ZikoUISplitter__ extends ZikoUIElement{
|
|
8138
|
-
constructor(flexDirection, resizerCursor, resizerProp){
|
|
8139
|
-
super("div", "Splitter");
|
|
8140
|
-
Object.assign(this.cache,{
|
|
8141
|
-
isResizing : false,
|
|
8142
|
-
flexDirection,
|
|
8143
|
-
resizerCursor,
|
|
8144
|
-
resizerProp
|
|
8145
|
-
});
|
|
8146
|
-
this.style({
|
|
8147
|
-
display:"flex",
|
|
8148
|
-
flexDirection : this.cache.flexDirection,
|
|
8149
|
-
border: "2px solid #333",
|
|
8150
|
-
overflow: "hidden"
|
|
8151
|
-
});
|
|
8152
|
-
this.resizer = new ZikoUIElement("div", "resizer").style({
|
|
8153
|
-
[this.cache.resizerProp]:"5px",
|
|
8154
|
-
backgroundColor: "gold",
|
|
8155
|
-
cursor: this.cache.resizerCursor,
|
|
8156
|
-
touchAction: "none",
|
|
8157
|
-
});
|
|
8158
|
-
this.onPtrDown(e=>{
|
|
8159
|
-
this.cache.isResizing = true;
|
|
8160
|
-
this.style({
|
|
8161
|
-
cursor : this.cache.resizerCursor // ns-resize
|
|
8162
|
-
});
|
|
8163
|
-
this.resizer.element.setPointerCapture(e.event.pointerId);
|
|
8164
|
-
});
|
|
8165
|
-
this.onPtrUp(e=>{
|
|
8166
|
-
this.cache.isResizing = false;
|
|
8167
|
-
this.style({
|
|
8168
|
-
cursor: "default"
|
|
8169
|
-
});
|
|
8170
|
-
this.resizer.element.releasePointerCapture(e.event.pointerId);
|
|
8171
|
-
});
|
|
8172
|
-
this.onPtrCancel(()=>{
|
|
8173
|
-
this.cache.isResizing = false;
|
|
8174
|
-
this.style({
|
|
8175
|
-
cursor: "default"
|
|
8176
|
-
});
|
|
8177
|
-
});
|
|
8178
|
-
this.onPtrOut(()=>{
|
|
8179
|
-
if (this.cache.isResizing) {
|
|
8180
|
-
this.cache.isResizing = false;
|
|
8181
|
-
this.style({
|
|
8182
|
-
cursor: "default"
|
|
8183
|
-
});
|
|
8184
|
-
}
|
|
8185
|
-
});
|
|
8186
|
-
}
|
|
8187
|
-
get isSplitter(){
|
|
8188
|
-
return true;
|
|
8189
|
-
}
|
|
8190
|
-
styleResizer(style={}){
|
|
8191
|
-
this.resizer.style(style);
|
|
8192
|
-
return this;
|
|
8193
|
-
}
|
|
8194
|
-
}
|
|
8195
|
-
|
|
8196
|
-
class ZikoUIHorizontalSplitter extends __ZikoUISplitter__{
|
|
8197
|
-
constructor(leftPane, rightPane){
|
|
8198
|
-
super("row", "ew-resize", "width");
|
|
8199
|
-
this.leftPane = leftPane.style({
|
|
8200
|
-
width:"50%",
|
|
8201
|
-
flexGrow: 1,
|
|
8202
|
-
overflow: "hidden"
|
|
8203
|
-
});
|
|
8204
|
-
this.rightPane = rightPane.style({
|
|
8205
|
-
width:"50%",
|
|
8206
|
-
flexGrow: 1,
|
|
8207
|
-
overflow: "hidden"
|
|
8208
|
-
});
|
|
8209
|
-
this.element?.append(
|
|
8210
|
-
this.leftPane.element,
|
|
8211
|
-
this.resizer.element,
|
|
8212
|
-
this.rightPane.element
|
|
8213
|
-
);
|
|
8214
|
-
this.onPtrMove(e=>{
|
|
8215
|
-
if (!this.cache.isResizing) return;
|
|
8216
|
-
const containerWidth = this.element.getBoundingClientRect().width; // height
|
|
8217
|
-
const pointerRelativeXpos = e.event.clientX - this.element.getBoundingClientRect().x; // y
|
|
8218
|
-
let newLeftPaneWidth = (pointerRelativeXpos / containerWidth) * 100;
|
|
8219
|
-
let newRightPaneWidth = 100 - newLeftPaneWidth;
|
|
8220
|
-
if (newLeftPaneWidth < 0) newLeftPaneWidth = 0;
|
|
8221
|
-
if (newRightPaneWidth < 0) newRightPaneWidth = 0;
|
|
8222
|
-
this.leftPane.element.style.width = `${newLeftPaneWidth}%`;
|
|
8223
|
-
this.rightPane.element.style.width = `${newRightPaneWidth}%`;
|
|
8224
|
-
});
|
|
8225
|
-
}
|
|
8226
|
-
get isHorizontalSplitter(){
|
|
8227
|
-
return true;
|
|
8228
|
-
}
|
|
8229
|
-
}
|
|
8230
|
-
const hSplitter=(leftPane, rightPane)=>new ZikoUIHorizontalSplitter(leftPane, rightPane);
|
|
8231
|
-
|
|
8232
|
-
class ZikoUIVerticalSplitter extends __ZikoUISplitter__{
|
|
8233
|
-
constructor(topPane, bottomPane){
|
|
8234
|
-
super("column", "ns-resize", "height");
|
|
8235
|
-
this.topPane = topPane.style({
|
|
8236
|
-
height:"50%",
|
|
8237
|
-
flexGrow: 1,
|
|
8238
|
-
overflow: "hidden"
|
|
8239
|
-
});
|
|
8240
|
-
this.bottomPane = bottomPane.style({
|
|
8241
|
-
height:"50%",
|
|
8242
|
-
flexGrow: 1,
|
|
8243
|
-
overflow: "hidden"
|
|
8244
|
-
});
|
|
8245
|
-
this.element?.append(
|
|
8246
|
-
this.topPane.element,
|
|
8247
|
-
this.resizer.element,
|
|
8248
|
-
this.bottomPane.element
|
|
8249
|
-
);
|
|
8250
|
-
this.onPtrMove(e=>{
|
|
8251
|
-
if (!this.cache.isResizing) return;
|
|
8252
|
-
const containerHeight = this.element.getBoundingClientRect().height; // height
|
|
8253
|
-
const pointerRelativeYpos = e.event.clientY - this.element.getBoundingClientRect().y; // y
|
|
8254
|
-
let newTopPaneHeight = (pointerRelativeYpos / containerHeight) * 100;
|
|
8255
|
-
let newBottomPaneHeight = 100 - newTopPaneHeight;
|
|
8256
|
-
if (newTopPaneHeight < 0) newTopPaneHeight = 0;
|
|
8257
|
-
if (newBottomPaneHeight < 0) newBottomPaneHeight = 0;
|
|
8258
|
-
this.topPane.element.style.height = `${newTopPaneHeight}%`;
|
|
8259
|
-
this.bottomPane.element.style.height = `${newBottomPaneHeight}%`;
|
|
8260
|
-
});
|
|
8261
|
-
}
|
|
8262
|
-
get isHorizontalSplitter(){
|
|
8263
|
-
return true;
|
|
8264
|
-
}
|
|
8265
|
-
}
|
|
8266
|
-
const vSplitter=(topPane, bottomPane)=>new ZikoUIVerticalSplitter(topPane, bottomPane);
|
|
8267
|
-
|
|
8268
|
-
const Splitter = ({orintation = "horizontal",slides = []}) =>{
|
|
8269
|
-
if(["v","vertical"].includes(orintation.toLowerCase())) return vSplitter(...slides);
|
|
8270
|
-
else if(["h","horizontal"].includes(orintation.toLowerCase())) return hSplitter(...slides);
|
|
8271
|
-
else ;
|
|
8272
|
-
};
|
|
8273
|
-
|
|
8274
|
-
class ZikoUIBreadcrumbs extends ZikoUIElement{
|
|
8275
|
-
constructor(...items){
|
|
8276
|
-
super("ul", "Breadcrumbs");
|
|
8277
|
-
Object.assign(this.cache,{
|
|
8278
|
-
separatorTextContent:"/"
|
|
8279
|
-
});
|
|
8280
|
-
this.style({
|
|
8281
|
-
listStyle: "none",
|
|
8282
|
-
display: "flex",
|
|
8283
|
-
flexWrap: "wrap"
|
|
8284
|
-
});
|
|
8285
|
-
this.list=html('li').style({
|
|
8286
|
-
display: "flex",
|
|
8287
|
-
flexWrap: "wrap"
|
|
8288
|
-
});
|
|
8289
|
-
this.append(...items);
|
|
8290
|
-
}
|
|
8291
|
-
#addItem(item){
|
|
8292
|
-
if(["string","number","boolean"].includes(typeof item))item = text$1(item);
|
|
8293
|
-
const li = html("li", item).style({
|
|
8294
|
-
display: "flex",
|
|
8295
|
-
alignItems: "center"
|
|
8296
|
-
});
|
|
8297
|
-
if(this.element.children.length>0){
|
|
8298
|
-
const separator = text$1(this.cache.separatorTextContent).style({
|
|
8299
|
-
padding: "0 4px"
|
|
8300
|
-
});
|
|
8301
|
-
this.element?.append(separator.element);
|
|
8302
|
-
}
|
|
8303
|
-
this.element?.append(li.element);
|
|
8304
|
-
}
|
|
8305
|
-
append(...items){
|
|
8306
|
-
items.forEach(n=>this.#addItem(n));
|
|
8307
|
-
return this;
|
|
8308
|
-
}
|
|
8309
|
-
configSeparator(separatorTextContent = this.cache.separator, style = {}){
|
|
8310
|
-
this.cache.separatorTextContent = separatorTextContent;
|
|
8311
|
-
const separators = [...this.element.children].filter(n=>n.tagName==="SPAN");
|
|
8312
|
-
separators.forEach(node=>{
|
|
8313
|
-
node.textContent = separatorTextContent;
|
|
8314
|
-
Object.assign(node.style, style);
|
|
8315
|
-
}
|
|
8316
|
-
);
|
|
8317
|
-
return this;
|
|
8318
|
-
}
|
|
8319
|
-
}
|
|
8320
|
-
const Breadcrumbs=(...items)=>new ZikoUIBreadcrumbs(...items);
|
|
8321
|
-
|
|
8322
|
-
class ZikoUIMenu3d extends ZikoUIFlex$1{
|
|
8323
|
-
constructor(controller, content){
|
|
8324
|
-
super("div", "menu3d");
|
|
8325
|
-
this.controller = controller;
|
|
8326
|
-
this.content = content;
|
|
8327
|
-
this.cover = null;
|
|
8328
|
-
Object.assign(this.cache,{
|
|
8329
|
-
config:{
|
|
8330
|
-
useTransfo : false,
|
|
8331
|
-
isOpen : false,
|
|
8332
|
-
position : "left",
|
|
8333
|
-
threshold : 40,
|
|
8334
|
-
angle : 70,
|
|
8335
|
-
overlap : 6,
|
|
8336
|
-
width : 300,
|
|
8337
|
-
height : 300,
|
|
8338
|
-
transitionDuration: '0.5s',
|
|
8339
|
-
transitionEasing: 'ease',
|
|
8340
|
-
menuTransformOrigin : null,
|
|
8341
|
-
menuTransformClosed : null,
|
|
8342
|
-
menuTransformOpened : null,
|
|
8343
|
-
contentTransformOrigin : null,
|
|
8344
|
-
contentTransformClosed : null,
|
|
8345
|
-
contentTransformOpened : null,
|
|
8346
|
-
}
|
|
8347
|
-
});
|
|
8348
|
-
this.append(
|
|
8349
|
-
this.controller,
|
|
8350
|
-
this.content
|
|
8351
|
-
);
|
|
8352
|
-
this.update();
|
|
8353
|
-
}
|
|
8354
|
-
get isOpen(){
|
|
8355
|
-
return this.cache.config.isOpen;
|
|
8356
|
-
}
|
|
8357
|
-
update(){
|
|
8358
|
-
this.controller.style({
|
|
8359
|
-
display:"none",
|
|
8360
|
-
padding:"20px",
|
|
8361
|
-
overflow:"auto",
|
|
8362
|
-
background:"darkblue",
|
|
8363
|
-
color: "#eee",
|
|
8364
|
-
webkitboxSizing: "border-box",
|
|
8365
|
-
mozBoxSizing: "border-box",
|
|
8366
|
-
boxSizing:"border-box",
|
|
8367
|
-
});
|
|
8368
|
-
this.content.style({
|
|
8369
|
-
padding:"20px 40px",
|
|
8370
|
-
width: "100%",
|
|
8371
|
-
height: "100%",
|
|
8372
|
-
// overflowY:"auto",
|
|
8373
|
-
background:"gold",
|
|
8374
|
-
color: "#eee",
|
|
8375
|
-
webkitboxSizing: "border-box",
|
|
8376
|
-
mozBoxSizing: "border-box",
|
|
8377
|
-
boxSizing:"border-box",
|
|
8378
|
-
webkitOverflowScrolling:"touch",
|
|
8379
|
-
webkitTransformStyle: "preserve-3d"
|
|
8380
|
-
});
|
|
8381
|
-
this.setupPositions();
|
|
8382
|
-
this.setupWrapper();
|
|
8383
|
-
this.setupCover();
|
|
8384
|
-
this.setupMenu();
|
|
8385
|
-
this.setupContent();
|
|
8386
|
-
}
|
|
8387
|
-
setupPositions() {
|
|
8388
|
-
this.cache.config.menuTransformOpened = '';
|
|
8389
|
-
this.cache.config.contentTransformClosed = '';
|
|
8390
|
-
let menuAngle = this.cache.config.angle;
|
|
8391
|
-
let contentAngle = this.cache.config.angle / -2;
|
|
8392
|
-
switch( this.cache.config.position ) {
|
|
8393
|
-
case "top":
|
|
8394
|
-
this.cache.config.menuTransformOrigin = '50% 0%';
|
|
8395
|
-
this.cache.config.menuTransformClosed = `rotateX(${menuAngle}deg) translateY(-100%) translateY(${this.cache.config.overlap}px)`;
|
|
8396
|
-
this.cache.config.contentTransformOrigin = '50% 0';
|
|
8397
|
-
this.cache.config.contentTransformOpened = `translateY(${this.height/2}px) rotateX(${contentAngle}deg)`;
|
|
8398
|
-
break;
|
|
8399
|
-
case "right":
|
|
8400
|
-
this.cache.config.menuTransformOrigin = '100% 50%';
|
|
8401
|
-
this.cache.config.menuTransformClosed = 'rotateY( ' + menuAngle + 'deg ) translateX( 100% ) translateX( -2px ) scale( 1.01 )';
|
|
8402
|
-
this.cache.config.contentTransformOrigin = '100% 50%';
|
|
8403
|
-
this.cache.config.contentTransformOpened = 'translateX( -'+ this.width/2 +'px ) rotateY( ' + contentAngle + 'deg )';
|
|
8404
|
-
break;
|
|
8405
|
-
case "bottom":
|
|
8406
|
-
this.cache.config.menuTransformOrigin = '50% 100%';
|
|
8407
|
-
this.cache.config.menuTransformClosed = 'rotateX( ' + -menuAngle + 'deg ) translateY( 100% ) translateY( -'+ this.cache.config.overlap +'px )';
|
|
8408
|
-
this.cache.config.contentTransformOrigin = '50% 100%';
|
|
8409
|
-
this.cache.config.contentTransformOpened = 'translateY( -'+ this.height/2 +'px ) rotateX( ' + -contentAngle + 'deg )';
|
|
8410
|
-
break;
|
|
8411
|
-
default:
|
|
8412
|
-
this.cache.config.menuTransformOrigin = '100% 50%';
|
|
8413
|
-
this.cache.config.menuTransformClosed = 'translateX( -100% ) translateX( '+ this.cache.config.overlap +'px ) scale( 1.01 ) rotateY( ' + -menuAngle + 'deg )';
|
|
8414
|
-
this.cache.config.contentTransformOrigin = '0 50%';
|
|
8415
|
-
this.cache.config.contentTransformOpened = 'translateX( '+ this.width/2 +'px ) rotateY( ' + -contentAngle + 'deg )';
|
|
8416
|
-
break;
|
|
8417
|
-
}
|
|
8418
|
-
}
|
|
8419
|
-
setupWrapper() {
|
|
8420
|
-
this.style({
|
|
8421
|
-
perspective : "800px",
|
|
8422
|
-
perspectiveOrigin : this.cache.config.contentTransformOrigin
|
|
8423
|
-
});
|
|
8424
|
-
}
|
|
8425
|
-
setupCover(){
|
|
8426
|
-
if( this.cover ) this.cover.element.parentNode.removeChild( this.cover.element );
|
|
8427
|
-
this.cover=new ZikoUIElement("div","div").style({
|
|
8428
|
-
position:"absolute",
|
|
8429
|
-
display:"block",
|
|
8430
|
-
width:"100%",
|
|
8431
|
-
height:"100%",
|
|
8432
|
-
left:0,
|
|
8433
|
-
top:0,
|
|
8434
|
-
zIndex:1000,
|
|
8435
|
-
visibility:"hidden",
|
|
8436
|
-
opacity:0,
|
|
8437
|
-
transition: `all ${this.cache.config.transitionDuration} ${this.cache.config.transitionEasing}`
|
|
8438
|
-
});
|
|
8439
|
-
this.content.element.appendChild( this.cover.element );
|
|
8440
|
-
}
|
|
8441
|
-
setupMenu() {
|
|
8442
|
-
// var style = dom.menu.style;
|
|
8443
|
-
switch( this.cache.config.position ) {
|
|
8444
|
-
case "top":
|
|
8445
|
-
this.controller.style({
|
|
8446
|
-
width : "100%",
|
|
8447
|
-
height : `${this.height/2}px`
|
|
8448
|
-
});break;
|
|
8449
|
-
case "right":
|
|
8450
|
-
this.controller.style({
|
|
8451
|
-
right : 0,
|
|
8452
|
-
width : `${this.width/2}px`,
|
|
8453
|
-
height : "100%"
|
|
8454
|
-
});break;
|
|
8455
|
-
case "bottom":
|
|
8456
|
-
this.controller.style({
|
|
8457
|
-
bottom : "0",
|
|
8458
|
-
width : "100%",
|
|
8459
|
-
height : `${this.height/2}px`
|
|
8460
|
-
});break;
|
|
8461
|
-
case "left":
|
|
8462
|
-
this.controller.style({
|
|
8463
|
-
width : `${this.width/2}px`,
|
|
8464
|
-
height : "100%"
|
|
8465
|
-
});break;
|
|
8466
|
-
}
|
|
8467
|
-
this.controller.style({
|
|
8468
|
-
position : "fixed",
|
|
8469
|
-
display : "block",
|
|
8470
|
-
zIndex : 1,
|
|
8471
|
-
transform : this.cache.config.menuTransformClosed,
|
|
8472
|
-
transformOrigin : this.cache.config.menuTransformOrigin,
|
|
8473
|
-
transition : 'all ' + this.cache.config.transitionDuration +' '+ this.cache.config.transitionEasing
|
|
8474
|
-
});
|
|
8475
|
-
}
|
|
8476
|
-
setupContent() {
|
|
8477
|
-
this.content.style({
|
|
8478
|
-
transform : this.cache.config.contentTransformClosed,
|
|
8479
|
-
transformOrigin : this.cache.config.contentTransformOrigin,
|
|
8480
|
-
transition : `all ${this.cache.config.transitionDuration} ${this.cache.config.transitionEasing}`
|
|
8481
|
-
});
|
|
8482
|
-
}
|
|
8483
|
-
open(){
|
|
8484
|
-
if(!this.cache.config.isOpen){
|
|
8485
|
-
this.cache.config.isOpen = true;
|
|
8486
|
-
this.cover.style({
|
|
8487
|
-
height : this.content.element.scrollHeight + "px",
|
|
8488
|
-
visibility : "visible",
|
|
8489
|
-
opacity : 1,
|
|
8490
|
-
});
|
|
8491
|
-
if(this.cache.config.useTransfo)this.content.style({
|
|
8492
|
-
transform : this.cache.config.contentTransformOpened,
|
|
8493
|
-
userSelect : "default"
|
|
8494
|
-
});
|
|
8495
|
-
this.controller.style({
|
|
8496
|
-
transform : this.cache.config.menuTransformOpened,
|
|
8497
|
-
useSelect : "none"
|
|
8498
|
-
});
|
|
8499
|
-
this.emit("opened");
|
|
8500
|
-
}
|
|
8501
|
-
}
|
|
8502
|
-
close() {
|
|
8503
|
-
if( this.cache.config.isOpen ) {
|
|
8504
|
-
this.cache.config.isOpen = false;
|
|
8505
|
-
this.cover.style({
|
|
8506
|
-
// height : this.content.element.scrollHeight + "px",
|
|
8507
|
-
visibility : "hidden",
|
|
8508
|
-
opacity : 0,
|
|
8509
|
-
});
|
|
8510
|
-
this.content.style({
|
|
8511
|
-
transform : this.cache.config.contentTransformClosed,
|
|
8512
|
-
useSelect : "default"
|
|
8513
|
-
});
|
|
8514
|
-
this.controller.style({
|
|
8515
|
-
transform : this.cache.config.menuTransformClosed,
|
|
8516
|
-
userSelect : "none"
|
|
8517
|
-
});
|
|
8518
|
-
}
|
|
8519
|
-
this.emit("closed");
|
|
8520
|
-
}
|
|
8521
|
-
onOpen(callback){
|
|
8522
|
-
this.on("opened", callback.bind(this));
|
|
8523
|
-
return this;
|
|
8524
|
-
}
|
|
8525
|
-
onClose(callback){
|
|
8526
|
-
this.on("closed", callback.bind(this));
|
|
8527
|
-
return this;
|
|
8528
|
-
}
|
|
8529
|
-
#usePosition(position){
|
|
8530
|
-
if(this.cache.config.position!==position){
|
|
8531
|
-
this.cache.config.position=position;
|
|
8532
|
-
const isOpen = this.isOpen;
|
|
8533
|
-
this.close();
|
|
8534
|
-
this.update();
|
|
8535
|
-
if(isOpen)this.open();
|
|
8536
|
-
}
|
|
8537
|
-
}
|
|
8538
|
-
useRight(){
|
|
8539
|
-
this.#usePosition("left");
|
|
8540
|
-
return this;
|
|
8541
|
-
}
|
|
8542
|
-
useRight(){
|
|
8543
|
-
this.#usePosition("right");
|
|
8544
|
-
return this;
|
|
8545
|
-
}
|
|
8546
|
-
useTop(){
|
|
8547
|
-
this.#usePosition("top");
|
|
8548
|
-
return this;
|
|
8549
|
-
}
|
|
8550
|
-
useBottom(){
|
|
8551
|
-
this.#usePosition("bottom");
|
|
8552
|
-
return this;
|
|
8553
|
-
}
|
|
8554
|
-
}
|
|
8555
|
-
const menu3d = (controller, content) => new ZikoUIMenu3d(controller, content);
|
|
8556
|
-
globalThis.menu3d = menu3d;
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
/*
|
|
8560
|
-
|
|
8561
|
-
a = menu3d(Flex(text("Menu")), Flex(text("Content")))
|
|
8562
|
-
.size("80vw", "50vh")
|
|
8563
|
-
.style({ userSelect: "none" });
|
|
8564
|
-
a.onOpen((e) => console.log(e));
|
|
8565
|
-
a.open();
|
|
8566
|
-
a.controller.onSwipe(0.05, 1, (e) => {
|
|
8567
|
-
if (e.event.detail.direction.x === "left") a.close();
|
|
8568
|
-
});
|
|
8569
|
-
a.content.onSwipe(0.1, 1, (e) => {
|
|
8570
|
-
if (e.event.detail.direction.x === "left") a.close();
|
|
8571
|
-
if (e.event.detail.direction.x === "right") a.open();
|
|
8572
|
-
});
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
*/
|
|
8576
|
-
|
|
8577
|
-
class ZikoUIModal extends ZikoUIContainerElement{
|
|
8578
|
-
constructor(...UIElements){
|
|
8579
|
-
super("dialog", "modal");
|
|
8580
|
-
this.append(...UIElements);
|
|
8581
|
-
Object.assign(this.cache,{
|
|
8582
|
-
config:{
|
|
8583
|
-
mode:"modal",
|
|
8584
|
-
useTransition:true
|
|
8585
|
-
}
|
|
8586
|
-
});
|
|
8587
|
-
this.style({
|
|
8588
|
-
display:"flex",
|
|
8589
|
-
justifyContent:"center",
|
|
8590
|
-
alignItems:"center",
|
|
8591
|
-
position: "absolute",
|
|
8592
|
-
top: "50%",
|
|
8593
|
-
left: "50%",
|
|
8594
|
-
transform: "translate(-50%, -50%)",
|
|
8595
|
-
padding: "20px",
|
|
8596
|
-
border: "none",
|
|
8597
|
-
backgroundCcolor: "#f5f5f5",
|
|
8598
|
-
boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.1)",
|
|
8599
|
-
borderRadius: "8px"
|
|
8600
|
-
});
|
|
8601
|
-
this.close();
|
|
8602
|
-
}
|
|
8603
|
-
open(){
|
|
8604
|
-
if(!this.element.open){
|
|
8605
|
-
switch(this.cache.config.mode){
|
|
8606
|
-
case "modal": this.element.showModal(); break;
|
|
8607
|
-
case "dialog": this.element.show(); break;
|
|
8608
|
-
default : this.element.show(); break;
|
|
8609
|
-
}
|
|
8610
|
-
// this.style({
|
|
8611
|
-
// display : "flex",
|
|
8612
|
-
// })
|
|
8613
|
-
this.st.fadeIn(1000);
|
|
8614
|
-
this.emit("modal:opened");
|
|
8615
|
-
}
|
|
8616
|
-
return this;
|
|
8617
|
-
}
|
|
8618
|
-
close(){
|
|
8619
|
-
// this.style({
|
|
8620
|
-
// display : "none"
|
|
8621
|
-
// })
|
|
8622
|
-
this.st.fadeOut(1000);
|
|
8623
|
-
if(this.element.open){
|
|
8624
|
-
this.element.close();
|
|
8625
|
-
}
|
|
8626
|
-
this.emit("modal:closed");
|
|
8627
|
-
return this;
|
|
8628
|
-
}
|
|
8629
|
-
closeAfter(t = 1000){
|
|
8630
|
-
globalThis?.setTimeout(()=>this.close(), t);
|
|
8631
|
-
return this;
|
|
8632
|
-
}
|
|
8633
|
-
onOpen(callback){
|
|
8634
|
-
this.on("modal:opened",callback.bind(this));
|
|
8635
|
-
return this;
|
|
8636
|
-
}
|
|
8637
|
-
onClose(callback){
|
|
8638
|
-
this.on("modal:closed",callback.bind(this));
|
|
8639
|
-
return this;
|
|
8640
|
-
}
|
|
8641
|
-
useModal(){
|
|
8642
|
-
this.cache.config.mode = "modal";
|
|
8643
|
-
return this;
|
|
8644
|
-
}
|
|
8645
|
-
useDialog(){
|
|
8646
|
-
this.cache.config.mode = "dialog";
|
|
8647
|
-
return this;
|
|
8648
|
-
}
|
|
8649
|
-
useTransition(enabled = true){
|
|
8650
|
-
this.cache.config.useTransition = enabled;
|
|
8651
|
-
return this;
|
|
8652
|
-
}
|
|
8653
|
-
}
|
|
8654
|
-
|
|
8655
|
-
const Modal=(...UIElements)=>new ZikoUIModal(...UIElements);
|
|
8656
|
-
|
|
8657
|
-
/*
|
|
8658
|
-
a=Modal(text("Hello")).style({
|
|
8659
|
-
width:"100%",
|
|
8660
|
-
height:"100%"
|
|
8661
|
-
})
|
|
8662
|
-
Flex(a).size("400px","400px").style({border:"1px red solid"})
|
|
8663
|
-
*/
|
|
8664
|
-
|
|
8665
|
-
class __ZikoUISlider__ extends ZikoUISection{
|
|
8666
|
-
constructor(){
|
|
8667
|
-
super("section","");
|
|
8668
|
-
Object.assign(this.cache,{
|
|
8669
|
-
currentIndex : 0,
|
|
8670
|
-
slideBuilder : null,
|
|
8671
|
-
});
|
|
8672
|
-
this.container = Flex().size("100%","100%").vertical(0,0).style({
|
|
8673
|
-
// width:"100%",
|
|
8674
|
-
overflow:"hidden"
|
|
8675
|
-
});
|
|
8676
|
-
// this.style({
|
|
8677
|
-
// // width:"100%",
|
|
8678
|
-
// overflow:"hidden"
|
|
8679
|
-
// });
|
|
8680
|
-
this.container.setAttr({
|
|
8681
|
-
ariaRoledescription : "carousel",
|
|
8682
|
-
ariaLive: "polite",
|
|
8683
|
-
ariaLabel : "Content Slider"
|
|
8684
|
-
});
|
|
8685
|
-
this.track = Section().size("100%","100%").style({
|
|
8686
|
-
transition : "transform 0.3s ease-in-out",
|
|
8687
|
-
});
|
|
8688
|
-
this.bullets = Flex().style({
|
|
8689
|
-
// position : "absolute",
|
|
8690
|
-
// top : 0,
|
|
8691
|
-
gap : "10px",
|
|
8692
|
-
padding:"10px",
|
|
8693
|
-
});
|
|
8694
|
-
this.container.append(
|
|
8695
|
-
this.track,
|
|
8696
|
-
this.bullets
|
|
8697
|
-
);
|
|
8698
|
-
this.append(this.container);
|
|
8699
|
-
}
|
|
8700
|
-
#updateAriaHidden(){
|
|
8701
|
-
for(let i=0;i<this.track.items.length;i++){
|
|
8702
|
-
this.track[i].setAttr({
|
|
8703
|
-
ariaHidden : (i!==this.cache.currentIndex)
|
|
8704
|
-
});
|
|
8705
|
-
}
|
|
8706
|
-
}
|
|
8707
|
-
goto(n = 0){
|
|
8708
|
-
this.cache.currentIndex = n;
|
|
8709
|
-
this.__updatePos();
|
|
8710
|
-
this.#updateAriaHidden();
|
|
8711
|
-
}
|
|
8712
|
-
next(n = 1){
|
|
8713
|
-
this.cache.currentIndex += n;
|
|
8714
|
-
this.__updatePos();
|
|
8715
|
-
this.#updateAriaHidden();
|
|
8716
|
-
return this;
|
|
8717
|
-
}
|
|
8718
|
-
previous(n = 1){
|
|
8719
|
-
this.cache.currentIndex -= n;
|
|
8720
|
-
this.__updatePos();
|
|
8721
|
-
this.#updateAriaHidden();
|
|
8722
|
-
return this;
|
|
8723
|
-
}
|
|
8724
|
-
#update(){
|
|
8725
|
-
const length = this.track.items.length;
|
|
8726
|
-
for(let i=0;i<length;i++){
|
|
8727
|
-
this.track.items[i].setAttr({
|
|
8728
|
-
ariaLabel : `Slide ${i+1} of ${length}`,
|
|
8729
|
-
dataSlideIndex : i
|
|
8730
|
-
});
|
|
8731
|
-
this.bullets.items[i].setAttr({
|
|
8732
|
-
dataIndex : i,
|
|
8733
|
-
ariaLabel : `Go to slide ${i}`
|
|
8734
|
-
});
|
|
8735
|
-
this.bullets[i].events.click?.destroy();
|
|
8736
|
-
this.bullets[i].onClick(()=>this.goto(i));
|
|
8737
|
-
}
|
|
8738
|
-
}
|
|
8739
|
-
#addSlide(UIElement){
|
|
8740
|
-
this.track.append(this.cache.slideBuilder(UIElement).setAttr({
|
|
8741
|
-
ariaRoledescription : "slide",
|
|
8742
|
-
role : "group",
|
|
8743
|
-
ariaLabel : "" // link to update
|
|
8744
|
-
}));
|
|
8745
|
-
const bullet = text$1().size("15px","15px").style({
|
|
8746
|
-
borderRadius:"50%",
|
|
8747
|
-
cursor : "pointer",
|
|
8748
|
-
border : "3px solid blue",
|
|
8749
|
-
background : "white"
|
|
8750
|
-
}).setAttr({
|
|
8751
|
-
role : "button",
|
|
8752
|
-
tabIndex : 0
|
|
8753
|
-
})
|
|
8754
|
-
.onPtrEnter(e=>e.target.st.background("gold").scale(1.2,1.2))
|
|
8755
|
-
.onPtrLeave(e=>e.target.st.background("white").scale(1,1));
|
|
8756
|
-
this.bullets.append(
|
|
8757
|
-
bullet
|
|
8758
|
-
);
|
|
8759
|
-
return this;
|
|
8760
|
-
}
|
|
8761
|
-
addSlides(...slides){
|
|
8762
|
-
slides.forEach(n=>this.#addSlide(n));
|
|
8763
|
-
this.#update();
|
|
8764
|
-
this.#updateAriaHidden();
|
|
8765
|
-
return this;
|
|
8766
|
-
}
|
|
8767
|
-
}
|
|
8768
|
-
|
|
8769
|
-
class ZikoUIHorizontalSlider extends __ZikoUISlider__{
|
|
8770
|
-
constructor(...slides){
|
|
8771
|
-
super("section","hSlider");
|
|
8772
|
-
this.container.vertical(0,0);
|
|
8773
|
-
Object.assign(this.cache,{
|
|
8774
|
-
slideBuilder : (UIElement) => Flex(UIElement).style({
|
|
8775
|
-
minWidth : "100%",
|
|
8776
|
-
width:"100%",
|
|
8777
|
-
height:"100%",
|
|
8778
|
-
}).vertical(0,0)
|
|
8779
|
-
});
|
|
8780
|
-
this.track.size("100%","90%").style({
|
|
8781
|
-
display : "flex"
|
|
8782
|
-
});
|
|
8783
|
-
this.addSlides(...slides);
|
|
8784
|
-
this.bullets.horizontal(0,0).style({
|
|
8785
|
-
width : "100%",
|
|
8786
|
-
height : "10%",
|
|
8787
|
-
});
|
|
8788
|
-
}
|
|
8789
|
-
__updatePos(){
|
|
8790
|
-
const width = this.container.width;
|
|
8791
|
-
this.track.st.translateX(-this.cache.currentIndex * width);
|
|
8792
|
-
}
|
|
8793
|
-
|
|
8794
|
-
}
|
|
8795
|
-
|
|
8796
|
-
const hSlider=(...slides)=>new ZikoUIHorizontalSlider(...slides);
|
|
8797
|
-
|
|
8798
|
-
class ZikoUIVerticalSlider extends __ZikoUISlider__{
|
|
8799
|
-
constructor(...slides){
|
|
8800
|
-
super("section","vSlider");
|
|
8801
|
-
Object.assign(this.cache,{
|
|
8802
|
-
slideBuilder : (UIElement) => Flex(UIElement).size("100%","100%").vertical(0, 0)
|
|
8803
|
-
});
|
|
8804
|
-
this.addSlides(...slides);
|
|
8805
|
-
this.container.horizontal(0,0);
|
|
8806
|
-
this.track.size("90%","100%");
|
|
8807
|
-
this.bullets.vertical(0,0).style({
|
|
8808
|
-
height : "100%",
|
|
8809
|
-
width : "10%"
|
|
8810
|
-
});
|
|
8811
|
-
}
|
|
8812
|
-
__updatePos(){
|
|
8813
|
-
const height = this.container.height;
|
|
8814
|
-
this.track.st.translateY(-this.cache.currentIndex * height);
|
|
8815
|
-
}
|
|
8816
|
-
}
|
|
8817
|
-
|
|
8818
|
-
const vSlider=(...slides)=>new ZikoUIVerticalSlider(...slides);
|
|
8819
|
-
|
|
8820
|
-
const Slider = ({orintation = "horizontal",slides = []}) =>{
|
|
8821
|
-
if(["v","vertical"].includes(orintation.toLowerCase())) return vSlider(...slides);
|
|
8822
|
-
else if(["h","horizontal"].includes(orintation.toLowerCase())) return hSlider(...slides);
|
|
8823
|
-
else ;
|
|
8824
|
-
};
|
|
8825
|
-
|
|
8826
|
-
var Derived = /*#__PURE__*/Object.freeze({
|
|
8827
|
-
__proto__: null,
|
|
8828
|
-
Accordion: Accordion,
|
|
8829
|
-
Breadcrumbs: Breadcrumbs,
|
|
8830
|
-
Carousel: Carousel,
|
|
8831
|
-
CodeCell: CodeCell,
|
|
8832
|
-
CodeNote: CodeNote,
|
|
8833
|
-
Collapsible: Collapsible,
|
|
8834
|
-
Flex: Flex$1,
|
|
8835
|
-
Grid: Grid$1,
|
|
8836
|
-
Modal: Modal,
|
|
8837
|
-
Slider: Slider,
|
|
8838
|
-
Splitter: Splitter,
|
|
8839
|
-
Tabs: Tabs,
|
|
8840
|
-
ZikoUIAccordion: ZikoUIAccordion,
|
|
8841
|
-
ZikoUIBreadcrumbs: ZikoUIBreadcrumbs,
|
|
8842
|
-
ZikoUICodeNote: ZikoUICodeNote,
|
|
8843
|
-
ZikoUIFlex: ZikoUIFlex$1,
|
|
8844
|
-
ZikoUIGrid: ZikoUIGrid,
|
|
8845
|
-
ZikoUIHorizontalSlider: ZikoUIHorizontalSlider,
|
|
8846
|
-
ZikoUIHorizontalSplitter: ZikoUIHorizontalSplitter,
|
|
8847
|
-
ZikoUIMenu3d: ZikoUIMenu3d,
|
|
8848
|
-
ZikoUIModal: ZikoUIModal,
|
|
8849
|
-
ZikoUIVerticalSlider: ZikoUIVerticalSlider,
|
|
8850
|
-
ZikoUIVerticalSplitter: ZikoUIVerticalSplitter,
|
|
8851
|
-
dangerAlert: dangerAlert,
|
|
8852
|
-
hSlider: hSlider,
|
|
8853
|
-
hSplitter: hSplitter,
|
|
8854
|
-
infoAlert: infoAlert,
|
|
8855
|
-
menu3d: menu3d,
|
|
8856
|
-
successAlert: successAlert,
|
|
8857
|
-
vSlider: vSlider,
|
|
8858
|
-
vSplitter: vSplitter,
|
|
8859
|
-
warningAlert: warningAlert
|
|
8860
|
-
});
|
|
8861
|
-
|
|
8862
|
-
const UI$1 = {
|
|
8863
|
-
...Text$1,
|
|
8864
|
-
...List,
|
|
8865
|
-
...Io,
|
|
8866
|
-
...Media,
|
|
8867
|
-
...Table,
|
|
8868
|
-
...Semantic,
|
|
8869
|
-
...Misc,
|
|
8870
|
-
...Derived,
|
|
8871
|
-
ZikoUIElement,
|
|
8872
|
-
ZikoUIContainerElement
|
|
8873
|
-
};
|
|
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
|
+
};
|
|
8874
6895
|
|
|
8875
6896
|
const svg2str=svg=>(new XMLSerializer()).serializeToString(svg);
|
|
8876
6897
|
const svg2ascii=svg=>btoa(svg2str(svg));
|
|
@@ -9016,9 +7037,11 @@ function trimKeys(obj) {
|
|
|
9016
7037
|
}, Array.isArray(obj) ? [] : {});
|
|
9017
7038
|
}
|
|
9018
7039
|
|
|
7040
|
+
// export { markdown2html } from "./markdown.js";
|
|
7041
|
+
// export { adoc2html } from "./adoc.js";
|
|
7042
|
+
|
|
9019
7043
|
var Converter = /*#__PURE__*/Object.freeze({
|
|
9020
7044
|
__proto__: null,
|
|
9021
|
-
adoc2html: adoc2html,
|
|
9022
7045
|
arr2str: arr2str,
|
|
9023
7046
|
csv2arr: csv2arr,
|
|
9024
7047
|
csv2json: csv2json,
|
|
@@ -9033,7 +7056,6 @@ var Converter = /*#__PURE__*/Object.freeze({
|
|
|
9033
7056
|
json2xmlFile: json2xmlFile,
|
|
9034
7057
|
json2yml: json2yml,
|
|
9035
7058
|
json2ymlFile: json2ymlFile,
|
|
9036
|
-
markdown2html: markdown2html,
|
|
9037
7059
|
obj2str: obj2str,
|
|
9038
7060
|
svg2ascii: svg2ascii,
|
|
9039
7061
|
svg2img: svg2img,
|
|
@@ -10406,7 +8428,7 @@ const Math$1 = {
|
|
|
10406
8428
|
...__Calculus__,
|
|
10407
8429
|
};
|
|
10408
8430
|
|
|
10409
|
-
class ZikoUISvg extends
|
|
8431
|
+
class ZikoUISvg extends ZikoUIElement {
|
|
10410
8432
|
constructor(w=360,h=300) {
|
|
10411
8433
|
super("svg","svg");
|
|
10412
8434
|
//this.cache={};
|
|
@@ -10471,439 +8493,14 @@ class ZikoUISvg extends ZikoUIContainerElement {
|
|
|
10471
8493
|
|
|
10472
8494
|
const Svg =(w,h)=>new ZikoUISvg(w,h);
|
|
10473
8495
|
|
|
10474
|
-
class ZikoSvgElement extends ZikoUIElement{
|
|
10475
|
-
constructor(type) {
|
|
10476
|
-
super();
|
|
10477
|
-
Object.assign(this.cache,{
|
|
10478
|
-
type
|
|
10479
|
-
});
|
|
10480
|
-
}
|
|
10481
|
-
pos(x,y){
|
|
10482
|
-
return this.posX(x).posY(y);
|
|
10483
|
-
}
|
|
10484
|
-
posX(x){
|
|
10485
|
-
if(["circle","ellipse"].includes(this.cache.type))this.element.cx.baseVal.value=x;
|
|
10486
|
-
else this.element.x.baseVal.value=x;
|
|
10487
|
-
return this;
|
|
10488
|
-
}
|
|
10489
|
-
posY(y){
|
|
10490
|
-
if(["circle","ellipse"].includes(this.cache.type))this.element.cy.baseVal.value=y;
|
|
10491
|
-
else this.element.y.baseVal.value=y;
|
|
10492
|
-
return this;
|
|
10493
|
-
}
|
|
10494
|
-
translate(x,y){
|
|
10495
|
-
return this;
|
|
10496
|
-
}
|
|
10497
|
-
color({ stroke, fill }) {
|
|
10498
|
-
this.element?.setAttribute("stroke", stroke);
|
|
10499
|
-
this.element?.setAttribute("fill", fill);
|
|
10500
|
-
return this;
|
|
10501
|
-
}
|
|
10502
|
-
fill(color = "none") {
|
|
10503
|
-
this.element?.setAttribute("fill", color);
|
|
10504
|
-
return this;
|
|
10505
|
-
}
|
|
10506
|
-
stroke(color = "none", width) {
|
|
10507
|
-
this.element?.setAttribute("stroke", color);
|
|
10508
|
-
width && this.strokeWidth(width);
|
|
10509
|
-
return this;
|
|
10510
|
-
}
|
|
10511
|
-
strokeWidth(width = 1) {
|
|
10512
|
-
this.element?.setAttribute("stroke-width", width);
|
|
10513
|
-
return this;
|
|
10514
|
-
}
|
|
10515
|
-
opacity(value = 1) {
|
|
10516
|
-
this.element?.setAttribute("opacity", value);
|
|
10517
|
-
return this;
|
|
10518
|
-
}
|
|
10519
|
-
}
|
|
10520
|
-
|
|
10521
|
-
class ZikoSvgCircle extends ZikoSvgElement{
|
|
10522
|
-
constructor(cx,cy,r){
|
|
10523
|
-
super("circle");
|
|
10524
|
-
this.element=document.createElementNS(
|
|
10525
|
-
"http://www.w3.org/2000/svg",
|
|
10526
|
-
"circle",
|
|
10527
|
-
);
|
|
10528
|
-
this.pos(cx,cy).setR(r);
|
|
10529
|
-
}
|
|
10530
|
-
setR(r){
|
|
10531
|
-
this.element.r.baseVal.value=r;
|
|
10532
|
-
return this;
|
|
10533
|
-
}
|
|
10534
|
-
get r(){
|
|
10535
|
-
return this.element.baseVal.value;
|
|
10536
|
-
}
|
|
10537
|
-
get cx(){
|
|
10538
|
-
return this.element.baseVal.value;
|
|
10539
|
-
}
|
|
10540
|
-
get cy(){
|
|
10541
|
-
return this.element.baseVal.value;
|
|
10542
|
-
}
|
|
10543
|
-
}
|
|
10544
|
-
const svgCircle=(x,y,r)=>new ZikoSvgCircle(x,y,r);
|
|
10545
|
-
|
|
10546
|
-
class ZikoSvgEllipse extends ZikoSvgElement{
|
|
10547
|
-
constructor(cx,cy,rx,ry){
|
|
10548
|
-
super("ellipse");
|
|
10549
|
-
this.element=document?.createElementNS(
|
|
10550
|
-
"http://www.w3.org/2000/svg",
|
|
10551
|
-
"ellipse",
|
|
10552
|
-
);
|
|
10553
|
-
this.pos(cx,cy).setRx(rx).setRy(ry);
|
|
10554
|
-
}
|
|
10555
|
-
setRx(rx){
|
|
10556
|
-
this.element.rx.baseVal.value=rx;
|
|
10557
|
-
return this;
|
|
10558
|
-
}
|
|
10559
|
-
setRy(ry){
|
|
10560
|
-
this.element.ry.baseVal.value=ry;
|
|
10561
|
-
return this;
|
|
10562
|
-
}
|
|
10563
|
-
}
|
|
10564
|
-
const svgEllipse=(x,y,rx,ry)=>new ZikoSvgEllipse(x,y,rx,ry);
|
|
10565
|
-
|
|
10566
|
-
class ZikoSvgForeignObject extends ZikoSvgElement{
|
|
10567
|
-
constructor(x=0,y=0,w="100%",h="100%",...ZikoUIElement){
|
|
10568
|
-
super("foreignObject");
|
|
10569
|
-
this.items=[];
|
|
10570
|
-
this.element=document?.createElementNS(
|
|
10571
|
-
"http://www.w3.org/2000/svg",
|
|
10572
|
-
"foreignObject",
|
|
10573
|
-
);
|
|
10574
|
-
this.container=Flex$1().setTarget(this.element).vertical(0,0).size("auto","auto");
|
|
10575
|
-
this.container.st.scaleY(-1);
|
|
10576
|
-
this.posX(x).posY(y).width(w).height(h);
|
|
10577
|
-
}
|
|
10578
|
-
width(w){
|
|
10579
|
-
this.element.etAttribute("width",w);
|
|
10580
|
-
return this;
|
|
10581
|
-
}
|
|
10582
|
-
height(h){
|
|
10583
|
-
this.element.etAttribute("height",h);
|
|
10584
|
-
return this;
|
|
10585
|
-
}
|
|
10586
|
-
add(...ZikoUIElement){
|
|
10587
|
-
this.container.append(...ZikoUIElement);
|
|
10588
|
-
return this;
|
|
10589
|
-
}
|
|
10590
|
-
remove(...ZikoUIElement){
|
|
10591
|
-
this.container.append(...ZikoUIElement);
|
|
10592
|
-
return this;
|
|
10593
|
-
}
|
|
10594
|
-
}
|
|
10595
|
-
const svgObject=(x, y, w, h)=>new ZikoSvgForeignObject(x, y, w, h);
|
|
10596
|
-
|
|
10597
|
-
class ZikoSvgGroupe extends ZikoSvgElement{
|
|
10598
|
-
constructor(...svgElement){
|
|
10599
|
-
super();
|
|
10600
|
-
this.items=[];
|
|
10601
|
-
this.element=document?.createElementNS(
|
|
10602
|
-
"http://www.w3.org/2000/svg",
|
|
10603
|
-
"g",
|
|
10604
|
-
);
|
|
10605
|
-
this.add(...svgElement);
|
|
10606
|
-
}
|
|
10607
|
-
add(...svgElement){
|
|
10608
|
-
for(let i=0;i<svgElement.length;i++){
|
|
10609
|
-
this.element?.appendChild(svgElement[i].element);
|
|
10610
|
-
this.items.push(svgElement[i]);
|
|
10611
|
-
}
|
|
10612
|
-
if(svgElement.length===1)return svgElement[0]
|
|
10613
|
-
return svgElement;
|
|
10614
|
-
}
|
|
10615
|
-
remove(...svgElement){
|
|
10616
|
-
for(let i=0;i<svgElement.length;i++){
|
|
10617
|
-
this.element?.removeChild(svgElement[i].element);
|
|
10618
|
-
this.items=this.items.filter(n=>n!=svgElement);
|
|
10619
|
-
}
|
|
10620
|
-
return this;
|
|
10621
|
-
}
|
|
10622
|
-
}
|
|
10623
|
-
const svgGroupe=(...svgElement)=>new ZikoSvgGroupe(...svgElement);
|
|
10624
|
-
|
|
10625
|
-
class ZikoSvgImage extends ZikoSvgElement{
|
|
10626
|
-
constructor(src="",w="100%",h="100%",x=0,y=0){
|
|
10627
|
-
super();
|
|
10628
|
-
this.element=document?.createElementNS(
|
|
10629
|
-
"http://www.w3.org/2000/svg",
|
|
10630
|
-
"image",
|
|
10631
|
-
);
|
|
10632
|
-
this.setSrc(src).width(w).height(h).x(x).y(y);
|
|
10633
|
-
}
|
|
10634
|
-
x(x){
|
|
10635
|
-
this.element.x.baseVal.value=x;
|
|
10636
|
-
return this;
|
|
10637
|
-
}
|
|
10638
|
-
y(y){
|
|
10639
|
-
this.element.y.baseVal.value=y;
|
|
10640
|
-
return this;
|
|
10641
|
-
}
|
|
10642
|
-
width(w){
|
|
10643
|
-
this.element?.setAttribute("width",w);
|
|
10644
|
-
return this;
|
|
10645
|
-
}
|
|
10646
|
-
height(h){
|
|
10647
|
-
this.element?.setAttribute("height",h);
|
|
10648
|
-
return this;
|
|
10649
|
-
}
|
|
10650
|
-
setSrc(src=""){
|
|
10651
|
-
this.element?.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', src);
|
|
10652
|
-
return this;
|
|
10653
|
-
}
|
|
10654
|
-
}
|
|
10655
|
-
const svgImage=(src,w,h,x,y)=>new ZikoSvgImage(src,w,h,x,y);
|
|
10656
|
-
|
|
10657
|
-
class ZikoSvgLine extends ZikoSvgElement{
|
|
10658
|
-
constructor(x1,y1,x2,y2){
|
|
10659
|
-
super();
|
|
10660
|
-
this.element=document?.createElementNS(
|
|
10661
|
-
"http://www.w3.org/2000/svg",
|
|
10662
|
-
"line",
|
|
10663
|
-
);
|
|
10664
|
-
this.x1(x1).y1(y1).x2(x2).y2(y2).stroke("black");
|
|
10665
|
-
}
|
|
10666
|
-
x1(x1){
|
|
10667
|
-
this.element.x1.baseVal.value=x1;
|
|
10668
|
-
return this;
|
|
10669
|
-
}
|
|
10670
|
-
y1(y1){
|
|
10671
|
-
this.element.y1.baseVal.value=y1;
|
|
10672
|
-
return this;
|
|
10673
|
-
}
|
|
10674
|
-
x2(x2){
|
|
10675
|
-
this.element.x2.baseVal.value=x2;
|
|
10676
|
-
return this;
|
|
10677
|
-
}
|
|
10678
|
-
y2(y2){
|
|
10679
|
-
this.element.y2.baseVal.value=y2;
|
|
10680
|
-
return this;
|
|
10681
|
-
}
|
|
10682
|
-
}
|
|
10683
|
-
const svgLine=(x1,y1,x2,y2)=>new ZikoSvgLine(x1,y1,x2,y2);
|
|
10684
|
-
|
|
10685
|
-
class ZikoSvgLink extends ZikoSvgElement{
|
|
10686
|
-
constructor(href,...svgElement){
|
|
10687
|
-
super();
|
|
10688
|
-
this.items=[];
|
|
10689
|
-
this.element=document?.createElementNS(
|
|
10690
|
-
"http://www.w3.org/2000/svg",
|
|
10691
|
-
"a",
|
|
10692
|
-
);
|
|
10693
|
-
this.element.etAttribute("href",href);
|
|
10694
|
-
this.add(...svgElement);
|
|
10695
|
-
}
|
|
10696
|
-
add(...svgElement){
|
|
10697
|
-
for(let i=0;i<svgElement.length;i++){
|
|
10698
|
-
this.element.ppendChild(svgElement[i].element);
|
|
10699
|
-
this.items.push(svgElement[i]);
|
|
10700
|
-
}
|
|
10701
|
-
if(svgElement.length===1)return svgElement[0]
|
|
10702
|
-
return svgElement;
|
|
10703
|
-
}
|
|
10704
|
-
remove(...svgElement){
|
|
10705
|
-
for(let i=0;i<svgElement.length;i++){
|
|
10706
|
-
this.element.moveChild(svgElement[i].element);
|
|
10707
|
-
this.items=this.items.filter(n=>n!=svgElement);
|
|
10708
|
-
}
|
|
10709
|
-
return this;
|
|
10710
|
-
}
|
|
10711
|
-
}
|
|
10712
|
-
const svgLink=(href,...svgElement)=>new ZikoSvgLink(href,...svgElement);
|
|
10713
|
-
|
|
10714
|
-
class ZikoSvgPath extends ZikoSvgElement{
|
|
10715
|
-
constructor(){
|
|
10716
|
-
super();
|
|
10717
|
-
this.element=document?.createElementNS(
|
|
10718
|
-
"http://www.w3.org/2000/svg",
|
|
10719
|
-
"path",
|
|
10720
|
-
);
|
|
10721
|
-
this.path="";
|
|
10722
|
-
|
|
10723
|
-
}
|
|
10724
|
-
setPath(){
|
|
10725
|
-
this.element.etAttribute("d",this.path);
|
|
10726
|
-
return this;
|
|
10727
|
-
}
|
|
10728
|
-
clear(){
|
|
10729
|
-
this.path="";
|
|
10730
|
-
this.setPath();
|
|
10731
|
-
return this;
|
|
10732
|
-
}
|
|
10733
|
-
moveTo(x,y){
|
|
10734
|
-
this.path+=`M${x} ${y} `;
|
|
10735
|
-
this.setPath();
|
|
10736
|
-
return this;
|
|
10737
|
-
}
|
|
10738
|
-
lineTo(x,y){
|
|
10739
|
-
this.path+=`L${x} ${y} `;
|
|
10740
|
-
this.setPath();
|
|
10741
|
-
return this;
|
|
10742
|
-
}
|
|
10743
|
-
hr(x){
|
|
10744
|
-
this.path+=`H${x} `;
|
|
10745
|
-
this.setPath();
|
|
10746
|
-
return this;
|
|
10747
|
-
}
|
|
10748
|
-
vr(y){
|
|
10749
|
-
this.path+=`V${y} `;
|
|
10750
|
-
this.setPath();
|
|
10751
|
-
return this;
|
|
10752
|
-
}
|
|
10753
|
-
bezier(x1,y1,x2,y2,x,y){
|
|
10754
|
-
this.path+=`C ${x1} ${y1},${x2} ${y2},${x} ${y} `;
|
|
10755
|
-
this.setPath();
|
|
10756
|
-
return this;
|
|
10757
|
-
}
|
|
10758
|
-
quadratic(x1,y1,x,y){
|
|
10759
|
-
this.path+=`Q ${x1} ${y1} ${x} ${y} `;
|
|
10760
|
-
this.setPath();
|
|
10761
|
-
return this;
|
|
10762
|
-
}
|
|
10763
|
-
close(){
|
|
10764
|
-
this.path+="Z";
|
|
10765
|
-
this.setPath();
|
|
10766
|
-
return this;
|
|
10767
|
-
}
|
|
10768
|
-
}
|
|
10769
|
-
|
|
10770
|
-
const svgPath=()=>new ZikoSvgPath();
|
|
10771
|
-
|
|
10772
|
-
class ZikoSvgPolygon extends ZikoSvgElement{
|
|
10773
|
-
constructor(X=[],Y=[]){
|
|
10774
|
-
super();
|
|
10775
|
-
this.X=X;
|
|
10776
|
-
this.Y=Y;
|
|
10777
|
-
this.element=document?.createElementNS(
|
|
10778
|
-
"http://www.w3.org/2000/svg",
|
|
10779
|
-
"polygon",
|
|
10780
|
-
);
|
|
10781
|
-
this.element?.setAttribute("points","");
|
|
10782
|
-
this.addPoints(X,Y);
|
|
10783
|
-
}
|
|
10784
|
-
addPoint(x,y){
|
|
10785
|
-
let p=this.element.parentElement.createSVGPoint();
|
|
10786
|
-
p.x=x;
|
|
10787
|
-
p.y=y;
|
|
10788
|
-
this.element.points.appendItem(p);
|
|
10789
|
-
return this;
|
|
10790
|
-
}
|
|
10791
|
-
addPoints(X,Y){
|
|
10792
|
-
for(let i=0;i<X.length;i++){
|
|
10793
|
-
let p=this.element.parentElement.createSVGPoint();
|
|
10794
|
-
p.x=X[i];
|
|
10795
|
-
p.y=Y[i];
|
|
10796
|
-
this.element.oints.appendItem(p);
|
|
10797
|
-
}
|
|
10798
|
-
return this;
|
|
10799
|
-
}
|
|
10800
|
-
}
|
|
10801
|
-
const svgPolygon=(X,Y)=>new ZikoSvgPolygon(X,Y);
|
|
10802
|
-
|
|
10803
|
-
class ZikoSvgRectangle extends ZikoSvgElement{
|
|
10804
|
-
constructor(x,y,w,h,center=true){
|
|
10805
|
-
super();
|
|
10806
|
-
this.element=document?.createElementNS(
|
|
10807
|
-
"http://www.w3.org/2000/svg",
|
|
10808
|
-
"rect",
|
|
10809
|
-
);
|
|
10810
|
-
this.setX(x).setY(y).width(w).height(h);
|
|
10811
|
-
this.rx=this.x+this.w/2;
|
|
10812
|
-
this.ty=this.y+this.h/2;
|
|
10813
|
-
}
|
|
10814
|
-
setX(x){
|
|
10815
|
-
this.element.x.baseVal.value=x;
|
|
10816
|
-
this.x=x;
|
|
10817
|
-
return this;
|
|
10818
|
-
}
|
|
10819
|
-
setY(y){
|
|
10820
|
-
this.element.y.baseVal.value=y;
|
|
10821
|
-
this.y=y;
|
|
10822
|
-
return this;
|
|
10823
|
-
}
|
|
10824
|
-
r(rx,ry){
|
|
10825
|
-
this.rx=rx;
|
|
10826
|
-
this.ry=ry;
|
|
10827
|
-
this.setX(this.rx-this.w/2);
|
|
10828
|
-
this.setY(this.ry-this.h/2);
|
|
10829
|
-
return this;
|
|
10830
|
-
}
|
|
10831
|
-
width(w){
|
|
10832
|
-
this.element.width.baseVal.value=w;
|
|
10833
|
-
this.w=w;
|
|
10834
|
-
return this;
|
|
10835
|
-
}
|
|
10836
|
-
height(h){
|
|
10837
|
-
this.element.height.baseVal.value=h;
|
|
10838
|
-
this.h=h;
|
|
10839
|
-
return this;
|
|
10840
|
-
}
|
|
10841
|
-
}
|
|
10842
|
-
const svgRect=(x,y,w,h,center)=>new ZikoSvgRectangle(x,y,w,h,center);
|
|
10843
|
-
|
|
10844
|
-
class ZikoSvgText extends ZikoSvgElement{
|
|
10845
|
-
constructor(text,x,y){
|
|
10846
|
-
super();
|
|
10847
|
-
this.element=document?.createElementNS(
|
|
10848
|
-
"http://www.w3.org/2000/svg",
|
|
10849
|
-
"text",
|
|
10850
|
-
);
|
|
10851
|
-
this.setText(text);
|
|
10852
|
-
this.x(x).y(y);
|
|
10853
|
-
}
|
|
10854
|
-
x(x){
|
|
10855
|
-
this.element?.setAttribute("x",x);
|
|
10856
|
-
return this;
|
|
10857
|
-
}
|
|
10858
|
-
y(y){
|
|
10859
|
-
this.element?.setAttribute("y",y);
|
|
10860
|
-
return this;
|
|
10861
|
-
}
|
|
10862
|
-
setText(text=""){
|
|
10863
|
-
this.element.textContent=text;
|
|
10864
|
-
return this;
|
|
10865
|
-
}
|
|
10866
|
-
}
|
|
10867
|
-
const svgText=(text,x,y)=>new ZikoSvgText(text,x,y);
|
|
10868
|
-
|
|
10869
|
-
const svgGrid=(w,h,r=10,c=10)=>{
|
|
10870
|
-
let path=svgPath().fill("none").stroke("coral").strokeWidth(0.6);
|
|
10871
|
-
console.log({x:w/r,y:h/c});
|
|
10872
|
-
for(let i=0;i<w;i++) path.moveTo(0,i*w/r).hr(w);
|
|
10873
|
-
for(let j=0;j<h;j++) path.moveTo(j*h/c,0).vr(h);
|
|
10874
|
-
return path
|
|
10875
|
-
};
|
|
10876
|
-
|
|
10877
8496
|
var SVG = /*#__PURE__*/Object.freeze({
|
|
10878
8497
|
__proto__: null,
|
|
10879
8498
|
Svg: Svg,
|
|
10880
|
-
|
|
10881
|
-
ZikoSvgEllipse: ZikoSvgEllipse,
|
|
10882
|
-
ZikoSvgForeignObject: ZikoSvgForeignObject,
|
|
10883
|
-
ZikoSvgGroupe: ZikoSvgGroupe,
|
|
10884
|
-
ZikoSvgImage: ZikoSvgImage,
|
|
10885
|
-
ZikoSvgLine: ZikoSvgLine,
|
|
10886
|
-
ZikoSvgLink: ZikoSvgLink,
|
|
10887
|
-
ZikoSvgPath: ZikoSvgPath,
|
|
10888
|
-
ZikoSvgRectangle: ZikoSvgRectangle,
|
|
10889
|
-
ZikoSvgText: ZikoSvgText,
|
|
10890
|
-
ZikoUISvg: ZikoUISvg,
|
|
10891
|
-
svgCircle: svgCircle,
|
|
10892
|
-
svgEllipse: svgEllipse,
|
|
10893
|
-
svgGrid: svgGrid,
|
|
10894
|
-
svgGroupe: svgGroupe,
|
|
10895
|
-
svgImage: svgImage,
|
|
10896
|
-
svgLine: svgLine,
|
|
10897
|
-
svgLink: svgLink,
|
|
10898
|
-
svgObject: svgObject,
|
|
10899
|
-
svgPath: svgPath,
|
|
10900
|
-
svgPolygon: svgPolygon,
|
|
10901
|
-
svgRect: svgRect,
|
|
10902
|
-
svgText: svgText
|
|
8499
|
+
ZikoUISvg: ZikoUISvg
|
|
10903
8500
|
});
|
|
10904
8501
|
|
|
10905
8502
|
// import { convolute } from "../../math/signal/conv.js";
|
|
10906
|
-
class ZikoUICanvas extends
|
|
8503
|
+
class ZikoUICanvas extends ZikoUIElement{
|
|
10907
8504
|
constructor(w,h){
|
|
10908
8505
|
super("canvas","canvas");
|
|
10909
8506
|
this.ctx = this.element?.getContext("2d");
|
|
@@ -11073,288 +8670,10 @@ class ZikoUICanvas extends ZikoUIContainerElement{
|
|
|
11073
8670
|
|
|
11074
8671
|
const Canvas=(w,h)=>new ZikoUICanvas(w,h);
|
|
11075
8672
|
|
|
11076
|
-
class ZikoCanvasElement{
|
|
11077
|
-
constructor(x,y){
|
|
11078
|
-
this.parent=null;
|
|
11079
|
-
this.position={
|
|
11080
|
-
x,
|
|
11081
|
-
y
|
|
11082
|
-
};
|
|
11083
|
-
this.cache={
|
|
11084
|
-
interact:null/*avoid redraw*/,
|
|
11085
|
-
config:{
|
|
11086
|
-
draggable:false,
|
|
11087
|
-
selected:false,
|
|
11088
|
-
highlighted:false,
|
|
11089
|
-
rendered:false
|
|
11090
|
-
},
|
|
11091
|
-
style:{
|
|
11092
|
-
normal:{
|
|
11093
|
-
strokeEnabled:true,
|
|
11094
|
-
fillEnabled:false,
|
|
11095
|
-
strokeColor:"#111111",
|
|
11096
|
-
fillColor:"#777777",
|
|
11097
|
-
},
|
|
11098
|
-
highlighted:{
|
|
11099
|
-
strokeEnabled:true,
|
|
11100
|
-
fillEnabled:false,
|
|
11101
|
-
strokeColor:null,
|
|
11102
|
-
fillColor:null,
|
|
11103
|
-
}
|
|
11104
|
-
},
|
|
11105
|
-
};
|
|
11106
|
-
this.history={
|
|
11107
|
-
position:[],
|
|
11108
|
-
styles:[]
|
|
11109
|
-
};
|
|
11110
|
-
this.render();
|
|
11111
|
-
}
|
|
11112
|
-
get px(){
|
|
11113
|
-
//_x=====>px
|
|
11114
|
-
return (this.position.x??0)+(this.parent?.position?.x??0);
|
|
11115
|
-
}
|
|
11116
|
-
get py(){
|
|
11117
|
-
//_y=====>py
|
|
11118
|
-
return (this.position.y??0)+(this.parent?.position?.y??0);
|
|
11119
|
-
}
|
|
11120
|
-
isIntersectedWith(){
|
|
11121
|
-
|
|
11122
|
-
}
|
|
11123
|
-
isInStroke(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.isPointInStroke(this.path,x,y);
|
|
11128
|
-
this.parent.applyTransformMatrix();
|
|
11129
|
-
}
|
|
11130
|
-
return is;
|
|
11131
|
-
}
|
|
11132
|
-
isInPath(x,y){
|
|
11133
|
-
let is;
|
|
11134
|
-
if(this.parent){
|
|
11135
|
-
this.parent.ctx.setTransform(1,0,0,1,0,0);
|
|
11136
|
-
is=this.parent.ctx.isPointInPath(this.path,x,y);
|
|
11137
|
-
this.parent.applyTransformMatrix();
|
|
11138
|
-
}
|
|
11139
|
-
return is;
|
|
11140
|
-
}
|
|
11141
|
-
posX(x){
|
|
11142
|
-
this.position.x=x;
|
|
11143
|
-
if(this.parent)this.parent.draw();
|
|
11144
|
-
return this;
|
|
11145
|
-
}
|
|
11146
|
-
posY(y){
|
|
11147
|
-
this.position.y=y;
|
|
11148
|
-
if(this.parent)this.parent.draw();
|
|
11149
|
-
return this;
|
|
11150
|
-
}
|
|
11151
|
-
color({stroke=this.cache.style.normal.strokeColor,fill=this.cache.style.normal.fillColor}={stroke,fill}){
|
|
11152
|
-
this.cache.style.normal.strokeColor=stroke;
|
|
11153
|
-
this.cache.style.normal.fillColor=fill;
|
|
11154
|
-
if(this.parent)this.parent.draw();
|
|
11155
|
-
return this;
|
|
11156
|
-
}
|
|
11157
|
-
translate(dx=0,dy=0){
|
|
11158
|
-
this.position.x+=dx;
|
|
11159
|
-
this.position.y+=dy;
|
|
11160
|
-
if(this.parent)this.parent.draw();
|
|
11161
|
-
return;
|
|
11162
|
-
}
|
|
11163
|
-
applyNormalStyle(ctx){
|
|
11164
|
-
ctx.strokeStyle=this.cache.style.normal.strokeColor;
|
|
11165
|
-
ctx.fillStyle=this.cache.style.normal.fillColor;
|
|
11166
|
-
return this;
|
|
11167
|
-
}
|
|
11168
|
-
applyHighlightedStyle(ctx){
|
|
11169
|
-
ctx.strokeStyle=this.cache.style.highlighted.strokeColor;
|
|
11170
|
-
ctx.fillStyle=this.cache.style.highlighted.fillColor;
|
|
11171
|
-
return this;
|
|
11172
|
-
}
|
|
11173
|
-
stroke(color=this.cache.style.normal.strokeColor,enabled=true){
|
|
11174
|
-
this.cache.style.normal.strokeEnabled=enabled;
|
|
11175
|
-
this.cache.style.normal.strokeColor=color;
|
|
11176
|
-
if(this.parent)this.parent.draw();
|
|
11177
|
-
return this
|
|
11178
|
-
}
|
|
11179
|
-
fill(color=this.cache.style.normal.fillColor,enabled=true){
|
|
11180
|
-
this.cache.style.normal.fillEnabled=enabled;
|
|
11181
|
-
this.cache.style.normal.filleColor=color;
|
|
11182
|
-
if(this.parent)this.parent.draw();
|
|
11183
|
-
return this;
|
|
11184
|
-
}
|
|
11185
|
-
render(render=true){
|
|
11186
|
-
this.cache.config.rendered=render;
|
|
11187
|
-
return this;
|
|
11188
|
-
}
|
|
11189
|
-
}
|
|
11190
|
-
|
|
11191
|
-
class CanvasArc extends ZikoCanvasElement{
|
|
11192
|
-
constructor(x,y,r,angle){
|
|
11193
|
-
super(x,y);
|
|
11194
|
-
this.r=r;
|
|
11195
|
-
this.angle=angle;
|
|
11196
|
-
this.path=null;
|
|
11197
|
-
}
|
|
11198
|
-
draw(ctx){
|
|
11199
|
-
if(this.cache.config.rendered){
|
|
11200
|
-
ctx.save();
|
|
11201
|
-
this.applyNormalStyle(ctx);
|
|
11202
|
-
ctx.beginPath();
|
|
11203
|
-
this.path=new Path2D();
|
|
11204
|
-
this.path.arc(this.px, this.py, this.r, 0, this.angle);
|
|
11205
|
-
const{strokeEnabled,fillEnabled}=this.cache.style.normal;
|
|
11206
|
-
if(strokeEnabled)ctx.stroke(this.path);
|
|
11207
|
-
if(fillEnabled)ctx.fill(this.path);
|
|
11208
|
-
ctx.closePath();
|
|
11209
|
-
ctx.restore();
|
|
11210
|
-
}
|
|
11211
|
-
return this;
|
|
11212
|
-
}
|
|
11213
|
-
radius(r){
|
|
11214
|
-
this.r=r;
|
|
11215
|
-
if(this.parent)this.parent.draw();
|
|
11216
|
-
return this;
|
|
11217
|
-
}
|
|
11218
|
-
// distanceFromCenter(x,y){
|
|
11219
|
-
// return Math.sqrt(
|
|
11220
|
-
// (this._x-x)**2-(this._y-y)**2
|
|
11221
|
-
// )
|
|
11222
|
-
// }
|
|
11223
|
-
// isIn(x,y,strict=false){
|
|
11224
|
-
// return strict?this.distanceFromCenter(x,y)<this.r:this.distanceFromCenter(x,y)<=this.r;
|
|
11225
|
-
// }
|
|
11226
|
-
// isInEdges(x,y){
|
|
11227
|
-
// return this.distanceFromCenter(x,y)===this.r;
|
|
11228
|
-
// }
|
|
11229
|
-
}
|
|
11230
|
-
const canvasArc=(x,y,r,phi)=>new CanvasArc(x,y,r,phi);
|
|
11231
|
-
const canvasCircle=(x,y,r)=>new CanvasArc(x,y,r,2*Math.PI);
|
|
11232
|
-
|
|
11233
|
-
class CanvasPoints extends ZikoCanvasElement{
|
|
11234
|
-
constructor(ptsX,ptsY){
|
|
11235
|
-
super();
|
|
11236
|
-
this.pointsMatrix=null;
|
|
11237
|
-
this.path=new Path2D();
|
|
11238
|
-
this.fromXY(ptsX,ptsY);
|
|
11239
|
-
}
|
|
11240
|
-
get points(){
|
|
11241
|
-
return this.pointsMatrix.T.arr;
|
|
11242
|
-
}
|
|
11243
|
-
draw(ctx){
|
|
11244
|
-
if(this.cache.config.rendered){
|
|
11245
|
-
ctx.save();
|
|
11246
|
-
this.applyNormalStyle(ctx);
|
|
11247
|
-
ctx.beginPath();
|
|
11248
|
-
this.path.moveTo(this.points[1][0]+this._x,this.points[1][1]+this._y);
|
|
11249
|
-
for(let i=1;i<this.points.length;i++){
|
|
11250
|
-
this.path.lineTo(this.points[i][0]+this._x,this.points[i][1]+this._y);
|
|
11251
|
-
}
|
|
11252
|
-
ctx.stroke(this.path);
|
|
11253
|
-
ctx.restore();
|
|
11254
|
-
}
|
|
11255
|
-
return this;
|
|
11256
|
-
}
|
|
11257
|
-
fromXY(X,Y){
|
|
11258
|
-
this.pointsMatrix=matrix([X,Y]);
|
|
11259
|
-
return this;
|
|
11260
|
-
}
|
|
11261
|
-
push(ptsX,ptsY){
|
|
11262
|
-
this.pointsMatrix.hstack(matrix([ptsX,ptsY]));
|
|
11263
|
-
if(this.parent)this.parent.draw();
|
|
11264
|
-
return this;
|
|
11265
|
-
}
|
|
11266
|
-
isIn(x,y){
|
|
11267
|
-
let is;
|
|
11268
|
-
if(this.parent){
|
|
11269
|
-
this.parent.ctx.setTransform(1,0,0,1,0,0);
|
|
11270
|
-
is=this.parent.ctx.isPointInPath(this.path,x,y);
|
|
11271
|
-
this.parent.applyTransformMatrix();
|
|
11272
|
-
}
|
|
11273
|
-
return is;
|
|
11274
|
-
}
|
|
11275
|
-
}
|
|
11276
|
-
|
|
11277
|
-
const canvasPoints=(ptsX=[],ptsY=[])=>new CanvasPoints(ptsX,ptsY);
|
|
11278
|
-
|
|
11279
|
-
class CanvasLine extends ZikoCanvasElement{
|
|
11280
|
-
constructor(x0,y0,x1,y1){
|
|
11281
|
-
super();
|
|
11282
|
-
this.x0=x0;
|
|
11283
|
-
this.x1=x1;
|
|
11284
|
-
this.y0=y0;
|
|
11285
|
-
this.y1=y1;
|
|
11286
|
-
delete this.fill;
|
|
11287
|
-
}
|
|
11288
|
-
draw(ctx){
|
|
11289
|
-
if(this.cache.config.rendered){
|
|
11290
|
-
ctx.save();
|
|
11291
|
-
this.applyNormalStyle(ctx);
|
|
11292
|
-
ctx.beginPath();
|
|
11293
|
-
ctx.moveTo(this.x0+this._x,this.y0+this._y_);
|
|
11294
|
-
ctx.lineTo(this.x1+this._x,this.y1+this._y);
|
|
11295
|
-
ctx.stroke();
|
|
11296
|
-
if(this.cache.style.normal.strokeEnabled)ctx.stroke();
|
|
11297
|
-
ctx.restore();
|
|
11298
|
-
}
|
|
11299
|
-
return this;
|
|
11300
|
-
}
|
|
11301
|
-
}
|
|
11302
|
-
const canvasLine=(x0,y0,x1,y1)=>new CanvasLine(x0,y0,x1,y1);
|
|
11303
|
-
|
|
11304
|
-
class CanvasRect extends ZikoCanvasElement{
|
|
11305
|
-
constructor(x,y,w,h){
|
|
11306
|
-
super(x,y);
|
|
11307
|
-
this.w=w;
|
|
11308
|
-
this.h=h;
|
|
11309
|
-
this.path=new Path2D();
|
|
11310
|
-
}
|
|
11311
|
-
draw(ctx){
|
|
11312
|
-
if(this.cache.config.rendered){
|
|
11313
|
-
ctx.save();
|
|
11314
|
-
this.applyNormalStyle(ctx);
|
|
11315
|
-
ctx.beginPath();
|
|
11316
|
-
this.path.rect(this.px, this.py,this.w,this.h);
|
|
11317
|
-
const{strokeEnabled,fillEnabled}=this.cache.style.normal;
|
|
11318
|
-
if(strokeEnabled)ctx.stroke(this.path);
|
|
11319
|
-
if(fillEnabled)ctx.fill(this.path);
|
|
11320
|
-
ctx.closePath();
|
|
11321
|
-
ctx.restore();
|
|
11322
|
-
}
|
|
11323
|
-
return this;
|
|
11324
|
-
}
|
|
11325
|
-
width(w){
|
|
11326
|
-
this.w=w;
|
|
11327
|
-
if(this.parent)this.parent.draw();
|
|
11328
|
-
return this;
|
|
11329
|
-
}
|
|
11330
|
-
height(h){
|
|
11331
|
-
this.h=h;
|
|
11332
|
-
if(this.parent)this.parent.draw();
|
|
11333
|
-
return this;
|
|
11334
|
-
}
|
|
11335
|
-
// distanceFromCenter(x,y){
|
|
11336
|
-
// return Math.sqrt(
|
|
11337
|
-
// (this.position.x-x)**2-(this.position.y-y)**2
|
|
11338
|
-
// )
|
|
11339
|
-
// }
|
|
11340
|
-
// isIn(x,y,strict=false){
|
|
11341
|
-
// return strict?this.distanceFromCenter(x,y)<this.r:this.distanceFromCenter(x,y)<=this.r;
|
|
11342
|
-
// }
|
|
11343
|
-
// isInEdges(x,y){
|
|
11344
|
-
// return this.distanceFromCenter(x,y)===this.r;
|
|
11345
|
-
// }
|
|
11346
|
-
}
|
|
11347
|
-
const canvasRect=(x,y,w,h)=>new CanvasRect(x,y,w,h);
|
|
11348
|
-
|
|
11349
8673
|
var CANVAS = /*#__PURE__*/Object.freeze({
|
|
11350
8674
|
__proto__: null,
|
|
11351
8675
|
Canvas: Canvas,
|
|
11352
|
-
ZikoUICanvas: ZikoUICanvas
|
|
11353
|
-
canvasArc: canvasArc,
|
|
11354
|
-
canvasCircle: canvasCircle,
|
|
11355
|
-
canvasLine: canvasLine,
|
|
11356
|
-
canvasPoints: canvasPoints,
|
|
11357
|
-
canvasRect: canvasRect
|
|
8676
|
+
ZikoUICanvas: ZikoUICanvas
|
|
11358
8677
|
});
|
|
11359
8678
|
|
|
11360
8679
|
const Graphics = {
|
|
@@ -11659,7 +8978,7 @@ class ZikoSPA extends ZikoApp{
|
|
|
11659
8978
|
constructor({head, wrapper, target, routes}){
|
|
11660
8979
|
super({head, wrapper, target});
|
|
11661
8980
|
this.routes=new Map([
|
|
11662
|
-
["404",text
|
|
8981
|
+
["404",text("Error 404")],
|
|
11663
8982
|
...Object.entries(routes)
|
|
11664
8983
|
]);
|
|
11665
8984
|
this.clear();
|
|
@@ -11739,7 +9058,7 @@ function defineParamsGetter(target ){
|
|
|
11739
9058
|
}
|
|
11740
9059
|
|
|
11741
9060
|
const __UI__={};
|
|
11742
|
-
const __HYDRATION_MAP__ =
|
|
9061
|
+
const __HYDRATION_MAP__ = new Map();
|
|
11743
9062
|
const __Config__={
|
|
11744
9063
|
default:{
|
|
11745
9064
|
target:null,
|
|
@@ -11753,7 +9072,9 @@ const __Config__={
|
|
|
11753
9072
|
const values=Object.values(pairs);
|
|
11754
9073
|
for(let i=0;i<keys.length;i++)this.default[keys[i]]=values[i];
|
|
11755
9074
|
},
|
|
11756
|
-
init:()=>document.documentElement.setAttribute("data-engine","zikojs")
|
|
9075
|
+
init:()=>document.documentElement.setAttribute("data-engine","zikojs"),
|
|
9076
|
+
renderingMode :"spa",
|
|
9077
|
+
isSSC : false,
|
|
11757
9078
|
};
|
|
11758
9079
|
|
|
11759
9080
|
var Global = /*#__PURE__*/Object.freeze({
|
|
@@ -11894,24 +9215,18 @@ function RemoveAll(){
|
|
|
11894
9215
|
Data.RemoveAll();
|
|
11895
9216
|
}
|
|
11896
9217
|
|
|
11897
|
-
exports.Accordion = Accordion;
|
|
11898
9218
|
exports.App = App$1;
|
|
11899
9219
|
exports.Article = Article;
|
|
11900
9220
|
exports.Aside = Aside;
|
|
11901
9221
|
exports.Base = Base;
|
|
11902
|
-
exports.Breadcrumbs = Breadcrumbs;
|
|
11903
9222
|
exports.Canvas = Canvas;
|
|
11904
|
-
exports.Carousel = Carousel;
|
|
11905
|
-
exports.CodeCell = CodeCell;
|
|
11906
|
-
exports.CodeNote = CodeNote;
|
|
11907
|
-
exports.Collapsible = Collapsible;
|
|
11908
9223
|
exports.Combinaison = Combinaison;
|
|
11909
9224
|
exports.Complex = Complex;
|
|
11910
9225
|
exports.E = E;
|
|
11911
9226
|
exports.EPSILON = EPSILON;
|
|
11912
9227
|
exports.Ease = Ease;
|
|
11913
9228
|
exports.FileBasedRouting = FileBasedRouting;
|
|
11914
|
-
exports.Flex = Flex
|
|
9229
|
+
exports.Flex = Flex;
|
|
11915
9230
|
exports.Footer = Footer;
|
|
11916
9231
|
exports.Form = Form;
|
|
11917
9232
|
exports.Grid = Grid$1;
|
|
@@ -11921,7 +9236,6 @@ exports.LinearSystem = LinearSystem;
|
|
|
11921
9236
|
exports.Logic = Logic$1;
|
|
11922
9237
|
exports.Main = Main;
|
|
11923
9238
|
exports.Matrix = Matrix;
|
|
11924
|
-
exports.Modal = Modal;
|
|
11925
9239
|
exports.Nav = Nav;
|
|
11926
9240
|
exports.PI = PI$1;
|
|
11927
9241
|
exports.Permutation = Permutation;
|
|
@@ -11929,13 +9243,10 @@ exports.Random = Random;
|
|
|
11929
9243
|
exports.SPA = SPA;
|
|
11930
9244
|
exports.SVGWrapper = SVGWrapper;
|
|
11931
9245
|
exports.Section = Section;
|
|
11932
|
-
exports.Slider = Slider;
|
|
11933
|
-
exports.Splitter = Splitter;
|
|
11934
9246
|
exports.Str = Str;
|
|
11935
9247
|
exports.Suspense = Suspense;
|
|
11936
9248
|
exports.Svg = Svg;
|
|
11937
9249
|
exports.Table = Table$1;
|
|
11938
|
-
exports.Tabs = Tabs;
|
|
11939
9250
|
exports.Utils = Utils$1;
|
|
11940
9251
|
exports.ZikoApp = ZikoApp;
|
|
11941
9252
|
exports.ZikoCustomEvent = ZikoCustomEvent;
|
|
@@ -11953,40 +9264,24 @@ exports.ZikoHead = ZikoHead$1;
|
|
|
11953
9264
|
exports.ZikoJsonStyleSheet = ZikoJsonStyleSheet;
|
|
11954
9265
|
exports.ZikoMutationObserver = ZikoMutationObserver;
|
|
11955
9266
|
exports.ZikoSPA = ZikoSPA;
|
|
11956
|
-
exports.ZikoSvgCircle = ZikoSvgCircle;
|
|
11957
|
-
exports.ZikoSvgEllipse = ZikoSvgEllipse;
|
|
11958
|
-
exports.ZikoSvgForeignObject = ZikoSvgForeignObject;
|
|
11959
|
-
exports.ZikoSvgGroupe = ZikoSvgGroupe;
|
|
11960
|
-
exports.ZikoSvgImage = ZikoSvgImage;
|
|
11961
|
-
exports.ZikoSvgLine = ZikoSvgLine;
|
|
11962
|
-
exports.ZikoSvgLink = ZikoSvgLink;
|
|
11963
|
-
exports.ZikoSvgPath = ZikoSvgPath;
|
|
11964
|
-
exports.ZikoSvgRectangle = ZikoSvgRectangle;
|
|
11965
|
-
exports.ZikoSvgText = ZikoSvgText;
|
|
11966
9267
|
exports.ZikoUIAbbrText = ZikoUIAbbrText;
|
|
11967
|
-
exports.ZikoUIAccordion = ZikoUIAccordion;
|
|
11968
9268
|
exports.ZikoUIArticle = ZikoUIArticle;
|
|
11969
9269
|
exports.ZikoUIAside = ZikoUIAside;
|
|
11970
9270
|
exports.ZikoUIAudio = ZikoUIAudio;
|
|
11971
9271
|
exports.ZikoUIBlockQuote = ZikoUIBlockQuote;
|
|
11972
9272
|
exports.ZikoUIBr = ZikoUIBr;
|
|
11973
|
-
exports.ZikoUIBreadcrumbs = ZikoUIBreadcrumbs;
|
|
11974
9273
|
exports.ZikoUICanvas = ZikoUICanvas;
|
|
11975
|
-
exports.ZikoUICodeNote = ZikoUICodeNote;
|
|
11976
9274
|
exports.ZikoUICodeText = ZikoUICodeText;
|
|
11977
|
-
exports.ZikoUIContainerElement = ZikoUIContainerElement;
|
|
11978
9275
|
exports.ZikoUIDefintion = ZikoUIDefintion;
|
|
11979
9276
|
exports.ZikoUIElement = ZikoUIElement;
|
|
11980
9277
|
exports.ZikoUIFigure = ZikoUIFigure;
|
|
11981
|
-
exports.ZikoUIFlex = ZikoUIFlex
|
|
9278
|
+
exports.ZikoUIFlex = ZikoUIFlex;
|
|
11982
9279
|
exports.ZikoUIFooter = ZikoUIFooter;
|
|
11983
9280
|
exports.ZikoUIForm = ZikoUIForm;
|
|
11984
9281
|
exports.ZikoUIGrid = ZikoUIGrid;
|
|
11985
9282
|
exports.ZikoUIHTMLWrapper = ZikoUIHTMLWrapper;
|
|
11986
9283
|
exports.ZikoUIHeader = ZikoUIHeader;
|
|
11987
9284
|
exports.ZikoUIHeading = ZikoUIHeading;
|
|
11988
|
-
exports.ZikoUIHorizontalSlider = ZikoUIHorizontalSlider;
|
|
11989
|
-
exports.ZikoUIHorizontalSplitter = ZikoUIHorizontalSplitter;
|
|
11990
9285
|
exports.ZikoUIHr = ZikoUIHr;
|
|
11991
9286
|
exports.ZikoUIHtmlTag = ZikoUIHtmlTag;
|
|
11992
9287
|
exports.ZikoUIImage = ZikoUIImage;
|
|
@@ -12008,8 +9303,6 @@ exports.ZikoUIInputTime = ZikoUIInputTime;
|
|
|
12008
9303
|
exports.ZikoUILabel = ZikoUILabel;
|
|
12009
9304
|
exports.ZikoUILink = ZikoUILink;
|
|
12010
9305
|
exports.ZikoUIMain = ZikoUIMain;
|
|
12011
|
-
exports.ZikoUIMenu3d = ZikoUIMenu3d;
|
|
12012
|
-
exports.ZikoUIModal = ZikoUIModal;
|
|
12013
9306
|
exports.ZikoUINav = ZikoUINav;
|
|
12014
9307
|
exports.ZikoUIParagraphe = ZikoUIParagraphe;
|
|
12015
9308
|
exports.ZikoUIQuote = ZikoUIQuote;
|
|
@@ -12022,8 +9315,6 @@ exports.ZikoUISuspense = ZikoUISuspense;
|
|
|
12022
9315
|
exports.ZikoUISvg = ZikoUISvg;
|
|
12023
9316
|
exports.ZikoUIText = ZikoUIText;
|
|
12024
9317
|
exports.ZikoUITextArea = ZikoUITextArea;
|
|
12025
|
-
exports.ZikoUIVerticalSlider = ZikoUIVerticalSlider;
|
|
12026
|
-
exports.ZikoUIVerticalSplitter = ZikoUIVerticalSplitter;
|
|
12027
9318
|
exports.ZikoUIVideo = ZikoUIVideo;
|
|
12028
9319
|
exports.ZikoUIXMLWrapper = ZikoUIXMLWrapper;
|
|
12029
9320
|
exports.ZikoUseRoot = ZikoUseRoot;
|
|
@@ -12038,7 +9329,6 @@ exports.acos = acos;
|
|
|
12038
9329
|
exports.acosh = acosh;
|
|
12039
9330
|
exports.acot = acot;
|
|
12040
9331
|
exports.add = add;
|
|
12041
|
-
exports.adoc2html = adoc2html;
|
|
12042
9332
|
exports.arange = arange;
|
|
12043
9333
|
exports.arr2str = arr2str;
|
|
12044
9334
|
exports.asin = asin;
|
|
@@ -12053,11 +9343,6 @@ exports.blockQuote = blockQuote;
|
|
|
12053
9343
|
exports.br = br;
|
|
12054
9344
|
exports.brs = brs;
|
|
12055
9345
|
exports.btn = btn;
|
|
12056
|
-
exports.canvasArc = canvasArc;
|
|
12057
|
-
exports.canvasCircle = canvasCircle;
|
|
12058
|
-
exports.canvasLine = canvasLine;
|
|
12059
|
-
exports.canvasPoints = canvasPoints;
|
|
12060
|
-
exports.canvasRect = canvasRect;
|
|
12061
9346
|
exports.cartesianProduct = cartesianProduct;
|
|
12062
9347
|
exports.ceil = ceil;
|
|
12063
9348
|
exports.checkbox = checkbox;
|
|
@@ -12078,7 +9363,6 @@ exports.csv2json = csv2json;
|
|
|
12078
9363
|
exports.csv2matrix = csv2matrix;
|
|
12079
9364
|
exports.csv2object = csv2object;
|
|
12080
9365
|
exports.csv2sql = csv2sql;
|
|
12081
|
-
exports.dangerAlert = dangerAlert;
|
|
12082
9366
|
exports.datalist = datalist;
|
|
12083
9367
|
exports.default = Ziko;
|
|
12084
9368
|
exports.defineParamsGetter = defineParamsGetter;
|
|
@@ -12098,8 +9382,6 @@ exports.h3 = h3;
|
|
|
12098
9382
|
exports.h4 = h4;
|
|
12099
9383
|
exports.h5 = h5;
|
|
12100
9384
|
exports.h6 = h6;
|
|
12101
|
-
exports.hSlider = hSlider;
|
|
12102
|
-
exports.hSplitter = hSplitter;
|
|
12103
9385
|
exports.hTags = hTags;
|
|
12104
9386
|
exports.hr = hr;
|
|
12105
9387
|
exports.hrs = hrs;
|
|
@@ -12107,7 +9389,6 @@ exports.html = html;
|
|
|
12107
9389
|
exports.hypot = hypot;
|
|
12108
9390
|
exports.image = image;
|
|
12109
9391
|
exports.inRange = inRange;
|
|
12110
|
-
exports.infoAlert = infoAlert;
|
|
12111
9392
|
exports.input = input;
|
|
12112
9393
|
exports.inputCamera = inputCamera;
|
|
12113
9394
|
exports.inputColor = inputColor;
|
|
@@ -12137,13 +9418,11 @@ exports.logspace = logspace;
|
|
|
12137
9418
|
exports.luDecomposition = luDecomposition;
|
|
12138
9419
|
exports.map = map;
|
|
12139
9420
|
exports.mapfun = mapfun$1;
|
|
12140
|
-
exports.markdown2html = markdown2html;
|
|
12141
9421
|
exports.matrix = matrix;
|
|
12142
9422
|
exports.matrix2 = matrix2;
|
|
12143
9423
|
exports.matrix3 = matrix3;
|
|
12144
9424
|
exports.matrix4 = matrix4;
|
|
12145
9425
|
exports.max = max;
|
|
12146
|
-
exports.menu3d = menu3d;
|
|
12147
9426
|
exports.min = min;
|
|
12148
9427
|
exports.modulo = modulo;
|
|
12149
9428
|
exports.mul = mul;
|
|
@@ -12182,34 +9461,20 @@ exports.str = str;
|
|
|
12182
9461
|
exports.sub = sub;
|
|
12183
9462
|
exports.subSet = subSet;
|
|
12184
9463
|
exports.subText = subText;
|
|
12185
|
-
exports.successAlert = successAlert;
|
|
12186
9464
|
exports.sum = sum;
|
|
12187
9465
|
exports.supText = supText;
|
|
12188
9466
|
exports.svg2ascii = svg2ascii;
|
|
12189
9467
|
exports.svg2img = svg2img;
|
|
12190
9468
|
exports.svg2imgUrl = svg2imgUrl;
|
|
12191
9469
|
exports.svg2str = svg2str;
|
|
12192
|
-
exports.svgCircle = svgCircle;
|
|
12193
|
-
exports.svgEllipse = svgEllipse;
|
|
12194
|
-
exports.svgGrid = svgGrid;
|
|
12195
|
-
exports.svgGroupe = svgGroupe;
|
|
12196
|
-
exports.svgImage = svgImage;
|
|
12197
|
-
exports.svgLine = svgLine;
|
|
12198
|
-
exports.svgLink = svgLink;
|
|
12199
|
-
exports.svgObject = svgObject;
|
|
12200
|
-
exports.svgPath = svgPath;
|
|
12201
|
-
exports.svgPolygon = svgPolygon;
|
|
12202
|
-
exports.svgRect = svgRect;
|
|
12203
|
-
exports.svgText = svgText;
|
|
12204
9470
|
exports.tan = tan;
|
|
12205
9471
|
exports.tanh = tanh;
|
|
12206
|
-
exports.text = text
|
|
9472
|
+
exports.text = text;
|
|
12207
9473
|
exports.textarea = textarea;
|
|
12208
9474
|
exports.timeTaken = timeTaken;
|
|
12209
9475
|
exports.time_memory_Taken = time_memory_Taken;
|
|
12210
9476
|
exports.ul = ul;
|
|
12211
9477
|
exports.useAnimation = useAnimation;
|
|
12212
|
-
exports.useBattery = useBattery;
|
|
12213
9478
|
exports.useChannel = useChannel$1;
|
|
12214
9479
|
exports.useClickEvent = useClickEvent;
|
|
12215
9480
|
exports.useClipboardEvent = useClipboardEvent;
|
|
@@ -12221,7 +9486,6 @@ exports.useEventEmitter = useEventEmitter;
|
|
|
12221
9486
|
exports.useFavIcon = useFavIcon$1;
|
|
12222
9487
|
exports.useFocusEvent = useFocusEvent;
|
|
12223
9488
|
exports.useFps = useFps;
|
|
12224
|
-
exports.useGeolocation = useGeolocation;
|
|
12225
9489
|
exports.useHashEvent = useHashEvent;
|
|
12226
9490
|
exports.useHead = useHead$1;
|
|
12227
9491
|
exports.useInputEvent = useInputEvent;
|
|
@@ -12243,13 +9507,10 @@ exports.useTimeLoop = useTimeLoop;
|
|
|
12243
9507
|
exports.useTitle = useTitle$1;
|
|
12244
9508
|
exports.useType = useType;
|
|
12245
9509
|
exports.useWheelEvent = useWheelEvent;
|
|
12246
|
-
exports.vSlider = vSlider;
|
|
12247
|
-
exports.vSplitter = vSplitter;
|
|
12248
9510
|
exports.video = video;
|
|
12249
9511
|
exports.wait = wait;
|
|
12250
9512
|
exports.waitForUIElm = waitForUIElm;
|
|
12251
9513
|
exports.waitForUIElmSync = waitForUIElmSync;
|
|
12252
|
-
exports.warningAlert = warningAlert;
|
|
12253
9514
|
exports.watch = watch;
|
|
12254
9515
|
exports.watchAttr = watchAttr;
|
|
12255
9516
|
exports.watchChildren = watchChildren;
|