@windwalker-io/unicorn-next 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/.editorconfig +18 -0
  2. package/.gulp.json +7 -0
  3. package/bin/release.mjs +47 -0
  4. package/dist/chunks/_arrayPush.js +168 -0
  5. package/dist/chunks/_arrayPush.js.map +1 -0
  6. package/dist/chunks/_baseRest.js +73 -0
  7. package/dist/chunks/_baseRest.js.map +1 -0
  8. package/dist/chunks/_commonjsHelpers.js +7 -0
  9. package/dist/chunks/_commonjsHelpers.js.map +1 -0
  10. package/dist/chunks/_getPrototype.js +130 -0
  11. package/dist/chunks/_getPrototype.js.map +1 -0
  12. package/dist/chunks/button-radio.js +147 -0
  13. package/dist/chunks/button-radio.js.map +1 -0
  14. package/dist/chunks/checkboxes-multi-select.js +44 -0
  15. package/dist/chunks/checkboxes-multi-select.js.map +1 -0
  16. package/dist/chunks/cloneDeep.js +287 -0
  17. package/dist/chunks/cloneDeep.js.map +1 -0
  18. package/dist/chunks/cropper.min.js +5 -0
  19. package/dist/chunks/cropper.min.js.map +1 -0
  20. package/dist/chunks/field-cascade-select.js +256 -0
  21. package/dist/chunks/field-cascade-select.js.map +1 -0
  22. package/dist/chunks/field-file-drag.js +218 -0
  23. package/dist/chunks/field-file-drag.js.map +1 -0
  24. package/dist/chunks/field-flatpickr.js +893 -0
  25. package/dist/chunks/field-flatpickr.js.map +1 -0
  26. package/dist/chunks/field-modal-select.js +403 -0
  27. package/dist/chunks/field-modal-select.js.map +1 -0
  28. package/dist/chunks/field-modal-tree.js +790 -0
  29. package/dist/chunks/field-modal-tree.js.map +1 -0
  30. package/dist/chunks/field-multi-uploader.js +256 -0
  31. package/dist/chunks/field-multi-uploader.js.map +1 -0
  32. package/dist/chunks/field-repeatable.js +132 -0
  33. package/dist/chunks/field-repeatable.js.map +1 -0
  34. package/dist/chunks/field-single-image-drag.js +338 -0
  35. package/dist/chunks/field-single-image-drag.js.map +1 -0
  36. package/dist/chunks/form.js +154 -0
  37. package/dist/chunks/form.js.map +1 -0
  38. package/dist/chunks/grid.js +345 -0
  39. package/dist/chunks/grid.js.map +1 -0
  40. package/dist/chunks/http-client.js +229 -0
  41. package/dist/chunks/http-client.js.map +1 -0
  42. package/dist/chunks/iframe-modal.js +124 -0
  43. package/dist/chunks/iframe-modal.js.map +1 -0
  44. package/dist/chunks/index.js +309 -0
  45. package/dist/chunks/index.js.map +1 -0
  46. package/dist/chunks/isArguments.js +146 -0
  47. package/dist/chunks/isArguments.js.map +1 -0
  48. package/dist/chunks/keep-tab.js +101 -0
  49. package/dist/chunks/keep-tab.js.map +1 -0
  50. package/dist/chunks/legacy.js +210 -0
  51. package/dist/chunks/legacy.js.map +1 -0
  52. package/dist/chunks/list-dependent.js +231 -0
  53. package/dist/chunks/list-dependent.js.map +1 -0
  54. package/dist/chunks/s3-multipart-uploader.js +172 -0
  55. package/dist/chunks/s3-multipart-uploader.js.map +1 -0
  56. package/dist/chunks/s3-uploader.js +136 -0
  57. package/dist/chunks/s3-uploader.js.map +1 -0
  58. package/dist/chunks/show-on.js +237 -0
  59. package/dist/chunks/show-on.js.map +1 -0
  60. package/dist/chunks/tinymce.js +196 -0
  61. package/dist/chunks/tinymce.js.map +1 -0
  62. package/dist/chunks/ui-bootstrap5.js +71 -0
  63. package/dist/chunks/ui-bootstrap5.js.map +1 -0
  64. package/dist/chunks/unicorn.js +2202 -0
  65. package/dist/chunks/unicorn.js.map +1 -0
  66. package/dist/chunks/validation.js +854 -0
  67. package/dist/chunks/validation.js.map +1 -0
  68. package/dist/editor.css +1 -0
  69. package/dist/index.d.ts +1427 -0
  70. package/dist/multi-level-menu.css +1 -0
  71. package/dist/switcher.css +1 -0
  72. package/dist/unicorn-next.css +12 -0
  73. package/dist/unicorn.js +125 -0
  74. package/dist/unicorn.js.map +1 -0
  75. package/fusionfile.mjs +155 -0
  76. package/images/ajax-loader.gif +0 -0
  77. package/images/placeholder/avatar.png +0 -0
  78. package/images/placeholder/image-16x10.png +0 -0
  79. package/images/placeholder/image-16x9.png +0 -0
  80. package/images/placeholder/image-1x1.png +0 -0
  81. package/images/placeholder/image-4x3.png +0 -0
  82. package/package.json +102 -0
  83. package/scss/bootstrap/multi-level-menu.scss +121 -0
  84. package/scss/editor.scss +116 -0
  85. package/scss/field/file-drag.scss +102 -0
  86. package/scss/field/single-image-drag.scss +88 -0
  87. package/scss/field/vue-drag-uploader.scss +160 -0
  88. package/scss/switcher.scss +156 -0
  89. package/src/app.ts +128 -0
  90. package/src/bootstrap/button-radio.ts +208 -0
  91. package/src/bootstrap/keep-tab.ts +155 -0
  92. package/src/composable/index.ts +21 -0
  93. package/src/composable/useCheckboxesMultiSelect.ts +22 -0
  94. package/src/composable/useFieldCascadeSelect.ts +9 -0
  95. package/src/composable/useFieldFileDrag.ts +9 -0
  96. package/src/composable/useFieldFlatpickr.ts +3 -0
  97. package/src/composable/useFieldModalSelect.ts +6 -0
  98. package/src/composable/useFieldModalTree.ts +3 -0
  99. package/src/composable/useFieldMultiUploader.ts +3 -0
  100. package/src/composable/useFieldRepeatable.ts +9 -0
  101. package/src/composable/useFieldSingleImageDrag.ts +5 -0
  102. package/src/composable/useForm.ts +43 -0
  103. package/src/composable/useGrid.ts +57 -0
  104. package/src/composable/useHttp.ts +8 -0
  105. package/src/composable/useIframeModal.ts +9 -0
  106. package/src/composable/useListDependent.ts +26 -0
  107. package/src/composable/useQueue.ts +13 -0
  108. package/src/composable/useS3Uploader.ts +32 -0
  109. package/src/composable/useShowOn.ts +9 -0
  110. package/src/composable/useStack.ts +13 -0
  111. package/src/composable/useTinymce.ts +29 -0
  112. package/src/composable/useTomSelect.ts +72 -0
  113. package/src/composable/useUIBootstrap5.ts +48 -0
  114. package/src/composable/useUniDirective.ts +32 -0
  115. package/src/composable/useValidation.ts +39 -0
  116. package/src/data.ts +36 -0
  117. package/src/events.ts +73 -0
  118. package/src/legacy/legacy.ts +186 -0
  119. package/src/legacy/loader.ts +125 -0
  120. package/src/module/checkboxes-multi-select.ts +54 -0
  121. package/src/module/field-cascade-select.ts +292 -0
  122. package/src/module/field-file-drag.ts +292 -0
  123. package/src/module/field-flatpickr.ts +127 -0
  124. package/src/module/field-modal-select.ts +174 -0
  125. package/src/module/field-modal-tree.ts +27 -0
  126. package/src/module/field-multi-uploader.ts +361 -0
  127. package/src/module/field-repeatable.ts +202 -0
  128. package/src/module/field-single-image-drag.ts +468 -0
  129. package/src/module/form.ts +223 -0
  130. package/src/module/grid.ts +465 -0
  131. package/src/module/http-client.ts +243 -0
  132. package/src/module/iframe-modal.ts +167 -0
  133. package/src/module/list-dependent.ts +321 -0
  134. package/src/module/s3-multipart-uploader.ts +300 -0
  135. package/src/module/s3-uploader.ts +234 -0
  136. package/src/module/show-on.ts +173 -0
  137. package/src/module/tinymce.ts +263 -0
  138. package/src/module/ui-bootstrap5.ts +107 -0
  139. package/src/module/validation.ts +1019 -0
  140. package/src/plugin/index.ts +1 -0
  141. package/src/plugin/php-adapter.ts +65 -0
  142. package/src/polyfill/form-request-submit.ts +31 -0
  143. package/src/polyfill/index.ts +9 -0
  144. package/src/service/animate.ts +58 -0
  145. package/src/service/crypto.ts +27 -0
  146. package/src/service/dom-watcher.ts +62 -0
  147. package/src/service/dom.ts +265 -0
  148. package/src/service/helper.ts +48 -0
  149. package/src/service/index.ts +10 -0
  150. package/src/service/lang.ts +122 -0
  151. package/src/service/loader.ts +152 -0
  152. package/src/service/router.ts +118 -0
  153. package/src/service/ui.ts +497 -0
  154. package/src/service/uri.ts +106 -0
  155. package/src/types/base.ts +9 -0
  156. package/src/types/index.ts +4 -0
  157. package/src/types/modal-tree.ts +12 -0
  158. package/src/types/plugin.ts +6 -0
  159. package/src/types/shims.d.ts +18 -0
  160. package/src/types/ui.ts +6 -0
  161. package/src/unicorn.ts +63 -0
  162. package/src/utilities/arr.ts +25 -0
  163. package/src/utilities/base.ts +9 -0
  164. package/src/utilities/data.ts +48 -0
  165. package/src/utilities/index.ts +5 -0
  166. package/src/utilities/tree.ts +20 -0
  167. package/src/vue/components/ModalTree/ModalTreeApp.vue +175 -0
  168. package/src/vue/components/ModalTree/TreeItem.vue +262 -0
  169. package/src/vue/components/ModalTree/TreeModal.vue +225 -0
  170. package/tests/test.js +4 -0
  171. package/tsconfig.js.json +25 -0
  172. package/tsconfig.json +17 -0
  173. package/vite.assets.config.ts +61 -0
  174. package/vite.config.test.ts +36 -0
  175. package/vite.config.ts +112 -0
@@ -0,0 +1 @@
1
+ .dropdown-hover .dropdown>.dropdown-menu{display:block;visibility:hidden;opacity:0;min-width:250px}.dropdown-hover .dropdown:hover>.dropdown-menu{visibility:visible;opacity:1}.dropdown .dropdown-item{display:inline-block}.dropdown .dropdown-column{padding:.5rem 0 .5rem 1rem;min-width:250px}.dropdown .dropdown-column:last-child{padding-right:1rem}.dropdown .dropdown-submenu{position:relative}.dropdown .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;display:block;visibility:hidden;opacity:0}.dropdown .dropdown-submenu:hover>.dropdown-menu{visibility:visible;opacity:1}.dropdown .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-fade .dropdown>.dropdown-menu{transition:visibility 0s,display 0s,opacity .25s;transition-delay:.25s,.25s,0s}.dropdown-fade .dropdown:hover>.dropdown-menu{transition-delay:0s,0s,0s}.dropdown-fade .dropdown .dropdown-submenu>.dropdown-menu{transition:visibility 0s,display 0s,opacity .25s;transition-delay:.25s,.25s,0s}.dropdown-fade .dropdown .dropdown-submenu:hover>.dropdown-menu{transition-delay:0s,0s,0s}.subnav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none;margin-left:1rem}.subnav-link{display:block;padding:.5rem 1rem}.subnav-link:hover,.subnav-link:focus{text-decoration:none}.subnav-link.disabled{color:var(--bs-secondary-color);pointer-events:none;cursor:default}
@@ -0,0 +1 @@
1
+ .unicorn-switch{position:relative;display:inline-block;width:60px;height:34px;margin-bottom:0}.unicorn-switch input{width:0;height:0;position:relative;left:30px}.unicorn-switch input:focus{box-shadow:none!important}.unicorn-switch .switch-slider{position:absolute;cursor:pointer;inset:0;-webkit-transition:.4s;transition:.4s;background-color:var(--bs-btn-bg)}.unicorn-switch .switch-slider:hover{background-color:var(--bs-btn-hover-bg)}.unicorn-switch .switch-slider.btn-primary{background-color:var(--bs-btn-bg, var(--bs-primary, var(--primary)))}.unicorn-switch .switch-slider.btn-primary:hover{background-color:var(--bs-btn-hover-bg, var(--bs-primary, var(--primary)))}.unicorn-switch .switch-slider.btn-secondary{background-color:var(--bs-btn-bg, var(--bs-secondary, var(--secondary)))}.unicorn-switch .switch-slider.btn-secondary:hover{background-color:var(--bs-btn-hover-bg, var(--bs-secondary, var(--secondary)))}.unicorn-switch .switch-slider.btn-success{background-color:var(--bs-btn-bg, var(--bs-success, var(--success)))}.unicorn-switch .switch-slider.btn-success:hover{background-color:var(--bs-btn-hover-bg, var(--bs-success, var(--success)))}.unicorn-switch .switch-slider.btn-info{background-color:var(--bs-btn-bg, var(--bs-info, var(--info)))}.unicorn-switch .switch-slider.btn-info:hover{background-color:var(--bs-btn-hover-bg, var(--bs-info, var(--info)))}.unicorn-switch .switch-slider.btn-danger{background-color:var(--bs-btn-bg, var(--bs-danger, var(--danger)))}.unicorn-switch .switch-slider.btn-danger:hover{background-color:var(--bs-btn-hover-bg, var(--bs-danger, var(--danger)))}.unicorn-switch .switch-slider.btn-warning{background-color:var(--bs-btn-bg, var(--bs-warning, var(--warning)))}.unicorn-switch .switch-slider.btn-warning:hover{background-color:var(--bs-btn-hover-bg, var(--bs-warning, var(--warning)))}.unicorn-switch .switch-slider.btn-dark{background-color:var(--bs-btn-bg, var(--bs-dark, var(--dark)))}.unicorn-switch .switch-slider.btn-dark:hover{background-color:var(--bs-btn-hover-bg, var(--bs-dark, var(--dark)))}.unicorn-switch .switch-slider.btn-light{background-color:var(--bs-btn-bg, var(--bs-light, var(--light)))}.unicorn-switch .switch-slider.btn-light:hover{background-color:var(--bs-btn-hover-bg, var(--bs-light, var(--light)))}.unicorn-switch input:focus+.switch-slider{box-shadow:0 0 0 .2rem #007bff40}.unicorn-switch .switch-slider.bg-default{background-color:#ccc}.unicorn-switch .switch-slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.25s}.unicorn-switch input:checked+.switch-slider:before{transform:translate(26px)}.unicorn-switch input:not(:checked)+.switch-slider{background-color:#ccc!important}.unicorn-switch input:not(:checked)+.switch-slider:hover{background-color:#aaa!important}.unicorn-switch input[disabled]+.switch-slider,.unicorn-switch input[readonly]+.switch-slider{opacity:.65;cursor:not-allowed;pointer-events:none}.unicorn-switch .switch-slider.slider-round{border-radius:.25rem}.unicorn-switch .switch-slider.slider-round:before{border-radius:.18rem}.unicorn-switch .switch-slider.slider-circle{border-radius:50px}.unicorn-switch .switch-slider.slider-circle:before{border-radius:100px}.unicorn-switch.switch-sm{width:46px;height:24px}.unicorn-switch.switch-sm .switch-slider:before{height:18px;width:18px;left:3px;bottom:3px}.unicorn-switch.switch-sm input:checked+.switch-slider:before{transform:translate(22px)}.unicorn-switch.switch-lg{width:100px;height:34px}.unicorn-switch.switch-lg .switch-slider:before{height:26px;width:45px;left:4px;bottom:4px}.unicorn-switch.switch-lg input:checked+.switch-slider:before{transform:translate(47px)}.has-invalid .unicorn-switch .switch-slider{border:1px solid #dc3545}
@@ -0,0 +1,12 @@
1
+ .c-tree-item__title[data-v-8a4ae0be] {
2
+ border-bottom: 1px solid #ddd;
3
+ }
4
+ .c-tree-item[data-v-8a4ae0be] {
5
+ cursor: pointer;
6
+ }
7
+ .c-item[data-v-22fa7050] {
8
+ padding-left: .75rem;
9
+ padding-right: .75rem;
10
+ padding-top: .5rem;
11
+ padding-bottom: .5rem;
12
+ }
@@ -0,0 +1,125 @@
1
+ import { aB, at, ae, aH, b5, aG, aD, _, h, aK, aI, aF, b, J, I, aM, d, e, af, a$, aj, ak, aa, D, C, ac, ay, t, T, S, ab, x, y, A, aJ, U, B, f, a7, i, l, N, z, au, n, aL, p, a4, an, ar, as, aq, c, r, w, v, M, G, F, ai, Q, R, P, E, L, ag, K, s, b2, b1, $, Y, V, a9, aA, X, W, aN, aO, aP, aQ, aR, aS, aT, j, a2, a0, aU, g, k, a3, a1, aV, u, aW, a8, am, Z, aw, ap, aX, ao, o, aZ, aY, ax, az, a_, m, q, O, aC, b0, ah, a, al, b4, aE, b3, av, a6 } from "./chunks/unicorn.js";
2
+ export {
3
+ aB as AlertAdapter,
4
+ at as AttributeMutationObserver,
5
+ ae as EventMixin,
6
+ aH as UnicornAssetUri,
7
+ b5 as UnicornPhpAdapter,
8
+ aG as UnicornSystemUri,
9
+ aD as UnicornUI,
10
+ _ as __,
11
+ h as addGlobalValidator,
12
+ aK as addQuery,
13
+ aI as addRoute,
14
+ aF as addUriBase,
15
+ b as animateTo,
16
+ J as base64UrlDecode,
17
+ I as base64UrlEncode,
18
+ aM as buildQuery,
19
+ d as clearMessages,
20
+ e as clearNotifies,
21
+ af as createQueue,
22
+ a$ as createStack,
23
+ aj as createUnicorn,
24
+ ak as createUnicornWithPlugins,
25
+ aa as data,
26
+ D as debounce,
27
+ C as delegate,
28
+ ac as deleteConfirm,
29
+ ay as doImport,
30
+ t as domready,
31
+ T as fadeIn,
32
+ S as fadeOut,
33
+ ab as forceArray,
34
+ x as getBoundedInstance,
35
+ y as getBoundedInstanceList,
36
+ A as h,
37
+ aJ as hasRoute,
38
+ U as highlight,
39
+ B as html,
40
+ f as initAlpineComponent,
41
+ a7 as injectCssToDocument,
42
+ i as isDebug,
43
+ l as loadAlpine,
44
+ N as mark,
45
+ z as module,
46
+ au as nextTick,
47
+ n as notify,
48
+ aL as parseQuery,
49
+ p as prepareAlpine,
50
+ a4 as prepareAlpineDefer,
51
+ an as pushUnicornToGlobal,
52
+ ar as randomBytes,
53
+ as as randomBytesString,
54
+ aq as removeData,
55
+ c as renderMessage,
56
+ r as route,
57
+ w as selectAll,
58
+ v as selectOne,
59
+ M as serial,
60
+ G as simpleAlert,
61
+ F as simpleConfirm,
62
+ ai as sleep,
63
+ Q as slideDown,
64
+ R as slideToggle,
65
+ P as slideUp,
66
+ E as throttle,
67
+ L as tid,
68
+ ag as trans,
69
+ K as uid,
70
+ s as useAssetUri,
71
+ b2 as useBs5ButtonRadio,
72
+ b1 as useBs5KeepTab,
73
+ $ as useBs5Tooltip,
74
+ Y as useCheckboxesMultiSelect,
75
+ V as useColorPicker,
76
+ a9 as useCssImport,
77
+ aA as useCssIncludes,
78
+ X as useDisableIfStackNotEmpty,
79
+ W as useDisableOnSubmit,
80
+ aN as useFieldCascadeSelect,
81
+ aO as useFieldFileDrag,
82
+ aP as useFieldFlatpickr,
83
+ aQ as useFieldModalSelect,
84
+ aR as useFieldModalTree,
85
+ aS as useFieldRepeatable,
86
+ aT as useFieldSingleImageDrag,
87
+ j as useFieldValidationSync,
88
+ a2 as useForm,
89
+ a0 as useFormAsync,
90
+ aU as useFormComponent,
91
+ g as useFormValidation,
92
+ k as useFormValidationSync,
93
+ a3 as useGrid,
94
+ a1 as useGridAsync,
95
+ aV as useGridComponent,
96
+ u as useHttpClient,
97
+ aW as useIframeModal,
98
+ a8 as useImport,
99
+ am as useInject,
100
+ Z as useKeepAlive,
101
+ aw as useLang,
102
+ ap as useLegacy,
103
+ aX as useListDependent,
104
+ ao as useMacro,
105
+ o as useQueue,
106
+ aZ as useS3MultipartUploader,
107
+ aY as useS3Uploader,
108
+ ax as useScriptImport,
109
+ az as useSeriesImport,
110
+ a_ as useShowOn,
111
+ m as useStack,
112
+ q as useSystemUri,
113
+ O as useTomSelect,
114
+ aC as useUI,
115
+ b0 as useUIBootstrap5,
116
+ ah as useUITheme,
117
+ a as useUniDirective,
118
+ al as useUnicorn,
119
+ b4 as useUnicornPhpAdapter,
120
+ aE as useVueComponentField,
121
+ b3 as useWebDirective,
122
+ av as wait,
123
+ a6 as watchAttributes
124
+ };
125
+ //# sourceMappingURL=unicorn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unicorn.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/fusionfile.mjs ADDED
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Part of Windwalker Fusion project.
3
+ *
4
+ * @copyright Copyright (C) 2021 LYRASOFT.
5
+ * @license MIT
6
+ */
7
+
8
+ import fusion, {
9
+ babel,
10
+ webpack,
11
+ rollup,
12
+ sass,
13
+ parallel,
14
+ series,
15
+ module,
16
+ wait,
17
+ ts,
18
+ webpackBundle
19
+ } from '@windwalker-io/fusion';
20
+ import { babelBasicOptions } from '@windwalker-io/fusion/src/utilities/babel.js';
21
+ import dtsBundle from 'bundle-declarations-webpack-plugin';
22
+ import * as path from 'path';
23
+ import * as moduleTasks from './src/fusion/service.mjs';
24
+ export * from './src/fusion/service.mjs';
25
+
26
+ export async function js() {
27
+ // Watch start
28
+ fusion.watch(['src/js/**/*.ts', 'src/systemjs/**/*.ts']);
29
+ // Watch end
30
+
31
+ // Compile Start
32
+ return wait(
33
+ ts('src/js/**/*.ts', 'dist/', { }),
34
+ ts('src/systemjs/**/*.ts', 'dist/', { tsconfig: 'tsconfig.js.json' })
35
+ );
36
+ // Compile end
37
+ }
38
+
39
+ export const modules = parallel(
40
+ ...Object.values(moduleTasks)
41
+ );
42
+
43
+ export async function css() {
44
+ // Watch start
45
+ fusion.watch('scss/**/*.scss');
46
+ // Watch end
47
+
48
+ // Compile Start
49
+ return wait(
50
+ sass('scss/switcher.scss', 'dist/', { minify: 'separate_file' }),
51
+ sass('scss/editor.scss', 'dist/', { minify: 'separate_file' }),
52
+ sass('scss/bootstrap/multi-level-menu.scss', 'dist/bootstrap/', { minify: 'separate_file' }),
53
+ sass('scss/bootstrap/bs4-adapter.scss', 'dist/bootstrap/', { minify: 'separate_file' }),
54
+ sass('scss/field/single-image-drag.scss', 'dist/field/', { minify: 'separate_file' }),
55
+ );
56
+ // Compile end
57
+ }
58
+
59
+ export async function vue() {
60
+ // Watch start
61
+ fusion.watch(['scss/**/*.scss', 'src/vue/**/*']);
62
+ // Watch end
63
+
64
+ // Compile Start
65
+ return wait(
66
+ fusion.vue('src/vue/entries/**/*.js', 'dist/vue/', {
67
+ excludeVue: true
68
+ })
69
+ );
70
+ // Compile end
71
+ }
72
+
73
+ // export async function wc() {
74
+ // // Watch start
75
+ // fusion.watch([
76
+ // 'asset/ws/**/*.js'
77
+ // ]);
78
+ // // Watch end
79
+ //
80
+ // // Compile Start
81
+ // webpack('src/wc/**/*.js', 'dist/ui/', {
82
+ // // override() {
83
+ // // return {
84
+ // // mode: process.env.NODE_ENV || 'development',
85
+ // // output: {
86
+ // // filename: '[name].js',
87
+ // // sourceMapFilename: '[name].js.map'
88
+ // // },
89
+ // // stats: {
90
+ // // all: false,
91
+ // // errors: true,
92
+ // // warnings: true,
93
+ // // version: false,
94
+ // // },
95
+ // // module: {
96
+ // // rules: [
97
+ // // {
98
+ // // test: /\.m?js$/,
99
+ // // // Fis LitElement issue, @see https://github.com/Polymer/lit-element/issues/54#issuecomment-439824447
100
+ // // exclude: /node_modules\/(?!(lit-html|@polymer)\/).*/,
101
+ // // use: [{
102
+ // // loader: 'babel-loader',
103
+ // // options: babelBasicOptions().get()
104
+ // // }, 'webpack-comment-remover-loader']
105
+ // // }
106
+ // // ]
107
+ // // },
108
+ // // plugins: []
109
+ // // };
110
+ // // }
111
+ // });
112
+ // // Compile end
113
+ // }
114
+
115
+ export default parallel(
116
+ js,
117
+ css,
118
+ modules,
119
+ vue
120
+ );
121
+
122
+ /*
123
+ * APIs
124
+ *
125
+ * Compile entry:
126
+ * fusion.js(source, dest, options = {})
127
+ * fusion.babel(source, dest, options = {})
128
+ * fusion.module(source, dest, options = {})
129
+ * fusion.ts(source, dest, options = {})
130
+ * fusion.typeScript(source, dest, options = {})
131
+ * fusion.css(source, dest, options = {})
132
+ * fusion.sass(source, dest, options = {})
133
+ * fusion.copy(source, dest, options = {})
134
+ *
135
+ * Live Reload:
136
+ * fusion.livereload(source, dest, options = {})
137
+ * fusion.reload(file)
138
+ *
139
+ * Gulp proxy:
140
+ * fusion.src(source, options)
141
+ * fusion.dest(path, options)
142
+ * fusion.watch(glob, opt, fn)
143
+ * fusion.symlink(directory, options = {})
144
+ * fusion.lastRun(task, precision)
145
+ * fusion.tree(options = {})
146
+ * fusion.series(...tasks)
147
+ * fusion.parallel(...tasks)
148
+ *
149
+ * Stream Helper:
150
+ * fusion.through(handler) // Same as through2.obj()
151
+ *
152
+ * Config:
153
+ * fusion.disableNotification()
154
+ * fusion.enableNotification()
155
+ */
Binary file
Binary file
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@windwalker-io/unicorn-next",
3
+ "version": "0.1.0",
4
+ "description": "Unicorn framework js library",
5
+ "type": "module",
6
+ "typings": "dist/index.d.ts",
7
+ "main": "dist/unicorn.js",
8
+ "scripts": {
9
+ "dev": "vite build --watch --mode development",
10
+ "build": "vite build",
11
+ "preview": "vite preview",
12
+ "dev:assets": "vite build --watch --mode development --config vite.assets.config.ts",
13
+ "build:assets": "vite build --config vite.assets.config.ts",
14
+ "build:prod": "vite build && vite build:assets"
15
+ },
16
+ "sideEffects": false,
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/ventoviro/unicorn.git"
20
+ },
21
+ "keywords": [
22
+ "windwalker",
23
+ "unicorn",
24
+ "windwalker-libs"
25
+ ],
26
+ "author": "Simon Asika",
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/ventoviro/unicorn/issues"
30
+ },
31
+ "homepage": "https://github.com/ventoviro/unicorn#readme",
32
+ "windwalker": {
33
+ "vendors": [
34
+ "@fortawesome/fontawesome-free",
35
+ "@windwalker-io/unicorn",
36
+ "@windwalker-io/unicorn-next",
37
+ "@webcomponents/webcomponentsjs",
38
+ "@ryangjchandler/spruce",
39
+ "@asika32764/vue-animate",
40
+ "alpinejs",
41
+ "awesome-bootstrap-checkbox",
42
+ "axios",
43
+ "bootstrap",
44
+ "cropperjs",
45
+ "flatpickr",
46
+ "regenerator-runtime",
47
+ "systemjs",
48
+ "sortablejs",
49
+ "tinymce",
50
+ "tinymce-i18n",
51
+ "vue",
52
+ "sortablejs",
53
+ "spectrum-vanilla",
54
+ "vuedraggable",
55
+ "vue2-animate",
56
+ "choices.js",
57
+ "tom-select",
58
+ "mark.js",
59
+ "core-js-bundle",
60
+ "jquery",
61
+ "current-script-polyfill"
62
+ ]
63
+ },
64
+ "devDependencies": {
65
+ "@lyrasoft/ts-toolkit": "^0.2.0",
66
+ "@rubenbimmel/alpine-class-component": "^0.0.4",
67
+ "@types/alpinejs": "^3",
68
+ "@types/bootstrap": "^5",
69
+ "@types/lodash-es": "^4.17.12",
70
+ "@types/punycode": "^2",
71
+ "@types/sortablejs": "^1",
72
+ "@types/sprintf-js": "^1",
73
+ "@vitejs/plugin-vue": "^6.0.1",
74
+ "axios": "^1.12.2",
75
+ "bootstrap": "^5.3.8",
76
+ "cropperjs": "^1.5.11",
77
+ "lodash-es": "^4.17.21",
78
+ "punycode": "^2.3.1",
79
+ "qss": "^3.0.0",
80
+ "rimraf": "^6.0.1",
81
+ "rollup-plugin-tree-shakeable": "^2.0.0",
82
+ "sortablejs": "^1.15.6",
83
+ "sprintf-js": "^1.1.3",
84
+ "ts-mixer": "^6.0.4",
85
+ "unplugin-dts": "^1.0.0-beta.6",
86
+ "url-template": "^3.1.1",
87
+ "vite": "^7.1.7",
88
+ "vite-plugin-dts": "^4.5.4",
89
+ "vue3-slide-up-down": "^2.1.0"
90
+ },
91
+ "dependencies": {
92
+ "alpinejs": "^3.15.0",
93
+ "bigint-toolkit": "^0.2.0",
94
+ "flatpickr": "^4.6.13",
95
+ "spectrum-vanilla": "^1.1.1",
96
+ "tinymce": "^6.0||^7.0||^8.0",
97
+ "tom-select": "^2.4.3",
98
+ "vue-draggable-plus": "^0.6.0",
99
+ "vue-multi-uploader": "^0.1.9",
100
+ "web-directive": "^0.1.1"
101
+ }
102
+ }
@@ -0,0 +1,121 @@
1
+ // @see https://codepen.io/svnt/pen/beEgre
2
+
3
+ @import "bootstrap/scss/functions";
4
+ @import "bootstrap/scss/variables";
5
+ @import "bootstrap/scss/mixins";
6
+
7
+ .dropdown-hover .dropdown {
8
+ > .dropdown-menu {
9
+ display: block;
10
+ visibility: hidden;
11
+ opacity: 0;
12
+ min-width: 250px;
13
+ }
14
+
15
+ &:hover {
16
+ > .dropdown-menu {
17
+ visibility: visible;
18
+ opacity: 1;
19
+ }
20
+ }
21
+ }
22
+
23
+ .dropdown {
24
+ .dropdown-item {
25
+ display: inline-block;
26
+ }
27
+
28
+ .dropdown-column {
29
+ padding: .5rem 0 .5rem 1rem;
30
+ min-width: 250px;
31
+
32
+ &:last-child {
33
+ padding-right: 1rem;
34
+ }
35
+ }
36
+
37
+ .dropdown-submenu {
38
+ position: relative;
39
+ }
40
+
41
+ .dropdown-submenu {
42
+ > .dropdown-menu {
43
+ top: 0;
44
+ left: 100%;
45
+ margin-top: -6px;
46
+ margin-left: -1px;
47
+ display: block;
48
+ visibility: hidden;
49
+ opacity: 0;
50
+ }
51
+
52
+ &:hover > .dropdown-menu {
53
+ visibility: visible;
54
+ opacity: 1;
55
+ }
56
+ }
57
+
58
+ .dropdown-submenu > a:after {
59
+ display: block;
60
+ content: " ";
61
+ float: right;
62
+ width: 0;
63
+ height: 0;
64
+ border-color: transparent;
65
+ border-style: solid;
66
+ border-width: 5px 0 5px 5px;
67
+ border-left-color: #ccc;
68
+ margin-top: 5px;
69
+ margin-right: -10px;
70
+ }
71
+ }
72
+
73
+ .dropdown-fade .dropdown {
74
+ > .dropdown-menu {
75
+ transition: visibility 0s, display 0s, opacity .25s;
76
+ transition-delay: .25s, .25s, 0s;
77
+ }
78
+
79
+ &:hover {
80
+ > .dropdown-menu {
81
+ transition-delay: 0s, 0s, 0s;
82
+ }
83
+ }
84
+
85
+ .dropdown-submenu {
86
+ > .dropdown-menu {
87
+ transition: visibility 0s, display 0s, opacity .25s;
88
+ transition-delay: .25s, .25s, 0s;
89
+ }
90
+
91
+ &:hover > .dropdown-menu {
92
+ transition-delay: 0s, 0s, 0s;
93
+ }
94
+ }
95
+ }
96
+
97
+ .subnav {
98
+ display: flex;
99
+ flex-wrap: wrap;
100
+ padding-left: 0;
101
+ margin-bottom: 0;
102
+ list-style: none;
103
+ margin-left: 1rem;
104
+ }
105
+
106
+ .subnav-link {
107
+ display: block;
108
+ padding: $nav-link-padding-y $nav-link-padding-x;
109
+
110
+ &:hover,
111
+ &:focus {
112
+ text-decoration: none;
113
+ }
114
+
115
+ // Disabled state lightens text
116
+ &.disabled {
117
+ color: $nav-link-disabled-color;
118
+ pointer-events: none;
119
+ cursor: default;
120
+ }
121
+ }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @link https://www.tinymce.com/css/codepen.min.css
3
+ */
4
+
5
+ .mce-container textarea {
6
+ display: initial !important
7
+ }
8
+
9
+ .mce-content-body {
10
+ font-size: 16px;
11
+ color: #828282;
12
+ padding: 0 25px 25px;
13
+ }
14
+
15
+ .mce-content-body a {
16
+ color: #007bff;
17
+ }
18
+
19
+ .mce-content-body h1 {
20
+ font-size: 34px
21
+ }
22
+
23
+ .mce-content-body h2 {
24
+ font-size: 30px
25
+ }
26
+
27
+ .mce-content-body h3 {
28
+ font-size: 26px
29
+ }
30
+
31
+ .mce-content-body h4 {
32
+ font-size: 22px
33
+ }
34
+
35
+ .mce-content-body h5 {
36
+ font-size: 18px
37
+ }
38
+
39
+ .mce-content-body h6 {
40
+ font-size: 14px
41
+ }
42
+
43
+ .mce-content-body p {
44
+ margin: 25px 0
45
+ }
46
+
47
+ .mce-content-body ol,
48
+ .mce-content-body ul {
49
+ padding-left: 15px;
50
+ list-style-position: outside;
51
+ margin-bottom: 20px
52
+ }
53
+
54
+ .mce-content-body ol li,
55
+ .mce-content-body ul li {
56
+ margin-left: 10px;
57
+ margin-bottom: 10px;
58
+ color: #828282
59
+ }
60
+
61
+ .mce-content-body ul {
62
+ list-style-type: disc;
63
+ }
64
+
65
+ .mce-content-body ol {
66
+ list-style-type: decimal
67
+ }
68
+
69
+ .mce-content-body table {
70
+ width: 100%;
71
+ border-spacing: 0;
72
+ border-collapse: separate;
73
+ border: 1px solid #aaa
74
+ }
75
+
76
+ .mce-content-body table tr:nth-child(even) {
77
+ background: #fafafa
78
+ }
79
+
80
+ .mce-content-body table caption,
81
+ .mce-content-body table td,
82
+ .mce-content-body table th {
83
+ padding: 15px 7px;
84
+ font: inherit
85
+ }
86
+
87
+ .mce-content-body table th {
88
+ font-weight: 400;
89
+ color: #6e6e6e;
90
+ background-position: 100% 100%;
91
+ background-size: 2px 10px;
92
+ background-repeat: no-repeat
93
+ }
94
+
95
+ .mce-content-body table th:last-child {
96
+ background: 0 0
97
+ }
98
+
99
+ /* Luna Hack */
100
+ .mce-content-body hr#luna-readmore {
101
+ background: #eee;
102
+ content: "READMORE";
103
+ height: 20px;
104
+ display: block;
105
+ text-align: center;
106
+ }
107
+
108
+ .mce-content-body hr#luna-readmore::before {
109
+ content: "READMORE";
110
+ color: #999;
111
+ }
112
+
113
+ .mce-content-body img {
114
+ max-width: 100%;
115
+ height: auto !important;
116
+ }