ranui 0.1.10-alpha.9 → 0.2.0-alpha.1
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/README.md +397 -0
- package/README.zh-CN.md +216 -37
- package/dist/assets/image/failImage.d.ts +2 -0
- package/dist/bin/generate-component-api.d.ts +1 -0
- package/dist/bin/generate-style-docs.d.ts +1 -0
- package/dist/build/config.bundle.d.ts +2 -0
- package/dist/build/config.d.ts +3 -0
- package/dist/build/config.es.d.ts +2 -0
- package/dist/build/config.umd.d.ts +1 -0
- package/dist/builder.d.ts +11 -0
- package/dist/builder.js +39 -0
- package/dist/button-BstLjXNe.js +117 -0
- package/dist/button.js +3 -5
- package/dist/card-DQUJoDUQ.js +60 -0
- package/dist/card.js +5 -0
- package/dist/checkbox-iHZQb-yQ.js +94 -0
- package/dist/checkbox.js +3 -5
- package/dist/colorpicker-CGh8pRqo.js +315 -0
- package/dist/colorpicker.js +3 -9
- package/dist/components/button/index.d.ts +44 -0
- package/dist/components/card/index.d.ts +21 -0
- package/dist/components/checkbox/index.d.ts +35 -0
- package/dist/components/colorpicker/index.d.ts +99 -0
- package/dist/components/dropdown/index.d.ts +30 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/icon/index.d.ts +58 -0
- package/dist/components/image/index.d.ts +31 -0
- package/dist/components/input/index.d.ts +222 -0
- package/dist/components/link/index.d.ts +21 -0
- package/dist/components/loading/index.d.ts +76 -0
- package/dist/components/math/index.d.ts +16 -0
- package/dist/components/message/container.d.ts +8 -0
- package/dist/components/message/index.d.ts +32 -0
- package/dist/components/modal/index.d.ts +100 -0
- package/dist/components/player/core/constants.d.ts +5 -0
- package/dist/components/player/core/controller.d.ts +33 -0
- package/dist/components/player/core/events.d.ts +10 -0
- package/dist/components/player/core/fullscreen.d.ts +5 -0
- package/dist/components/player/core/levels.d.ts +20 -0
- package/dist/components/player/core/media.d.ts +50 -0
- package/dist/components/player/core/playback.d.ts +14 -0
- package/dist/components/player/core/progress.d.ts +2 -0
- package/dist/components/player/core/state.d.ts +27 -0
- package/dist/components/player/core/view.d.ts +38 -0
- package/dist/components/player/index.d.ts +276 -0
- package/dist/components/popover/content/index.d.ts +12 -0
- package/dist/components/popover/index.d.ts +93 -0
- package/dist/components/progress/index.d.ts +40 -0
- package/dist/components/radar/index.d.ts +52 -0
- package/dist/components/route/index.d.ts +26 -0
- package/dist/components/router/index.d.ts +24 -0
- package/dist/components/scratch/index.d.ts +19 -0
- package/dist/components/section/index.d.ts +23 -0
- package/dist/components/select/dropdown-item/index.d.ts +21 -0
- package/dist/components/select/index.d.ts +150 -0
- package/dist/components/select/option/index.d.ts +19 -0
- package/dist/components/skeleton/index.d.ts +13 -0
- package/dist/components/tab/index.d.ts +58 -0
- package/dist/components/tabpane/index.d.ts +33 -0
- package/dist/demo/i18n.d.ts +4 -0
- package/dist/demo/index.d.ts +3 -0
- package/dist/demo/register-icons.d.ts +1 -0
- package/dist/dropdown-RqHMRhFE.js +76 -0
- package/dist/dropdown.js +6 -0
- package/dist/events-C59wGdni.js +30 -0
- package/dist/factory-BdsO0dEW.js +165 -0
- package/dist/form-05Lxxl3D.js +44 -0
- package/dist/form.js +5 -0
- package/dist/icon-Blm7AbyY.js +167 -0
- package/dist/icon.js +4 -4
- package/dist/{index-KS2nvVcO.js → image-DKm6z7YQ.js} +60 -71
- package/dist/image.js +3 -2
- package/dist/index.cjs +35 -0
- package/dist/index.d.ts +277 -114
- package/dist/index.iife.js +306 -0
- package/dist/index.js +78 -38
- package/dist/input-Dskw1bAl.js +186 -0
- package/dist/input.js +2 -3
- package/dist/katex-es-BTpuCxxV.cjs +261 -0
- package/dist/katex-es-CKRwcaiU.js +23682 -0
- package/dist/link-BW-gvrpN.js +77 -0
- package/dist/link.js +6 -0
- package/dist/loading-C4QUpm70.js +206 -0
- package/dist/loading.js +4 -6
- package/dist/math-Dv4nXSoI.js +52 -0
- package/dist/math.js +2 -4
- package/dist/message-De5e1txT.js +137 -0
- package/dist/message.js +3 -4
- package/dist/mocks-CMGoftIc.js +179 -0
- package/dist/modal-DruDj3AB.js +350 -0
- package/dist/modal.js +3 -2
- package/dist/player-CqTAmg_E.js +13534 -0
- package/dist/player.js +3 -6
- package/dist/playwright.config.d.ts +2 -0
- package/dist/plugins/load-svg.d.ts +9 -0
- package/dist/popover-BY32HNMl.js +206 -0
- package/dist/popover.js +3 -5
- package/dist/progress-gZo0knzu.js +123 -0
- package/dist/progress.js +3 -5
- package/dist/radar-19P5Mtld.js +181 -0
- package/dist/radar.js +3 -4
- package/dist/ranui.css +1 -0
- package/dist/route-BY_E6-2C.js +88 -0
- package/dist/route.js +6 -0
- package/dist/router-BDcv4F-2.js +79 -0
- package/dist/router.js +6 -0
- package/dist/scratch-Dbd9G6Q6.js +60 -0
- package/dist/scratch.js +4 -0
- package/dist/section-CNTvgdQ-.js +63 -0
- package/dist/section.js +5 -0
- package/dist/select-BVdUtQX5.js +454 -0
- package/dist/select.js +3 -8
- package/dist/signal-XHfNsQNW.js +57 -0
- package/dist/skeleton-BAdJ6vyA.js +32 -0
- package/dist/skeleton.js +3 -2
- package/dist/ssg.js +21 -0
- package/dist/ssr-DSGwPtEd.js +34 -0
- package/dist/ssr-stream.d.ts +1 -0
- package/dist/ssr-stream.js +87 -0
- package/dist/ssr.d.ts +1 -0
- package/dist/ssr.js +7 -0
- package/dist/style.d.ts +1 -0
- package/dist/style.js +0 -0
- package/dist/tab-DH2owP2V.js +184 -0
- package/dist/tab.js +3 -4
- package/dist/tabpane-B_M-Jokw.js +87 -0
- package/dist/tabpane.js +3 -2
- package/dist/test/e2e/button.spec.d.ts +1 -0
- package/dist/test/e2e/checkbox.spec.d.ts +1 -0
- package/dist/test/e2e/helpers.d.ts +13 -0
- package/dist/test/e2e/icon.spec.d.ts +1 -0
- package/dist/test/e2e/image.spec.d.ts +1 -0
- package/dist/test/e2e/input.spec.d.ts +1 -0
- package/dist/test/e2e/loading.spec.d.ts +1 -0
- package/dist/test/e2e/message.spec.d.ts +1 -0
- package/dist/test/e2e/modal.spec.d.ts +1 -0
- package/dist/test/e2e/popover.spec.d.ts +1 -0
- package/dist/test/e2e/progress.spec.d.ts +1 -0
- package/dist/test/e2e/radar.spec.d.ts +1 -0
- package/dist/test/e2e/select.spec.d.ts +1 -0
- package/dist/test/e2e/skeleton.spec.d.ts +1 -0
- package/dist/test/e2e/tab.spec.d.ts +1 -0
- package/dist/test/e2e/visual/colorpicker.spec.d.ts +1 -0
- package/dist/test/e2e/visual/components.spec.d.ts +1 -0
- package/dist/test/e2e/visual/player.spec.d.ts +1 -0
- package/dist/test/integration/composition.test.d.ts +23 -0
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/ssr/builder.core.ssr.test.d.ts +1 -0
- package/dist/test/ssr/builder.factory.ssr.test.d.ts +1 -0
- package/dist/test/ssr/builder.mocks.test.d.ts +1 -0
- package/dist/test/ssr/components/button.test.d.ts +1 -0
- package/dist/test/ssr/css-vars.test.d.ts +1 -0
- package/dist/test/ssr/registry.test.d.ts +1 -0
- package/dist/test/ssr/router.ssg.test.d.ts +2 -0
- package/dist/test/ssr/snapshots/button.test.d.ts +1 -0
- package/dist/test/ssr/stream.test.d.ts +2 -0
- package/dist/test/ssr/theme.tokens.ssr.test.d.ts +1 -0
- package/dist/test/unit/builder.core.browser.test.d.ts +1 -0
- package/dist/test/unit/builder.escape.test.d.ts +1 -0
- package/dist/test/unit/builder.selectors.test.d.ts +1 -0
- package/dist/test/unit/button.contract.test.d.ts +1 -0
- package/dist/test/unit/card.contract.test.d.ts +1 -0
- package/dist/test/unit/checkbox.contract.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.color.utils.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.contract.test.d.ts +1 -0
- package/dist/test/unit/colorpicker.methods.test.d.ts +1 -0
- package/dist/test/unit/component.helpers.test.d.ts +1 -0
- package/dist/test/unit/dropdown-item.contract.test.d.ts +1 -0
- package/dist/test/unit/dropdown.contract.test.d.ts +1 -0
- package/dist/test/unit/form.contract.test.d.ts +1 -0
- package/dist/test/unit/helpers/component.d.ts +3 -0
- package/dist/test/unit/helpers/dom.d.ts +2 -0
- package/dist/test/unit/icon.contract.test.d.ts +1 -0
- package/dist/test/unit/image.contract.test.d.ts +1 -0
- package/dist/test/unit/input.contract.test.d.ts +1 -0
- package/dist/test/unit/link.contract.test.d.ts +1 -0
- package/dist/test/unit/loading.contract.test.d.ts +1 -0
- package/dist/test/unit/math.contract.test.d.ts +1 -0
- package/dist/test/unit/message.component.test.d.ts +1 -0
- package/dist/test/unit/message.container.test.d.ts +1 -0
- package/dist/test/unit/modal.contract.test.d.ts +1 -0
- package/dist/test/unit/option.contract.test.d.ts +1 -0
- package/dist/test/unit/package-exports.source.test.d.ts +1 -0
- package/dist/test/unit/player-controls.test.d.ts +1 -0
- package/dist/test/unit/player-core.test.d.ts +1 -0
- package/dist/test/unit/player-event-handlers.test.d.ts +1 -0
- package/dist/test/unit/player-events.test.d.ts +1 -0
- package/dist/test/unit/player-fullscreen.test.d.ts +1 -0
- package/dist/test/unit/player-interactions.test.d.ts +1 -0
- package/dist/test/unit/player-levels.test.d.ts +1 -0
- package/dist/test/unit/player-media.test.d.ts +1 -0
- package/dist/test/unit/player-playback.test.d.ts +1 -0
- package/dist/test/unit/player.contract.test.d.ts +1 -0
- package/dist/test/unit/popover-accessibility.test.d.ts +1 -0
- package/dist/test/unit/popover.contract.test.d.ts +2 -0
- package/dist/test/unit/progress.contract.test.d.ts +1 -0
- package/dist/test/unit/radar.contract.test.d.ts +1 -0
- package/dist/test/unit/route.contract.test.d.ts +1 -0
- package/dist/test/unit/router.contract.test.d.ts +2 -0
- package/dist/test/unit/scratch.contract.test.d.ts +1 -0
- package/dist/test/unit/select-accessibility.test.d.ts +1 -0
- package/dist/test/unit/select-option.contract.test.d.ts +1 -0
- package/dist/test/unit/select.contract.test.d.ts +1 -0
- package/dist/test/unit/skeleton.contract.test.d.ts +1 -0
- package/dist/test/unit/ssr.test.d.ts +1 -0
- package/dist/test/unit/tab.contract.test.d.ts +2 -0
- package/dist/test/unit/theme.semantic-tokens.test.d.ts +1 -0
- package/dist/test/unit/theme.skin-tokens.test.d.ts +1 -0
- package/dist/test/unit/utils.dom.test.d.ts +1 -0
- package/dist/test/unit/utils.error.test.d.ts +1 -0
- package/dist/test/unit/utils.i18n.test.d.ts +1 -0
- package/dist/test/unit/utils.image.test.d.ts +1 -0
- package/dist/test/unit/utils.math.test.d.ts +1 -0
- package/dist/test/unit/utils.router.test.d.ts +1 -0
- package/dist/test/unit/utils.signal.test.d.ts +1 -0
- package/dist/test/unit/utils.ssr-stream.test.d.ts +1 -0
- package/dist/test/unit/utils.style.test.d.ts +1 -0
- package/dist/test/unit/utils.theme.test.d.ts +1 -0
- package/dist/test/unit/utils.tween.test.d.ts +1 -0
- package/dist/tsconfig.json +8 -8
- package/dist/typings.d.ts +163 -114
- package/dist/utils/builder/core.d.ts +70 -0
- package/dist/utils/builder/env.d.ts +1 -0
- package/dist/utils/builder/escape.d.ts +2 -0
- package/dist/utils/builder/events.d.ts +55 -0
- package/dist/utils/builder/factory.d.ts +18 -0
- package/dist/utils/builder/index.d.ts +9 -0
- package/dist/utils/builder/mocks.d.ts +62 -0
- package/dist/utils/builder/selectors.d.ts +4 -0
- package/dist/utils/builder/signal.d.ts +87 -0
- package/dist/utils/color.d.ts +52 -0
- package/dist/utils/component.d.ts +16 -0
- package/dist/utils/dom.d.ts +39 -0
- package/dist/utils/error.d.ts +6 -0
- package/dist/utils/i18n/index.d.ts +53 -0
- package/dist/utils/i18n.js +88 -0
- package/dist/utils/image.d.ts +39 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/math.d.ts +26 -0
- package/dist/utils/router/index.d.ts +128 -0
- package/dist/utils/router.js +197 -0
- package/dist/utils/ssg.d.ts +49 -0
- package/dist/utils/ssr-registry.d.ts +8 -0
- package/dist/utils/ssr-stream.d.ts +23 -0
- package/dist/utils/ssr.d.ts +17 -0
- package/dist/utils/style.d.ts +12 -0
- package/dist/utils/theme.d.ts +9 -0
- package/dist/utils/tween.d.ts +21 -0
- package/dist/utils/video.d.ts +40 -0
- package/dist/utils-D4pPF77E.js +689 -0
- package/dist/vite.config.d.ts +6 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.ssr.d.ts +2 -0
- package/docs/COMPONENTS.md +324 -0
- package/docs/DESIGN.md +198 -0
- package/docs/style-tokens-public.md +880 -0
- package/package.json +137 -78
- package/typings.d.ts +163 -114
- package/dist/_commonjs-dynamic-modules-DLbDWi6a.js +0 -12
- package/dist/add-user-BN1JlY7e.js +0 -4
- package/dist/arrow-down-B_hCY3Wt.js +0 -662
- package/dist/book-nTEFXU2x.js +0 -4
- package/dist/check-circle-fill-B_pd8ZSs.js +0 -4
- package/dist/check-circle-szyAJiap.js +0 -4
- package/dist/close-CFnkhudp.js +0 -4
- package/dist/close-circle-CwmuN2C6.js +0 -4
- package/dist/close-circle-fill-jSqPPw9i.js +0 -4
- package/dist/colz-DJZvo_8B.js +0 -232
- package/dist/docx-CHkPTdGU.js +0 -3665
- package/dist/drop-4j4abxje.js +0 -36
- package/dist/eye-D_mEt17f.js +0 -4
- package/dist/eye-close-BVr3NJtg.js +0 -4
- package/dist/home-BUQ4USMk.js +0 -4
- package/dist/iconShadowless.js +0 -6
- package/dist/index-15M0olqa.js +0 -204
- package/dist/index-1v568_nq.js +0 -140
- package/dist/index-B897keW5.js +0 -279
- package/dist/index-BZR0HaP2.js +0 -40
- package/dist/index-B_GuEcTd.js +0 -9575
- package/dist/index-Bc2Bcl8D.js +0 -63701
- package/dist/index-C4Sv0T51.js +0 -495
- package/dist/index-C6RcMHoH.js +0 -187
- package/dist/index-C9z10IgG.js +0 -103
- package/dist/index-CFjEuvBW.js +0 -308
- package/dist/index-CGEx9VOA.js +0 -17106
- package/dist/index-CGYfjKUV.js +0 -72
- package/dist/index-CQTJoWhb.js +0 -19
- package/dist/index-CiWwvEMM.js +0 -511
- package/dist/index-CkM9ENTf.js +0 -496
- package/dist/index-CtVOgBDk.js +0 -659
- package/dist/index-D4qUro5V.js +0 -279
- package/dist/index-D4y9c1Dj.js +0 -310
- package/dist/index-DAxs7Dd2.js +0 -119
- package/dist/index-DC5EA657.js +0 -91
- package/dist/index-DJZmDHz-.js +0 -146
- package/dist/index-D_CA5VDZ.js +0 -158
- package/dist/index-WfFw4LJT.js +0 -490
- package/dist/index-mhFL9MJp.js +0 -320
- package/dist/info-circle-COnL5bTJ.js +0 -4
- package/dist/info-circle-fill-CFeVMdci.js +0 -4
- package/dist/inputShadowless.js +0 -6
- package/dist/jszip.min-Dhs3nUkD.js +0 -2346
- package/dist/katex-es-B5r5vt3m.js +0 -14628
- package/dist/loading-Dcc5RApI.js +0 -4
- package/dist/loading-scene-BMc2wqKm.js +0 -4
- package/dist/lock-Cr7BnmWN.js +0 -4
- package/dist/message-D36_Zo2l.js +0 -4
- package/dist/pdf-Cx0VWKFo.js +0 -118
- package/dist/power-off-lQRbiBak.js +0 -4
- package/dist/preview-CJbz9GjO.js +0 -4
- package/dist/preview.js +0 -7
- package/dist/selectShadowless.js +0 -564
- package/dist/setting-DemlgzVC.js +0 -4
- package/dist/shadowless.js +0 -8
- package/dist/sprite-CH2zLtZy.js +0 -141
- package/dist/style.css +0 -1
- package/dist/team-tl4NJXPC.js +0 -4
- package/dist/umd/index.umd.cjs +0 -60
- package/dist/umd/shadowless/shadowless.umd.cjs +0 -1
- package/dist/umd/shadowless/style.css +0 -1
- package/dist/umd/style.css +0 -1
- package/dist/unlock-CeU74z9n.js +0 -4
- package/dist/user-B-eVXwuk.js +0 -4
- package/dist/warning-circle-DDUgEDIv.js +0 -4
- package/dist/warning-circle-fill-lODUKz0i.js +0 -4
- package/readme.md +0 -195
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/player';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/player';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/popover';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/radar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/route';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/scratch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/select';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/select';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/select/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@/components/skeleton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tsconfig.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"include": ["components", "plugins", "utils", "test", "shadowless", "**/*.ts"],
|
|
2
|
+
"include": ["components", "plugins", "utils", "test", "shadowless", "**/*.ts", "typing.d.ts"],
|
|
3
3
|
"exclude": ["node_modules/**", "dist/**", "assets", "public"],
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"module": "ESNext",
|
|
6
6
|
"moduleResolution": "bundler",
|
|
7
7
|
"esModuleInterop": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
8
9
|
"target": "ESNext",
|
|
9
10
|
"declaration": true,
|
|
10
11
|
"outDir": "dist",
|
|
@@ -17,15 +18,14 @@
|
|
|
17
18
|
"noImplicitAny": true,
|
|
18
19
|
"useUnknownInCatchVariables": false,
|
|
19
20
|
"inlineSourceMap": true,
|
|
20
|
-
"baseUrl": ".",
|
|
21
21
|
"experimentalDecorators": true,
|
|
22
22
|
"paths": {
|
|
23
|
-
"@/assets/*": ["assets/*"],
|
|
24
|
-
"@/public/*": ["public/*"],
|
|
25
|
-
"@/components/*": ["components/*"],
|
|
26
|
-
"@/shadowless/*": ["shadowless/*"],
|
|
27
|
-
"@/plugins/*": ["plugins/*"],
|
|
28
|
-
"@/utils/*": ["utils/*"]
|
|
23
|
+
"@/assets/*": ["./assets/*"],
|
|
24
|
+
"@/public/*": ["./public/*"],
|
|
25
|
+
"@/components/*": ["./components/*"],
|
|
26
|
+
"@/shadowless/*": ["./shadowless/*"],
|
|
27
|
+
"@/plugins/*": ["./plugins/*"],
|
|
28
|
+
"@/utils/*": ["./utils/*"]
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
package/dist/typings.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
1
2
|
declare module '*.less';
|
|
2
3
|
declare module '*.less?inline';
|
|
3
4
|
declare module '*.ts';
|
|
4
5
|
declare module '*.svg';
|
|
5
|
-
declare module '
|
|
6
|
-
declare module 'exceljs/*';
|
|
6
|
+
declare module '*.svg?raw';
|
|
7
7
|
declare module '@/assets/*';
|
|
8
8
|
declare module '@/public/*';
|
|
9
9
|
declare module '@/components/*';
|
|
@@ -14,8 +14,12 @@ declare namespace Ran {
|
|
|
14
14
|
content: string;
|
|
15
15
|
duration?: number;
|
|
16
16
|
close?: () => void;
|
|
17
|
+
top?: number | string;
|
|
18
|
+
zIndex?: number | string;
|
|
19
|
+
getContainer?: () => HTMLElement | null;
|
|
17
20
|
}
|
|
18
|
-
|
|
21
|
+
|
|
22
|
+
type Hint = (options: Prompt | string | undefined | null) => void;
|
|
19
23
|
|
|
20
24
|
interface Message {
|
|
21
25
|
info: Hint;
|
|
@@ -91,121 +95,166 @@ interface MathJax {
|
|
|
91
95
|
tex2chtmlPromise: (x: string, y: object) => Promise<Element>;
|
|
92
96
|
}
|
|
93
97
|
|
|
94
|
-
declare
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
pdfjsLib: {
|
|
102
|
-
GlobalWorkerOptions: {
|
|
103
|
-
workerSrc: string;
|
|
98
|
+
declare global {
|
|
99
|
+
interface Window {
|
|
100
|
+
ranui: Partial<Ranui>;
|
|
101
|
+
message: Partial<Ran.Message>;
|
|
102
|
+
MathJax: MathJax;
|
|
103
|
+
katex: {
|
|
104
|
+
render: (x: string, y: HTMLElement, z: object) => void;
|
|
104
105
|
};
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
pdfjsLib: {
|
|
107
|
+
GlobalWorkerOptions: {
|
|
108
|
+
workerSrc: string;
|
|
109
|
+
};
|
|
110
|
+
getDocument: (x: string | ArrayBuffer) => {
|
|
111
|
+
promise: Promise<PDFDocumentProxy>;
|
|
112
|
+
};
|
|
107
113
|
};
|
|
108
|
-
}
|
|
109
|
-
Hls: HLS;
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
|
|
117
|
+
enum ICON_NAME_AMP {
|
|
118
|
+
DOUBLE_BOUNCE = 'double-bounce',
|
|
119
|
+
ROTATE = 'rotate',
|
|
120
|
+
STRETCH = 'stretch',
|
|
121
|
+
CUBE = 'cube',
|
|
122
|
+
DOT = 'dot',
|
|
123
|
+
TRIPLE_BOUNCE = 'triple-bounce',
|
|
124
|
+
SCALE_OUT = 'scale-out',
|
|
125
|
+
CIRCLE = 'circle',
|
|
126
|
+
CIRCLE_LINE = 'circle-line',
|
|
127
|
+
SQUARE = 'square',
|
|
128
|
+
PULSE = 'pulse',
|
|
129
|
+
SOLAR = 'solar',
|
|
130
|
+
CUBE_FOLD = 'cube-fold',
|
|
131
|
+
CIRCLE_FOLD = 'circle-fold',
|
|
132
|
+
CUBE_GRID = 'cube-grid',
|
|
133
|
+
CIRCLE_TURN = 'circle-turn',
|
|
134
|
+
CIRCLE_ROTATE = 'circle-rotate',
|
|
135
|
+
CIRCLE_SPIN = 'circle-spin',
|
|
136
|
+
DOT_BAR = 'dot-bar',
|
|
137
|
+
DOT_CIRCLE = 'dot-circle',
|
|
138
|
+
LINE = 'line',
|
|
139
|
+
DOT_PULSE = 'dot-pulse',
|
|
140
|
+
LINE_SCALE = 'line-scale',
|
|
141
|
+
TEXT = 'text',
|
|
142
|
+
CUBE_DIM = 'cube-dim',
|
|
143
|
+
DOT_LINE = 'dot-line',
|
|
144
|
+
ARC = 'arc',
|
|
145
|
+
DROP = 'drop',
|
|
146
|
+
PACMAN = 'pacman',
|
|
147
|
+
}
|
|
148
|
+
interface BaseIntrinsicElements {
|
|
149
|
+
'r-loading': any & {
|
|
150
|
+
name: ICON_NAME_AMP;
|
|
151
|
+
};
|
|
152
|
+
'r-math': any & {
|
|
153
|
+
latex: string;
|
|
154
|
+
};
|
|
155
|
+
'r-button': any & {
|
|
156
|
+
sheet: string;
|
|
157
|
+
disabled: boolean | string;
|
|
158
|
+
iconSize: string;
|
|
159
|
+
icon: string;
|
|
160
|
+
effect: boolean | string;
|
|
161
|
+
};
|
|
162
|
+
'r-checkbox': any & {
|
|
163
|
+
disabled: boolean | string;
|
|
164
|
+
checked: boolean | string;
|
|
165
|
+
};
|
|
166
|
+
'r-img': any & {
|
|
167
|
+
fallback: string;
|
|
168
|
+
src: string;
|
|
169
|
+
};
|
|
170
|
+
'r-input': any & {
|
|
171
|
+
value: string;
|
|
172
|
+
placeholder: string;
|
|
173
|
+
label: string;
|
|
174
|
+
status: string;
|
|
175
|
+
name: string;
|
|
176
|
+
icon: string;
|
|
177
|
+
prefix: string;
|
|
178
|
+
suffix: string;
|
|
179
|
+
type: string;
|
|
180
|
+
required: boolean | string;
|
|
181
|
+
disabled: boolean | string;
|
|
182
|
+
min: number | string;
|
|
183
|
+
max: number | string;
|
|
184
|
+
step: number | string;
|
|
185
|
+
};
|
|
186
|
+
'r-player': any & {
|
|
187
|
+
src: string;
|
|
188
|
+
debug: boolean | string;
|
|
189
|
+
volume: number | string;
|
|
190
|
+
currentTime: number | string;
|
|
191
|
+
playbackRate: number | string;
|
|
192
|
+
};
|
|
193
|
+
'r-popover': any & {
|
|
194
|
+
placement: string;
|
|
195
|
+
trigger: string;
|
|
196
|
+
getPopupContainerId: string;
|
|
197
|
+
arrow: boolean | string;
|
|
198
|
+
closePopover: () => void;
|
|
199
|
+
};
|
|
200
|
+
'r-content': any;
|
|
201
|
+
'r-preview': any & {
|
|
202
|
+
src: string;
|
|
203
|
+
closeable: boolean | string;
|
|
204
|
+
};
|
|
205
|
+
'r-progress': any & {
|
|
206
|
+
percent: number | string;
|
|
207
|
+
total: number | string;
|
|
208
|
+
type: string;
|
|
209
|
+
animation: string;
|
|
210
|
+
dot: boolean | string;
|
|
211
|
+
};
|
|
212
|
+
'r-radar': any & {
|
|
213
|
+
abilitys: string;
|
|
214
|
+
colorPolygon?: string;
|
|
215
|
+
colorLine?: string;
|
|
216
|
+
fillColor?: string;
|
|
217
|
+
strokeColor?: string;
|
|
218
|
+
};
|
|
219
|
+
'r-select': any & {
|
|
220
|
+
value: string;
|
|
221
|
+
defaultValue?: string;
|
|
222
|
+
showSearch?: boolean | string;
|
|
223
|
+
type?: string;
|
|
224
|
+
placement?: string;
|
|
225
|
+
sheet?: string;
|
|
226
|
+
getPopupContainerId?: string;
|
|
227
|
+
dropdownclass?: string;
|
|
228
|
+
trigger?: string;
|
|
229
|
+
disabled?: boolean | string;
|
|
230
|
+
};
|
|
231
|
+
'r-skeleton': any;
|
|
232
|
+
'r-tab': any & {
|
|
233
|
+
label: string;
|
|
234
|
+
icon: string;
|
|
235
|
+
iconSize: string;
|
|
236
|
+
key: string;
|
|
237
|
+
disabled: boolean | string;
|
|
238
|
+
effect: boolean | string;
|
|
239
|
+
};
|
|
240
|
+
'r-tabs': any & {
|
|
241
|
+
align: string;
|
|
242
|
+
type: string;
|
|
243
|
+
active: string;
|
|
244
|
+
effect: string;
|
|
245
|
+
};
|
|
246
|
+
'r-icon': any & {
|
|
247
|
+
name?: string;
|
|
248
|
+
size?: string;
|
|
249
|
+
color?: string;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
112
252
|
namespace JSX {
|
|
113
|
-
interface IntrinsicElements {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
'r-button': any & {
|
|
121
|
-
sheet: string;
|
|
122
|
-
disabled: boolean | string;
|
|
123
|
-
iconSize: string;
|
|
124
|
-
icon: string;
|
|
125
|
-
effect: boolean | string;
|
|
126
|
-
};
|
|
127
|
-
'r-checkbox': any & {
|
|
128
|
-
disabled: boolean | string;
|
|
129
|
-
checked: boolean | string;
|
|
130
|
-
};
|
|
131
|
-
'r-img': any & {
|
|
132
|
-
fallback: string;
|
|
133
|
-
src: string;
|
|
134
|
-
};
|
|
135
|
-
'r-input': any & {
|
|
136
|
-
value: string;
|
|
137
|
-
placeholder: string;
|
|
138
|
-
label: string;
|
|
139
|
-
status: string;
|
|
140
|
-
name: string;
|
|
141
|
-
icon: string;
|
|
142
|
-
prefix: string;
|
|
143
|
-
suffix: string;
|
|
144
|
-
type: string;
|
|
145
|
-
required: boolean | string;
|
|
146
|
-
disabled: boolean | string;
|
|
147
|
-
min: number | string;
|
|
148
|
-
max: number | string;
|
|
149
|
-
step: number | string;
|
|
150
|
-
};
|
|
151
|
-
'r-player': any & {
|
|
152
|
-
src: string;
|
|
153
|
-
debug: boolean | string;
|
|
154
|
-
volume: number | string;
|
|
155
|
-
currentTime: number | string;
|
|
156
|
-
playbackRate: number | string;
|
|
157
|
-
};
|
|
158
|
-
'r-popover': any & {
|
|
159
|
-
placement: string;
|
|
160
|
-
trigger: string;
|
|
161
|
-
getPopupContainerId: string;
|
|
162
|
-
arrow: boolean | string;
|
|
163
|
-
};
|
|
164
|
-
'r-preview': any & {
|
|
165
|
-
src: string;
|
|
166
|
-
closeable: boolean | string;
|
|
167
|
-
};
|
|
168
|
-
'r-progress': any & {
|
|
169
|
-
percent: number | string;
|
|
170
|
-
total: number | string;
|
|
171
|
-
type: string;
|
|
172
|
-
animation: string;
|
|
173
|
-
dot: boolean | string;
|
|
174
|
-
};
|
|
175
|
-
'r-radar': any & {
|
|
176
|
-
abilitys: string;
|
|
177
|
-
colorPolygon?: string;
|
|
178
|
-
colorLine?: string;
|
|
179
|
-
fillColor?: string;
|
|
180
|
-
strokeColor?: string;
|
|
181
|
-
};
|
|
182
|
-
'r-select': any & {
|
|
183
|
-
value: string;
|
|
184
|
-
defaultValue?: string;
|
|
185
|
-
showSearch?: boolean | string;
|
|
186
|
-
type?: string;
|
|
187
|
-
placement?: string;
|
|
188
|
-
sheet?: string;
|
|
189
|
-
getPopupContainerId?: string;
|
|
190
|
-
dropdownclass?: string;
|
|
191
|
-
trigger?: string;
|
|
192
|
-
trigger?: string;
|
|
193
|
-
disabled?: boolean | string;
|
|
194
|
-
};
|
|
195
|
-
'r-skeleton': any;
|
|
196
|
-
'r-tab': any & {
|
|
197
|
-
label: string;
|
|
198
|
-
icon: string;
|
|
199
|
-
iconSize: string;
|
|
200
|
-
key: string;
|
|
201
|
-
disabled: boolean | string;
|
|
202
|
-
effect: boolean | string;
|
|
203
|
-
};
|
|
204
|
-
'r-tabs': any & {
|
|
205
|
-
align: string;
|
|
206
|
-
type: string;
|
|
207
|
-
active: string;
|
|
208
|
-
effect: string;
|
|
209
|
-
};
|
|
253
|
+
interface IntrinsicElements extends BaseIntrinsicElements {}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
namespace React {
|
|
257
|
+
namespace JSX {
|
|
258
|
+
interface IntrinsicElements extends BaseIntrinsicElements {}
|
|
210
259
|
}
|
|
211
260
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { EventManager } from './events';
|
|
2
|
+
export interface Ref<T extends HTMLElement = HTMLElement> {
|
|
3
|
+
current: T | null;
|
|
4
|
+
}
|
|
5
|
+
export declare const createRef: <T extends HTMLElement = HTMLElement>() => Ref<T>;
|
|
6
|
+
export declare class ElementBuilder<T extends HTMLElement = HTMLElement> {
|
|
7
|
+
private el;
|
|
8
|
+
constructor(tag: string);
|
|
9
|
+
id(value: string): this;
|
|
10
|
+
class(name: string): this;
|
|
11
|
+
addClass(...names: string[]): this;
|
|
12
|
+
removeClass(...names: string[]): this;
|
|
13
|
+
attr(name: string, value: string): this;
|
|
14
|
+
attrs(values: Record<string, string | number | boolean | null | undefined>): this;
|
|
15
|
+
boolAttr(name: string, value: boolean, enabledValue?: string): this;
|
|
16
|
+
part(value: string): this;
|
|
17
|
+
data(key: string, value: string): this;
|
|
18
|
+
style(keyOrMap: string | Record<string, string>, value?: string): this;
|
|
19
|
+
cssVar(name: string, value: string): this;
|
|
20
|
+
aria(key: string, value: string): this;
|
|
21
|
+
role(value: string): this;
|
|
22
|
+
tabIndex(value: number): this;
|
|
23
|
+
label(value: string): this;
|
|
24
|
+
labelledBy(id: string): this;
|
|
25
|
+
describedBy(id: string): this;
|
|
26
|
+
ariaHidden(hidden?: boolean): this;
|
|
27
|
+
/**
|
|
28
|
+
* Permanent build-time listener — tied to the element's lifetime.
|
|
29
|
+
* Use for internal shadow DOM elements created in the constructor.
|
|
30
|
+
*/
|
|
31
|
+
on<K extends keyof HTMLElementEventMap>(type: K, listener: (this: T, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): this;
|
|
32
|
+
/**
|
|
33
|
+
* Lifecycle-managed listener — registered into an EventManager.
|
|
34
|
+
* Use in connectedCallback when building elements that need cleanup on disconnect.
|
|
35
|
+
* Call manager.abort() in disconnectedCallback to remove all listeners at once.
|
|
36
|
+
*/
|
|
37
|
+
listen<K extends keyof HTMLElementEventMap>(manager: EventManager, type: K, handler: (this: T, ev: HTMLElementEventMap[K]) => any, options?: Omit<AddEventListenerOptions, 'signal'>): this;
|
|
38
|
+
/**
|
|
39
|
+
* Delegated listener — the built element acts as the parent container.
|
|
40
|
+
* Fires handler only when the event originates from a descendant matching selector.
|
|
41
|
+
* Registered into an EventManager so it is cleaned up with manager.abort().
|
|
42
|
+
*
|
|
43
|
+
* Div().class('list')
|
|
44
|
+
* .children(...)
|
|
45
|
+
* .delegate(scope, '.item', 'click', (ev, item) => handleItem(item))
|
|
46
|
+
* .build();
|
|
47
|
+
*/
|
|
48
|
+
delegate<K extends keyof HTMLElementEventMap>(manager: EventManager, selector: string, type: K, handler: (ev: HTMLElementEventMap[K], target: Element) => void, options?: Omit<AddEventListenerOptions, 'signal'>): this;
|
|
49
|
+
children(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
|
|
50
|
+
replaceChildren(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
|
|
51
|
+
text(value: string): this;
|
|
52
|
+
ref(holder: Ref<T>): this;
|
|
53
|
+
shadow(options?: ShadowRootInit): ShadowBuilder<T>;
|
|
54
|
+
build(): T;
|
|
55
|
+
serialize(): string;
|
|
56
|
+
}
|
|
57
|
+
export declare class ShadowBuilder<T extends HTMLElement = HTMLElement> {
|
|
58
|
+
private root;
|
|
59
|
+
private hostEl;
|
|
60
|
+
private options;
|
|
61
|
+
constructor(host: T, root: ShadowRoot, options: ShadowRootInit);
|
|
62
|
+
children(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
|
|
63
|
+
adoptSheet(...sheets: CSSStyleSheet[]): this;
|
|
64
|
+
css(cssText: string): this;
|
|
65
|
+
done(): {
|
|
66
|
+
host: T;
|
|
67
|
+
shadow: ShadowRoot;
|
|
68
|
+
};
|
|
69
|
+
serialize(): string;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isSSR: boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EventManager — lifecycle-scoped event registry backed by AbortController.
|
|
3
|
+
*
|
|
4
|
+
* Web Component usage:
|
|
5
|
+
*
|
|
6
|
+
* private _events = new EventManager();
|
|
7
|
+
*
|
|
8
|
+
* connectedCallback() {
|
|
9
|
+
* this._events
|
|
10
|
+
* .on(this._input, 'input', this.handleInput)
|
|
11
|
+
* .on(this, 'click', this.handleClick, { capture: true });
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* disconnectedCallback() {
|
|
15
|
+
* this._events.abort(); // removes all listeners, resets for next connect
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* Page development usage:
|
|
19
|
+
*
|
|
20
|
+
* function initSection(container: HTMLElement) {
|
|
21
|
+
* const scope = new EventManager();
|
|
22
|
+
*
|
|
23
|
+
* scope
|
|
24
|
+
* .on(input, 'input', handleSearch)
|
|
25
|
+
* .delegate(container, '[data-action]', 'click', (ev, target) => {
|
|
26
|
+
* handleAction(target.getAttribute('data-action'));
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* return () => scope.abort(); // call on section teardown
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
export declare class EventManager {
|
|
33
|
+
private ac;
|
|
34
|
+
constructor();
|
|
35
|
+
/** The underlying AbortSignal — pass to addEventListener options directly if needed. */
|
|
36
|
+
get signal(): AbortSignal;
|
|
37
|
+
on<K extends keyof HTMLElementEventMap>(target: HTMLElement, type: K, handler: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: Omit<AddEventListenerOptions, 'signal'>): this;
|
|
38
|
+
on(target: EventTarget, type: string, handler: EventListener, options?: Omit<AddEventListenerOptions, 'signal'>): this;
|
|
39
|
+
/**
|
|
40
|
+
* Event delegation — attach one listener to `parent`, fire `handler` only when
|
|
41
|
+
* the event originates from a descendant matching `selector`.
|
|
42
|
+
*
|
|
43
|
+
* The handler receives the original event and the matched element as arguments.
|
|
44
|
+
*
|
|
45
|
+
* scope.delegate(list, '.item', 'click', (ev, item) => {
|
|
46
|
+
* console.log(item.dataset.id);
|
|
47
|
+
* });
|
|
48
|
+
*/
|
|
49
|
+
delegate<K extends keyof HTMLElementEventMap>(parent: HTMLElement, selector: string, type: K, handler: (ev: HTMLElementEventMap[K], target: Element) => void, options?: Omit<AddEventListenerOptions, 'signal'>): this;
|
|
50
|
+
/**
|
|
51
|
+
* Remove all registered listeners and reset internal AbortController.
|
|
52
|
+
* Safe to call multiple times; next on() / delegate() calls start fresh.
|
|
53
|
+
*/
|
|
54
|
+
abort(): void;
|
|
55
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementBuilder } from './core';
|
|
2
|
+
export declare const View: <T extends HTMLElement = HTMLElement>(tag: string) => ElementBuilder<T>;
|
|
3
|
+
export declare const Div: () => ElementBuilder<HTMLDivElement>;
|
|
4
|
+
export declare const Span: () => ElementBuilder<HTMLSpanElement>;
|
|
5
|
+
export declare const Slot: () => ElementBuilder<HTMLSlotElement>;
|
|
6
|
+
export declare const ButtonBuilder: () => ElementBuilder<HTMLButtonElement>;
|
|
7
|
+
export declare const InputBuilder: () => ElementBuilder<HTMLInputElement>;
|
|
8
|
+
export declare const Style: () => ElementBuilder<HTMLStyleElement>;
|
|
9
|
+
export declare const Label: () => ElementBuilder<HTMLLabelElement>;
|
|
10
|
+
export declare const Ul: () => ElementBuilder<HTMLUListElement>;
|
|
11
|
+
export declare const Li: () => ElementBuilder<HTMLLIElement>;
|
|
12
|
+
export declare const Section: () => ElementBuilder<HTMLElement>;
|
|
13
|
+
export declare const Article: () => ElementBuilder<HTMLElement>;
|
|
14
|
+
export declare const Nav: () => ElementBuilder<HTMLElement>;
|
|
15
|
+
export declare const Header: () => ElementBuilder<HTMLElement>;
|
|
16
|
+
export declare const Footer: () => ElementBuilder<HTMLElement>;
|
|
17
|
+
export declare const Main: () => ElementBuilder<HTMLElement>;
|
|
18
|
+
export declare const DeclarativeShadow: (mode?: "open" | "closed", delegatesFocus?: boolean) => ElementBuilder<HTMLTemplateElement>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { isSSR } from './env';
|
|
2
|
+
export { EventManager } from './events';
|
|
3
|
+
export { signal, createEffect, computed, batch } from './signal';
|
|
4
|
+
export type { Getter, Setter, SignalOptions } from './signal';
|
|
5
|
+
export { escapeHtml, escapeHtmlAttribute } from './escape';
|
|
6
|
+
export { type MockNode, matchSelector, collectMatches } from './selectors';
|
|
7
|
+
export { DocumentFragmentMock, HTMLElementMock, ShadowRootMock } from './mocks';
|
|
8
|
+
export { type Ref, createRef, ElementBuilder, ShadowBuilder } from './core';
|
|
9
|
+
export { View, Div, Span, Slot, ButtonBuilder, InputBuilder, Style, Label, Ul, Li, Section, Article, Nav, Header, Footer, Main, DeclarativeShadow, } from './factory';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A minimal mock of DocumentFragment for SSR environments.
|
|
3
|
+
*/
|
|
4
|
+
export declare class DocumentFragmentMock {
|
|
5
|
+
childrenList: (HTMLElementMock | string)[];
|
|
6
|
+
appendChild(node: any): any;
|
|
7
|
+
serialize(): string;
|
|
8
|
+
querySelector(selector: string): HTMLElementMock | null;
|
|
9
|
+
querySelectorAll(selector: string): HTMLElementMock[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A robust mock of HTMLElement for SSR environments.
|
|
13
|
+
*/
|
|
14
|
+
export declare class HTMLElementMock {
|
|
15
|
+
tagName: string;
|
|
16
|
+
attributes: Map<string, string>;
|
|
17
|
+
inlineStyles: Map<string, string>;
|
|
18
|
+
childrenList: (HTMLElementMock | string | DocumentFragmentMock)[];
|
|
19
|
+
shadowRoot: ShadowRootMock | null;
|
|
20
|
+
textContent: string | null;
|
|
21
|
+
content?: DocumentFragmentMock;
|
|
22
|
+
private eventListeners;
|
|
23
|
+
style: {
|
|
24
|
+
setProperty: (k: string, v: string) => void;
|
|
25
|
+
removeProperty: (k: string) => boolean;
|
|
26
|
+
};
|
|
27
|
+
classList: {
|
|
28
|
+
add: (...names: string[]) => void;
|
|
29
|
+
remove: (...names: string[]) => void;
|
|
30
|
+
toggle: (name: string) => void;
|
|
31
|
+
contains: (name: string) => boolean;
|
|
32
|
+
};
|
|
33
|
+
private _innerHTML;
|
|
34
|
+
get innerHTML(): string;
|
|
35
|
+
set innerHTML(value: string);
|
|
36
|
+
constructor(tag?: string);
|
|
37
|
+
get hidden(): boolean;
|
|
38
|
+
set hidden(val: boolean);
|
|
39
|
+
setAttribute(k: string, v: string): void;
|
|
40
|
+
getAttribute(k: string): string | null;
|
|
41
|
+
removeAttribute(k: string): void;
|
|
42
|
+
hasAttribute(k: string): boolean;
|
|
43
|
+
appendChild(node: any): any;
|
|
44
|
+
attachShadow(options: ShadowRootInit): ShadowRoot;
|
|
45
|
+
querySelector(selector: string): HTMLElementMock | null;
|
|
46
|
+
querySelectorAll(selector: string): HTMLElementMock[];
|
|
47
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
48
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
49
|
+
dispatchEvent(event: Event): boolean;
|
|
50
|
+
serialize(tagNameOverride?: string): string;
|
|
51
|
+
}
|
|
52
|
+
export declare class ShadowRootMock {
|
|
53
|
+
host: HTMLElementMock;
|
|
54
|
+
options: ShadowRootInit;
|
|
55
|
+
childrenList: (HTMLElementMock | string | DocumentFragmentMock)[];
|
|
56
|
+
adoptedStyleSheets: string[];
|
|
57
|
+
constructor(host: HTMLElementMock, options: ShadowRootInit);
|
|
58
|
+
appendChild(node: any): any;
|
|
59
|
+
querySelector(selector: string): HTMLElementMock | null;
|
|
60
|
+
querySelectorAll(selector: string): HTMLElementMock[];
|
|
61
|
+
serialize(): string;
|
|
62
|
+
}
|