vue-micro-router 1.0.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/LICENSE +21 -0
- package/README.md +617 -0
- package/dist/audio.d.ts +104 -0
- package/dist/audio.mjs +100 -0
- package/dist/index.d.ts +887 -0
- package/dist/index.mjs +1230 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/dist/styles.mjs +1 -0
- package/dist/timer-manager.mjs +20 -0
- package/package.json +94 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.route-page{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%;height:var(--mr-page-height, 100%);transform:translate(0)}.route-page__body{position:relative;width:100%;height:100%}.route-page:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s cubic-bezier(.65,0,.35,1);pointer-events:none;z-index:1}.route-page.deactive{transform:translate(-20%)}.route-page.deactive:before{opacity:1}.page-slide-enter-active,.page-slide-leave-active{transition:transform .5s cubic-bezier(.65,0,.35,1)}.page-slide-enter-from,.page-slide-leave-to{transform:translate(100%)}.page-fade-enter-active,.page-fade-leave-active{transition:opacity .3s ease}.page-fade-enter-from,.page-fade-leave-to{opacity:0}.micro-router-content-layer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;pointer-events:none}.micro-router-gui-layer{position:fixed;width:0;top:0;left:0;right:0;overflow:visible;z-index:1000;opacity:0;transition:opacity .5s ease;pointer-events:none}.micro-router-gui-layer.gui-visible{opacity:1;pointer-events:auto}.control-fade-move,.control-fade-enter-active,.control-fade-leave-active{transition:opacity .5s ease}.control-fade-enter-from,.control-fade-leave-to{opacity:0}.control-fade-leave-active{position:absolute}.micro-dialog{border:none;padding:0;max-width:100vw;max-height:100dvh;background:transparent;overflow:visible;will-change:opacity,transform}.micro-dialog::backdrop{background:#00000080;animation:_dialog-fade-in .3s ease-out forwards}.micro-dialog--closing::backdrop{animation:_dialog-fade-out .2s ease-in forwards}.micro-dialog__content{position:relative}.micro-dialog--standard{margin:auto}.micro-dialog--top{margin:0 auto auto}.micro-dialog--bottom{margin:auto auto 0}.micro-dialog--left{margin:auto auto auto 0}.micro-dialog--right{margin:auto 0 auto auto}.micro-dialog--fullscreen{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;margin:0;border-radius:0}.micro-dialog--seamless{background:transparent;box-shadow:none}@keyframes _dialog-scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes _dialog-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes _dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes _dialog-fade-out{0%{opacity:1}to{opacity:0}}@keyframes _dialog-scale-pop-in{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}@keyframes _dialog-scale-pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.85)}}@keyframes _dialog-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes _dialog-slide-out{0%{transform:translate(0)}to{transform:translate(100%)}}.dialog-transition-fade:not(.micro-dialog--closing){animation:_dialog-scale-in .25s cubic-bezier(.22,1,.36,1) forwards}.dialog-transition-fade.micro-dialog--closing{animation:_dialog-scale-out .18s cubic-bezier(.4,0,.6,1) forwards}.dialog-transition-scale:not(.micro-dialog--closing){animation:_dialog-scale-pop-in .3s cubic-bezier(.22,1,.36,1) forwards}.dialog-transition-scale.micro-dialog--closing{animation:_dialog-scale-pop-out .3s cubic-bezier(.22,1,.36,1) forwards}.dialog-transition-slide:not(.micro-dialog--closing){animation:_dialog-slide-in var(--dialog-duration, .5s) cubic-bezier(.65,0,.35,1) forwards}.dialog-transition-slide.micro-dialog--closing{animation:_dialog-slide-out var(--dialog-duration, .5s) cubic-bezier(.65,0,.35,1) forwards}
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { }
|
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function u() {
|
|
2
|
+
const e = /* @__PURE__ */ new Set();
|
|
3
|
+
function t(c, o) {
|
|
4
|
+
const n = setTimeout(() => {
|
|
5
|
+
e.delete(n), c();
|
|
6
|
+
}, o);
|
|
7
|
+
return e.add(n), n;
|
|
8
|
+
}
|
|
9
|
+
function r() {
|
|
10
|
+
e.forEach(clearTimeout), e.clear();
|
|
11
|
+
}
|
|
12
|
+
return { schedule: t, cleanup: r };
|
|
13
|
+
}
|
|
14
|
+
function a(e) {
|
|
15
|
+
return new Promise((t) => setTimeout(t, e));
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
u as c,
|
|
19
|
+
a as d
|
|
20
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-micro-router",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Mobile-app-style navigation for Vue 3 — animated page stacks, modal dialogs, HUD controls. No URL routing.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Danh Nguyen",
|
|
8
|
+
"url": "https://harrynguyen.work"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/danh121097/vue-micro-router.git"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/danh121097/vue-micro-router#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/danh121097/vue-micro-router/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"vue",
|
|
21
|
+
"vue3",
|
|
22
|
+
"router",
|
|
23
|
+
"micro-router",
|
|
24
|
+
"segment-router",
|
|
25
|
+
"dialog",
|
|
26
|
+
"modal",
|
|
27
|
+
"navigation",
|
|
28
|
+
"state-management"
|
|
29
|
+
],
|
|
30
|
+
"main": "./dist/index.mjs",
|
|
31
|
+
"module": "./dist/index.mjs",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": "./dist/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./audio": {
|
|
39
|
+
"types": "./dist/audio.d.ts",
|
|
40
|
+
"import": "./dist/audio.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./styles": "./dist/styles.css"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE"
|
|
48
|
+
],
|
|
49
|
+
"sideEffects": [
|
|
50
|
+
"*.css"
|
|
51
|
+
],
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"vue": "^3.4.0",
|
|
54
|
+
"howler": "^2.2.0",
|
|
55
|
+
"@vue/devtools-api": "^6.0.0 || ^7.0.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"howler": {
|
|
59
|
+
"optional": true
|
|
60
|
+
},
|
|
61
|
+
"@vue/devtools-api": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@eslint/js": "^10.0.1",
|
|
67
|
+
"@types/bun": "^1.3.11",
|
|
68
|
+
"@types/howler": "^2.2.12",
|
|
69
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
70
|
+
"@vue/test-utils": "^2.4.6",
|
|
71
|
+
"ajv": "^8.18.0",
|
|
72
|
+
"eslint": "^10.2.0",
|
|
73
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
74
|
+
"happy-dom": "^20.8.9",
|
|
75
|
+
"typescript": "^5.6.0",
|
|
76
|
+
"typescript-eslint": "^8.58.0",
|
|
77
|
+
"vite": "^6.0.0",
|
|
78
|
+
"vite-plugin-dts": "^4.0.0",
|
|
79
|
+
"vue": "^3.5.0",
|
|
80
|
+
"vue-eslint-parser": "^10.4.0",
|
|
81
|
+
"vue-tsc": "^2.0.0"
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "vite build",
|
|
85
|
+
"typecheck": "vue-tsc --noEmit",
|
|
86
|
+
"lint": "eslint libs/ examples/ tests/",
|
|
87
|
+
"lint:fix": "eslint libs/ examples/ tests/ --fix",
|
|
88
|
+
"gen:types": "bun run scripts/gen-attrs-types.ts",
|
|
89
|
+
"test": "bun test",
|
|
90
|
+
"dev:example": "vite --config examples/vite.config.ts examples",
|
|
91
|
+
"prepublishOnly": "bun run typecheck && bun test && bun run build",
|
|
92
|
+
"publish:npm": "npm version patch && bun run build && npm publish --access public && git push && git push --tags"
|
|
93
|
+
}
|
|
94
|
+
}
|