@pastweb/vue 2.0.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.
- package/LICENSE +21 -0
- package/README.md +1455 -0
- package/dist/EntryAdapter/EntryAdapter.cjs +6 -0
- package/dist/EntryAdapter/EntryAdapter.cjs.map +1 -0
- package/dist/EntryAdapter/EntryAdapter.js +7 -0
- package/dist/EntryAdapter/EntryAdapter.js.map +1 -0
- package/dist/EntryAdapter/EntryAdapter.vue.d.cts +36 -0
- package/dist/EntryAdapter/EntryAdapter.vue.d.ts +37 -0
- package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.cjs +62 -0
- package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.cjs.map +1 -0
- package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.js +62 -0
- package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.js.map +1 -0
- package/dist/EntryAdapter/constants.cjs +14 -0
- package/dist/EntryAdapter/constants.cjs.map +1 -0
- package/dist/EntryAdapter/constants.d.cts +14 -0
- package/dist/EntryAdapter/constants.d.ts +14 -0
- package/dist/EntryAdapter/constants.js +13 -0
- package/dist/EntryAdapter/constants.js.map +1 -0
- package/dist/EntryAdapter/index.cjs +3 -0
- package/dist/EntryAdapter/index.d.cts +2 -0
- package/dist/EntryAdapter/index.d.ts +2 -0
- package/dist/EntryAdapter/index.js +2 -0
- package/dist/EntryAdapter/types.cjs +0 -0
- package/dist/EntryAdapter/types.d.cts +44 -0
- package/dist/EntryAdapter/types.d.ts +44 -0
- package/dist/EntryAdapter/types.js +0 -0
- package/dist/EntryAdapter/utils.cjs +62 -0
- package/dist/EntryAdapter/utils.cjs.map +1 -0
- package/dist/EntryAdapter/utils.d.cts +36 -0
- package/dist/EntryAdapter/utils.d.ts +36 -0
- package/dist/EntryAdapter/utils.js +60 -0
- package/dist/EntryAdapter/utils.js.map +1 -0
- package/dist/Island/Island.cjs +6 -0
- package/dist/Island/Island.cjs.map +1 -0
- package/dist/Island/Island.js +7 -0
- package/dist/Island/Island.js.map +1 -0
- package/dist/Island/Island.vue.d.cts +22 -0
- package/dist/Island/Island.vue.d.ts +23 -0
- package/dist/Island/Island.vue_vue_type_script_setup_true_lang.cjs +145 -0
- package/dist/Island/Island.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/Island/Island.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/Island/Island.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/Island/constants.cjs +12 -0
- package/dist/Island/constants.cjs.map +1 -0
- package/dist/Island/constants.d.cts +11 -0
- package/dist/Island/constants.d.ts +11 -0
- package/dist/Island/constants.js +10 -0
- package/dist/Island/constants.js.map +1 -0
- package/dist/Island/index.cjs +9 -0
- package/dist/Island/index.d.cts +5 -0
- package/dist/Island/index.d.ts +5 -0
- package/dist/Island/index.js +4 -0
- package/dist/Island/types.cjs +0 -0
- package/dist/Island/types.d.cts +18 -0
- package/dist/Island/types.d.ts +18 -0
- package/dist/Island/types.js +0 -0
- package/dist/Island/useIsland.cjs +23 -0
- package/dist/Island/useIsland.cjs.map +1 -0
- package/dist/Island/useIsland.d.cts +15 -0
- package/dist/Island/useIsland.d.ts +15 -0
- package/dist/Island/useIsland.js +21 -0
- package/dist/Island/useIsland.js.map +1 -0
- package/dist/Render/Render.cjs +6 -0
- package/dist/Render/Render.cjs.map +1 -0
- package/dist/Render/Render.js +7 -0
- package/dist/Render/Render.js.map +1 -0
- package/dist/Render/Render.vue.d.cts +10 -0
- package/dist/Render/Render.vue.d.ts +11 -0
- package/dist/Render/Render.vue_vue_type_script_lang.cjs +47 -0
- package/dist/Render/Render.vue_vue_type_script_lang.cjs.map +1 -0
- package/dist/Render/Render.vue_vue_type_script_lang.js +47 -0
- package/dist/Render/Render.vue_vue_type_script_lang.js.map +1 -0
- package/dist/Render/index.cjs +3 -0
- package/dist/Render/index.d.cts +3 -0
- package/dist/Render/index.d.ts +3 -0
- package/dist/Render/index.js +2 -0
- package/dist/Render/types.cjs +0 -0
- package/dist/Render/types.d.cts +21 -0
- package/dist/Render/types.d.ts +21 -0
- package/dist/Render/types.js +0 -0
- package/dist/Slot/Slot.cjs +89 -0
- package/dist/Slot/Slot.cjs.map +1 -0
- package/dist/Slot/Slot.d.cts +38 -0
- package/dist/Slot/Slot.d.ts +39 -0
- package/dist/Slot/Slot.js +89 -0
- package/dist/Slot/Slot.js.map +1 -0
- package/dist/Slot/index.cjs +3 -0
- package/dist/Slot/index.d.cts +3 -0
- package/dist/Slot/index.d.ts +3 -0
- package/dist/Slot/index.js +2 -0
- package/dist/Slot/types.cjs +0 -0
- package/dist/Slot/types.d.cts +17 -0
- package/dist/Slot/types.d.ts +17 -0
- package/dist/Slot/types.js +0 -0
- package/dist/_virtual/_rolldown/runtime.cjs +4 -0
- package/dist/api/hooks/index.cjs +20 -0
- package/dist/api/hooks/index.d.cts +12 -0
- package/dist/api/hooks/index.d.ts +12 -0
- package/dist/api/hooks/index.js +13 -0
- package/dist/api/hooks/reuseQuery/index.cjs +4 -0
- package/dist/api/hooks/reuseQuery/index.d.cts +2 -0
- package/dist/api/hooks/reuseQuery/index.d.ts +2 -0
- package/dist/api/hooks/reuseQuery/index.js +2 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.cjs +44 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.cjs.map +1 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.d.cts +37 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.d.ts +37 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.js +42 -0
- package/dist/api/hooks/reuseQuery/reuseQuery.js.map +1 -0
- package/dist/api/hooks/useApiQueryCache/index.cjs +3 -0
- package/dist/api/hooks/useApiQueryCache/index.d.cts +2 -0
- package/dist/api/hooks/useApiQueryCache/index.d.ts +2 -0
- package/dist/api/hooks/useApiQueryCache/index.js +2 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.cjs +31 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.cjs.map +1 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.d.cts +24 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.d.ts +24 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.js +30 -0
- package/dist/api/hooks/useApiQueryCache/useApiQueryCache.js.map +1 -0
- package/dist/api/hooks/useInfiniteQuery/index.cjs +3 -0
- package/dist/api/hooks/useInfiniteQuery/index.d.cts +3 -0
- package/dist/api/hooks/useInfiniteQuery/index.d.ts +3 -0
- package/dist/api/hooks/useInfiniteQuery/index.js +2 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.cjs +34 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.cjs.map +1 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.d.cts +29 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.d.ts +29 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.js +33 -0
- package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.js.map +1 -0
- package/dist/api/hooks/useMutation/index.cjs +3 -0
- package/dist/api/hooks/useMutation/index.d.cts +3 -0
- package/dist/api/hooks/useMutation/index.d.ts +3 -0
- package/dist/api/hooks/useMutation/index.js +2 -0
- package/dist/api/hooks/useMutation/useMutation.cjs +30 -0
- package/dist/api/hooks/useMutation/useMutation.cjs.map +1 -0
- package/dist/api/hooks/useMutation/useMutation.d.cts +25 -0
- package/dist/api/hooks/useMutation/useMutation.d.ts +25 -0
- package/dist/api/hooks/useMutation/useMutation.js +29 -0
- package/dist/api/hooks/useMutation/useMutation.js.map +1 -0
- package/dist/api/hooks/useQueries/index.cjs +3 -0
- package/dist/api/hooks/useQueries/index.d.cts +3 -0
- package/dist/api/hooks/useQueries/index.d.ts +3 -0
- package/dist/api/hooks/useQueries/index.js +2 -0
- package/dist/api/hooks/useQueries/useQueries.cjs +32 -0
- package/dist/api/hooks/useQueries/useQueries.cjs.map +1 -0
- package/dist/api/hooks/useQueries/useQueries.d.cts +28 -0
- package/dist/api/hooks/useQueries/useQueries.d.ts +28 -0
- package/dist/api/hooks/useQueries/useQueries.js +31 -0
- package/dist/api/hooks/useQueries/useQueries.js.map +1 -0
- package/dist/api/hooks/useQuery/index.cjs +3 -0
- package/dist/api/hooks/useQuery/index.d.cts +3 -0
- package/dist/api/hooks/useQuery/index.d.ts +3 -0
- package/dist/api/hooks/useQuery/index.js +2 -0
- package/dist/api/hooks/useQuery/useQuery.cjs +30 -0
- package/dist/api/hooks/useQuery/useQuery.cjs.map +1 -0
- package/dist/api/hooks/useQuery/useQuery.d.cts +25 -0
- package/dist/api/hooks/useQuery/useQuery.d.ts +25 -0
- package/dist/api/hooks/useQuery/useQuery.js +29 -0
- package/dist/api/hooks/useQuery/useQuery.js.map +1 -0
- package/dist/api/hooks/utils/index.cjs +4 -0
- package/dist/api/hooks/utils/index.d.cts +2 -0
- package/dist/api/hooks/utils/index.d.ts +2 -0
- package/dist/api/hooks/utils/index.js +2 -0
- package/dist/api/hooks/utils/useReactiveRender.cjs +56 -0
- package/dist/api/hooks/utils/useReactiveRender.cjs.map +1 -0
- package/dist/api/hooks/utils/useReactiveRender.d.cts +29 -0
- package/dist/api/hooks/utils/useReactiveRender.d.ts +29 -0
- package/dist/api/hooks/utils/useReactiveRender.js +54 -0
- package/dist/api/hooks/utils/useReactiveRender.js.map +1 -0
- package/dist/api/index.cjs +18 -0
- package/dist/api/index.d.cts +15 -0
- package/dist/api/index.d.ts +15 -0
- package/dist/api/index.js +10 -0
- package/dist/api/installApiCache/index.cjs +3 -0
- package/dist/api/installApiCache/index.d.cts +3 -0
- package/dist/api/installApiCache/index.d.ts +3 -0
- package/dist/api/installApiCache/index.js +2 -0
- package/dist/api/installApiCache/installApiCache.cjs +35 -0
- package/dist/api/installApiCache/installApiCache.cjs.map +1 -0
- package/dist/api/installApiCache/installApiCache.d.cts +29 -0
- package/dist/api/installApiCache/installApiCache.d.ts +29 -0
- package/dist/api/installApiCache/installApiCache.js +34 -0
- package/dist/api/installApiCache/installApiCache.js.map +1 -0
- package/dist/api/installApiCache/types.cjs +0 -0
- package/dist/api/installApiCache/types.d.cts +21 -0
- package/dist/api/installApiCache/types.d.ts +21 -0
- package/dist/api/installApiCache/types.js +0 -0
- package/dist/api/types.cjs +0 -0
- package/dist/api/types.d.cts +2 -0
- package/dist/api/types.d.ts +2 -0
- package/dist/api/types.js +0 -0
- package/dist/computed/computed.cjs +28 -0
- package/dist/computed/computed.cjs.map +1 -0
- package/dist/computed/computed.d.cts +25 -0
- package/dist/computed/computed.d.ts +25 -0
- package/dist/computed/computed.js +27 -0
- package/dist/computed/computed.js.map +1 -0
- package/dist/computed/index.cjs +3 -0
- package/dist/computed/index.d.cts +2 -0
- package/dist/computed/index.d.ts +2 -0
- package/dist/computed/index.js +2 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.cjs +6 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.cjs.map +1 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.js +7 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.js.map +1 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue.d.cts +6 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue.d.ts +7 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.cjs +35 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/createEntry/UpdateEntry/Vnode.cjs +19 -0
- package/dist/createEntry/UpdateEntry/Vnode.cjs.map +1 -0
- package/dist/createEntry/UpdateEntry/Vnode.d.cts +20 -0
- package/dist/createEntry/UpdateEntry/Vnode.d.ts +20 -0
- package/dist/createEntry/UpdateEntry/Vnode.js +18 -0
- package/dist/createEntry/UpdateEntry/Vnode.js.map +1 -0
- package/dist/createEntry/UpdateEntry/index.cjs +3 -0
- package/dist/createEntry/UpdateEntry/index.d.cts +3 -0
- package/dist/createEntry/UpdateEntry/index.d.ts +3 -0
- package/dist/createEntry/UpdateEntry/index.js +2 -0
- package/dist/createEntry/UpdateEntry/types.cjs +0 -0
- package/dist/createEntry/UpdateEntry/types.d.cts +18 -0
- package/dist/createEntry/UpdateEntry/types.d.ts +18 -0
- package/dist/createEntry/UpdateEntry/types.js +0 -0
- package/dist/createEntry/WaitFor/WaitFor.cjs +6 -0
- package/dist/createEntry/WaitFor/WaitFor.cjs.map +1 -0
- package/dist/createEntry/WaitFor/WaitFor.js +7 -0
- package/dist/createEntry/WaitFor/WaitFor.js.map +1 -0
- package/dist/createEntry/WaitFor/WaitFor.vue.d.cts +6 -0
- package/dist/createEntry/WaitFor/WaitFor.vue.d.ts +7 -0
- package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.cjs +50 -0
- package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.js +50 -0
- package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/createEntry/WaitFor/index.cjs +3 -0
- package/dist/createEntry/WaitFor/index.d.cts +3 -0
- package/dist/createEntry/WaitFor/index.d.ts +3 -0
- package/dist/createEntry/WaitFor/index.js +2 -0
- package/dist/createEntry/WaitFor/types.cjs +0 -0
- package/dist/createEntry/WaitFor/types.d.cts +21 -0
- package/dist/createEntry/WaitFor/types.d.ts +21 -0
- package/dist/createEntry/WaitFor/types.js +0 -0
- package/dist/createEntry/createEntry.cjs +32 -0
- package/dist/createEntry/createEntry.cjs.map +1 -0
- package/dist/createEntry/createEntry.d.cts +17 -0
- package/dist/createEntry/createEntry.d.ts +17 -0
- package/dist/createEntry/createEntry.js +31 -0
- package/dist/createEntry/createEntry.js.map +1 -0
- package/dist/createEntry/createServerEntry.cjs +45 -0
- package/dist/createEntry/createServerEntry.cjs.map +1 -0
- package/dist/createEntry/createServerEntry.d.cts +17 -0
- package/dist/createEntry/createServerEntry.d.ts +17 -0
- package/dist/createEntry/createServerEntry.js +43 -0
- package/dist/createEntry/createServerEntry.js.map +1 -0
- package/dist/createEntry/index.cjs +5 -0
- package/dist/createEntry/index.d.cts +5 -0
- package/dist/createEntry/index.d.ts +5 -0
- package/dist/createEntry/index.js +3 -0
- package/dist/createEntry/types.cjs +0 -0
- package/dist/createEntry/types.d.cts +75 -0
- package/dist/createEntry/types.d.ts +75 -0
- package/dist/createEntry/types.js +0 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.cjs +28 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.cjs.map +1 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.d.cts +27 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.d.ts +27 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.js +27 -0
- package/dist/createEntry/utils/createServerVueApp/createServerVueApp.js.map +1 -0
- package/dist/createEntry/utils/createServerVueApp/index.cjs +3 -0
- package/dist/createEntry/utils/createServerVueApp/index.d.cts +2 -0
- package/dist/createEntry/utils/createServerVueApp/index.d.ts +2 -0
- package/dist/createEntry/utils/createServerVueApp/index.js +2 -0
- package/dist/createEntry/utils/createServerVueApp/types.cjs +0 -0
- package/dist/createEntry/utils/createServerVueApp/types.d.cts +7 -0
- package/dist/createEntry/utils/createServerVueApp/types.d.ts +7 -0
- package/dist/createEntry/utils/createServerVueApp/types.js +0 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.cjs +43 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.cjs.map +1 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.d.cts +22 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.d.ts +22 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.js +42 -0
- package/dist/createEntry/utils/createVueApp/createVueApp.js.map +1 -0
- package/dist/createEntry/utils/createVueApp/index.cjs +3 -0
- package/dist/createEntry/utils/createVueApp/index.d.cts +2 -0
- package/dist/createEntry/utils/createVueApp/index.d.ts +2 -0
- package/dist/createEntry/utils/createVueApp/index.js +2 -0
- package/dist/createEntry/utils/index.cjs +10 -0
- package/dist/createEntry/utils/index.d.cts +5 -0
- package/dist/createEntry/utils/index.d.ts +5 -0
- package/dist/createEntry/utils/index.js +6 -0
- package/dist/createEntry/utils/normalizeVueOptions/index.cjs +3 -0
- package/dist/createEntry/utils/normalizeVueOptions/index.d.cts +2 -0
- package/dist/createEntry/utils/normalizeVueOptions/index.d.ts +2 -0
- package/dist/createEntry/utils/normalizeVueOptions/index.js +2 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.cjs +28 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.cjs.map +1 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.d.cts +17 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.d.ts +17 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.js +27 -0
- package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.js.map +1 -0
- package/dist/createEntry/utils/setupVueEntry/index.cjs +3 -0
- package/dist/createEntry/utils/setupVueEntry/index.d.cts +2 -0
- package/dist/createEntry/utils/setupVueEntry/index.d.ts +2 -0
- package/dist/createEntry/utils/setupVueEntry/index.js +2 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.cjs +31 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.cjs.map +1 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.d.cts +17 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.d.ts +17 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.js +30 -0
- package/dist/createEntry/utils/setupVueEntry/setupVueEntry.js.map +1 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.cjs +49 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.cjs.map +1 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.d.cts +33 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.d.ts +33 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.js +48 -0
- package/dist/createPiniaAsyncStore/createPiniaAsyncStore.js.map +1 -0
- package/dist/createPiniaAsyncStore/index.cjs +3 -0
- package/dist/createPiniaAsyncStore/index.d.cts +3 -0
- package/dist/createPiniaAsyncStore/index.d.ts +3 -0
- package/dist/createPiniaAsyncStore/index.js +2 -0
- package/dist/createPiniaAsyncStore/types.cjs +0 -0
- package/dist/createPiniaAsyncStore/types.d.cts +22 -0
- package/dist/createPiniaAsyncStore/types.d.ts +22 -0
- package/dist/createPiniaAsyncStore/types.js +0 -0
- package/dist/getContext/getContext.cjs +29 -0
- package/dist/getContext/getContext.cjs.map +1 -0
- package/dist/getContext/getContext.d.cts +24 -0
- package/dist/getContext/getContext.d.ts +24 -0
- package/dist/getContext/getContext.js +28 -0
- package/dist/getContext/getContext.js.map +1 -0
- package/dist/getContext/index.cjs +3 -0
- package/dist/getContext/index.d.cts +2 -0
- package/dist/getContext/index.d.ts +2 -0
- package/dist/getContext/index.js +2 -0
- package/dist/getEventHandlers/getEventHandlers.cjs +65 -0
- package/dist/getEventHandlers/getEventHandlers.cjs.map +1 -0
- package/dist/getEventHandlers/getEventHandlers.d.cts +45 -0
- package/dist/getEventHandlers/getEventHandlers.d.ts +45 -0
- package/dist/getEventHandlers/getEventHandlers.js +64 -0
- package/dist/getEventHandlers/getEventHandlers.js.map +1 -0
- package/dist/getEventHandlers/index.cjs +3 -0
- package/dist/getEventHandlers/index.d.cts +3 -0
- package/dist/getEventHandlers/index.d.ts +3 -0
- package/dist/getEventHandlers/index.js +2 -0
- package/dist/getEventHandlers/types.cjs +0 -0
- package/dist/getEventHandlers/types.d.cts +7 -0
- package/dist/getEventHandlers/types.d.ts +7 -0
- package/dist/getEventHandlers/types.js +0 -0
- package/dist/index.cjs +104 -0
- package/dist/index.d.cts +61 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +62 -0
- package/dist/node_modules/@babel/parser/lib/index.cjs +12599 -0
- package/dist/node_modules/@babel/parser/lib/index.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs +4832 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs +4775 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-core/index.cjs +18 -0
- package/dist/node_modules/@vue/compiler-core/index.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs +665 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs +447 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-dom/index.cjs +18 -0
- package/dist/node_modules/@vue/compiler-dom/index.cjs.map +1 -0
- package/dist/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.cjs +848 -0
- package/dist/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.cjs.map +1 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.cjs +830 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.cjs.map +1 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.cjs +605 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.cjs.map +1 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +532 -0
- package/dist/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/node_modules/@vue/server-renderer/index.cjs +18 -0
- package/dist/node_modules/@vue/server-renderer/index.cjs.map +1 -0
- package/dist/node_modules/@vue/shared/dist/shared.cjs.cjs +496 -0
- package/dist/node_modules/@vue/shared/dist/shared.cjs.cjs.map +1 -0
- package/dist/node_modules/@vue/shared/dist/shared.cjs.prod.cjs +495 -0
- package/dist/node_modules/@vue/shared/dist/shared.cjs.prod.cjs.map +1 -0
- package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +166 -0
- package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/node_modules/@vue/shared/index.cjs +18 -0
- package/dist/node_modules/@vue/shared/index.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.cjs +81 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode.cjs +474 -0
- package/dist/node_modules/entities/dist/commonjs/decode.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.cjs +18 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.cjs +18 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/internal/bin-trie-flags.cjs +32 -0
- package/dist/node_modules/entities/dist/commonjs/internal/bin-trie-flags.cjs.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/internal/decode-shared.cjs +26 -0
- package/dist/node_modules/entities/dist/commonjs/internal/decode-shared.cjs.map +1 -0
- package/dist/node_modules/estree-walker/dist/umd/estree-walker.cjs +254 -0
- package/dist/node_modules/estree-walker/dist/umd/estree-walker.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/array-set.cjs +102 -0
- package/dist/node_modules/source-map-js/lib/array-set.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/base64-vlq.cjs +75 -0
- package/dist/node_modules/source-map-js/lib/base64-vlq.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/base64.cjs +42 -0
- package/dist/node_modules/source-map-js/lib/base64.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/binary-search.cjs +69 -0
- package/dist/node_modules/source-map-js/lib/binary-search.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/mapping-list.cjs +79 -0
- package/dist/node_modules/source-map-js/lib/mapping-list.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/quick-sort.cjs +90 -0
- package/dist/node_modules/source-map-js/lib/quick-sort.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/source-map-consumer.cjs +790 -0
- package/dist/node_modules/source-map-js/lib/source-map-consumer.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/source-map-generator.cjs +297 -0
- package/dist/node_modules/source-map-js/lib/source-map-generator.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/source-node.cjs +295 -0
- package/dist/node_modules/source-map-js/lib/source-node.cjs.map +1 -0
- package/dist/node_modules/source-map-js/lib/util.cjs +353 -0
- package/dist/node_modules/source-map-js/lib/util.cjs.map +1 -0
- package/dist/node_modules/source-map-js/source-map.cjs +19 -0
- package/dist/node_modules/source-map-js/source-map.cjs.map +1 -0
- package/dist/portals/Portal/Portal.cjs +6 -0
- package/dist/portals/Portal/Portal.cjs.map +1 -0
- package/dist/portals/Portal/Portal.js +7 -0
- package/dist/portals/Portal/Portal.js.map +1 -0
- package/dist/portals/Portal/Portal.vue.d.cts +6 -0
- package/dist/portals/Portal/Portal.vue.d.ts +7 -0
- package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.cjs +56 -0
- package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/portals/Portal/index.cjs +3 -0
- package/dist/portals/Portal/index.d.cts +3 -0
- package/dist/portals/Portal/index.d.ts +3 -0
- package/dist/portals/Portal/index.js +2 -0
- package/dist/portals/Portal/types.cjs +0 -0
- package/dist/portals/Portal/types.d.cts +19 -0
- package/dist/portals/Portal/types.d.ts +19 -0
- package/dist/portals/Portal/types.js +0 -0
- package/dist/portals/index.cjs +13 -0
- package/dist/portals/index.d.cts +8 -0
- package/dist/portals/index.d.ts +8 -0
- package/dist/portals/index.js +8 -0
- package/dist/portals/installPortals/index.cjs +3 -0
- package/dist/portals/installPortals/index.d.cts +3 -0
- package/dist/portals/installPortals/index.d.ts +3 -0
- package/dist/portals/installPortals/index.js +2 -0
- package/dist/portals/installPortals/installPortals.cjs +25 -0
- package/dist/portals/installPortals/installPortals.cjs.map +1 -0
- package/dist/portals/installPortals/installPortals.d.cts +25 -0
- package/dist/portals/installPortals/installPortals.d.ts +25 -0
- package/dist/portals/installPortals/installPortals.js +24 -0
- package/dist/portals/installPortals/installPortals.js.map +1 -0
- package/dist/portals/installPortals/types.cjs +0 -0
- package/dist/portals/installPortals/types.d.cts +23 -0
- package/dist/portals/installPortals/types.d.ts +23 -0
- package/dist/portals/installPortals/types.js +0 -0
- package/dist/portals/types.cjs +0 -0
- package/dist/portals/types.d.cts +40 -0
- package/dist/portals/types.d.ts +40 -0
- package/dist/portals/types.js +0 -0
- package/dist/portals/usePortal.cjs +44 -0
- package/dist/portals/usePortal.cjs.map +1 -0
- package/dist/portals/usePortal.d.cts +17 -0
- package/dist/portals/usePortal.d.ts +17 -0
- package/dist/portals/usePortal.js +43 -0
- package/dist/portals/usePortal.js.map +1 -0
- package/dist/portals/usePortalAnchors.cjs +21 -0
- package/dist/portals/usePortalAnchors.cjs.map +1 -0
- package/dist/portals/usePortalAnchors.d.cts +14 -0
- package/dist/portals/usePortalAnchors.d.ts +14 -0
- package/dist/portals/usePortalAnchors.js +20 -0
- package/dist/portals/usePortalAnchors.js.map +1 -0
- package/dist/portals/usePortals.cjs +21 -0
- package/dist/portals/usePortals.cjs.map +1 -0
- package/dist/portals/usePortals.d.cts +14 -0
- package/dist/portals/usePortals.d.ts +14 -0
- package/dist/portals/usePortals.js +20 -0
- package/dist/portals/usePortals.js.map +1 -0
- package/dist/router/RouterLink/RouterLink.cjs +6 -0
- package/dist/router/RouterLink/RouterLink.cjs.map +1 -0
- package/dist/router/RouterLink/RouterLink.js +7 -0
- package/dist/router/RouterLink/RouterLink.js.map +1 -0
- package/dist/router/RouterLink/RouterLink.vue.d.cts +18 -0
- package/dist/router/RouterLink/RouterLink.vue.d.ts +19 -0
- package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.cjs +59 -0
- package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/router/RouterLink/index.cjs +3 -0
- package/dist/router/RouterLink/index.d.cts +3 -0
- package/dist/router/RouterLink/index.d.ts +3 -0
- package/dist/router/RouterLink/index.js +2 -0
- package/dist/router/RouterLink/types.cjs +0 -0
- package/dist/router/RouterLink/types.d.cts +11 -0
- package/dist/router/RouterLink/types.d.ts +11 -0
- package/dist/router/RouterLink/types.js +0 -0
- package/dist/router/RouterView/RouterView.cjs +6 -0
- package/dist/router/RouterView/RouterView.cjs.map +1 -0
- package/dist/router/RouterView/RouterView.js +7 -0
- package/dist/router/RouterView/RouterView.js.map +1 -0
- package/dist/router/RouterView/RouterView.vue.d.cts +6 -0
- package/dist/router/RouterView/RouterView.vue.d.ts +7 -0
- package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.cjs +58 -0
- package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/router/RouterView/index.cjs +3 -0
- package/dist/router/RouterView/index.d.cts +2 -0
- package/dist/router/RouterView/index.d.ts +2 -0
- package/dist/router/RouterView/index.js +2 -0
- package/dist/router/RouterView/types.cjs +0 -0
- package/dist/router/RouterView/types.d.cts +15 -0
- package/dist/router/RouterView/types.d.ts +15 -0
- package/dist/router/RouterView/types.js +0 -0
- package/dist/router/index.cjs +28 -0
- package/dist/router/index.d.cts +12 -0
- package/dist/router/index.d.ts +12 -0
- package/dist/router/index.js +18 -0
- package/dist/router/installRouter.cjs +34 -0
- package/dist/router/installRouter.cjs.map +1 -0
- package/dist/router/installRouter.d.cts +14 -0
- package/dist/router/installRouter.d.ts +14 -0
- package/dist/router/installRouter.js +33 -0
- package/dist/router/installRouter.js.map +1 -0
- package/dist/router/types.cjs +1 -0
- package/dist/router/types.d.cts +21 -0
- package/dist/router/types.d.ts +21 -0
- package/dist/router/types.js +1 -0
- package/dist/router/useLocation/index.cjs +3 -0
- package/dist/router/useLocation/index.d.cts +2 -0
- package/dist/router/useLocation/index.d.ts +2 -0
- package/dist/router/useLocation/index.js +2 -0
- package/dist/router/useLocation/useLocation.cjs +24 -0
- package/dist/router/useLocation/useLocation.cjs.map +1 -0
- package/dist/router/useLocation/useLocation.d.cts +12 -0
- package/dist/router/useLocation/useLocation.d.ts +12 -0
- package/dist/router/useLocation/useLocation.js +23 -0
- package/dist/router/useLocation/useLocation.js.map +1 -0
- package/dist/router/useNavigate/index.cjs +3 -0
- package/dist/router/useNavigate/index.d.cts +2 -0
- package/dist/router/useNavigate/index.d.ts +2 -0
- package/dist/router/useNavigate/index.js +2 -0
- package/dist/router/useNavigate/useNavigate.cjs +17 -0
- package/dist/router/useNavigate/useNavigate.cjs.map +1 -0
- package/dist/router/useNavigate/useNavigate.d.cts +12 -0
- package/dist/router/useNavigate/useNavigate.d.ts +12 -0
- package/dist/router/useNavigate/useNavigate.js +16 -0
- package/dist/router/useNavigate/useNavigate.js.map +1 -0
- package/dist/router/usePaths/index.cjs +3 -0
- package/dist/router/usePaths/index.d.cts +2 -0
- package/dist/router/usePaths/index.d.ts +2 -0
- package/dist/router/usePaths/index.js +2 -0
- package/dist/router/usePaths/usePaths.cjs +27 -0
- package/dist/router/usePaths/usePaths.cjs.map +1 -0
- package/dist/router/usePaths/usePaths.d.cts +14 -0
- package/dist/router/usePaths/usePaths.d.ts +14 -0
- package/dist/router/usePaths/usePaths.js +26 -0
- package/dist/router/usePaths/usePaths.js.map +1 -0
- package/dist/router/useRoute/index.cjs +3 -0
- package/dist/router/useRoute/index.d.cts +2 -0
- package/dist/router/useRoute/index.d.ts +2 -0
- package/dist/router/useRoute/index.js +2 -0
- package/dist/router/useRoute/useRoute.cjs +28 -0
- package/dist/router/useRoute/useRoute.cjs.map +1 -0
- package/dist/router/useRoute/useRoute.d.cts +12 -0
- package/dist/router/useRoute/useRoute.d.ts +12 -0
- package/dist/router/useRoute/useRoute.js +27 -0
- package/dist/router/useRoute/useRoute.js.map +1 -0
- package/dist/router/useRouter/index.cjs +3 -0
- package/dist/router/useRouter/index.d.cts +2 -0
- package/dist/router/useRouter/index.d.ts +2 -0
- package/dist/router/useRouter/index.js +2 -0
- package/dist/router/useRouter/useRouter.cjs +17 -0
- package/dist/router/useRouter/useRouter.cjs.map +1 -0
- package/dist/router/useRouter/useRouter.d.cts +12 -0
- package/dist/router/useRouter/useRouter.d.ts +12 -0
- package/dist/router/useRouter/useRouter.js +16 -0
- package/dist/router/useRouter/useRouter.js.map +1 -0
- package/dist/router/useRouterLink/index.cjs +3 -0
- package/dist/router/useRouterLink/index.d.cts +3 -0
- package/dist/router/useRouterLink/index.d.ts +3 -0
- package/dist/router/useRouterLink/index.js +2 -0
- package/dist/router/useRouterLink/types.cjs +0 -0
- package/dist/router/useRouterLink/types.d.cts +2 -0
- package/dist/router/useRouterLink/types.d.ts +2 -0
- package/dist/router/useRouterLink/types.js +0 -0
- package/dist/router/useRouterLink/useRouterLink.cjs +37 -0
- package/dist/router/useRouterLink/useRouterLink.cjs.map +1 -0
- package/dist/router/useRouterLink/useRouterLink.d.cts +13 -0
- package/dist/router/useRouterLink/useRouterLink.d.ts +13 -0
- package/dist/router/useRouterLink/useRouterLink.js +36 -0
- package/dist/router/useRouterLink/useRouterLink.js.map +1 -0
- package/dist/router/useSearchParams/index.cjs +3 -0
- package/dist/router/useSearchParams/index.d.cts +2 -0
- package/dist/router/useSearchParams/index.d.ts +2 -0
- package/dist/router/useSearchParams/index.js +2 -0
- package/dist/router/useSearchParams/useSearchParams.cjs +29 -0
- package/dist/router/useSearchParams/useSearchParams.cjs.map +1 -0
- package/dist/router/useSearchParams/useSearchParams.d.cts +14 -0
- package/dist/router/useSearchParams/useSearchParams.d.ts +14 -0
- package/dist/router/useSearchParams/useSearchParams.js +28 -0
- package/dist/router/useSearchParams/useSearchParams.js.map +1 -0
- package/dist/setContext/index.cjs +3 -0
- package/dist/setContext/index.d.cts +2 -0
- package/dist/setContext/index.d.ts +2 -0
- package/dist/setContext/index.js +2 -0
- package/dist/setContext/setContext.cjs +29 -0
- package/dist/setContext/setContext.cjs.map +1 -0
- package/dist/setContext/setContext.d.cts +24 -0
- package/dist/setContext/setContext.d.ts +24 -0
- package/dist/setContext/setContext.js +28 -0
- package/dist/setContext/setContext.js.map +1 -0
- package/dist/useBeforeMount/index.cjs +3 -0
- package/dist/useBeforeMount/index.d.cts +2 -0
- package/dist/useBeforeMount/index.d.ts +2 -0
- package/dist/useBeforeMount/index.js +2 -0
- package/dist/useBeforeMount/useBeforeMount.cjs +29 -0
- package/dist/useBeforeMount/useBeforeMount.cjs.map +1 -0
- package/dist/useBeforeMount/useBeforeMount.d.cts +24 -0
- package/dist/useBeforeMount/useBeforeMount.d.ts +24 -0
- package/dist/useBeforeMount/useBeforeMount.js +28 -0
- package/dist/useBeforeMount/useBeforeMount.js.map +1 -0
- package/dist/useBeforeUnmount/index.cjs +3 -0
- package/dist/useBeforeUnmount/index.d.cts +2 -0
- package/dist/useBeforeUnmount/index.d.ts +2 -0
- package/dist/useBeforeUnmount/index.js +2 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.cjs +29 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.cjs.map +1 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.d.cts +24 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.d.ts +24 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.js +28 -0
- package/dist/useBeforeUnmount/useBeforeUnmount.js.map +1 -0
- package/dist/useChildren/index.cjs +3 -0
- package/dist/useChildren/index.d.cts +2 -0
- package/dist/useChildren/index.d.ts +2 -0
- package/dist/useChildren/index.js +2 -0
- package/dist/useChildren/useChildren.cjs +35 -0
- package/dist/useChildren/useChildren.cjs.map +1 -0
- package/dist/useChildren/useChildren.d.cts +26 -0
- package/dist/useChildren/useChildren.d.ts +26 -0
- package/dist/useChildren/useChildren.js +34 -0
- package/dist/useChildren/useChildren.js.map +1 -0
- package/dist/useColorScheme/index.cjs +3 -0
- package/dist/useColorScheme/index.d.cts +2 -0
- package/dist/useColorScheme/index.d.ts +2 -0
- package/dist/useColorScheme/index.js +2 -0
- package/dist/useColorScheme/useColorScheme.cjs +46 -0
- package/dist/useColorScheme/useColorScheme.cjs.map +1 -0
- package/dist/useColorScheme/useColorScheme.d.cts +29 -0
- package/dist/useColorScheme/useColorScheme.d.ts +29 -0
- package/dist/useColorScheme/useColorScheme.js +45 -0
- package/dist/useColorScheme/useColorScheme.js.map +1 -0
- package/dist/useMediator/index.cjs +3 -0
- package/dist/useMediator/index.d.cts +3 -0
- package/dist/useMediator/index.d.ts +3 -0
- package/dist/useMediator/index.js +2 -0
- package/dist/useMediator/types.cjs +0 -0
- package/dist/useMediator/types.d.cts +2 -0
- package/dist/useMediator/types.d.ts +2 -0
- package/dist/useMediator/types.js +0 -0
- package/dist/useMediator/useMediator.cjs +137 -0
- package/dist/useMediator/useMediator.cjs.map +1 -0
- package/dist/useMediator/useMediator.d.cts +61 -0
- package/dist/useMediator/useMediator.d.ts +61 -0
- package/dist/useMediator/useMediator.js +136 -0
- package/dist/useMediator/useMediator.js.map +1 -0
- package/dist/useMediator/utils.cjs +22 -0
- package/dist/useMediator/utils.cjs.map +1 -0
- package/dist/useMediator/utils.d.cts +14 -0
- package/dist/useMediator/utils.d.ts +14 -0
- package/dist/useMediator/utils.js +21 -0
- package/dist/useMediator/utils.js.map +1 -0
- package/dist/useMounted/index.cjs +3 -0
- package/dist/useMounted/index.d.cts +2 -0
- package/dist/useMounted/index.d.ts +2 -0
- package/dist/useMounted/index.js +2 -0
- package/dist/useMounted/useMounted.cjs +29 -0
- package/dist/useMounted/useMounted.cjs.map +1 -0
- package/dist/useMounted/useMounted.d.cts +24 -0
- package/dist/useMounted/useMounted.d.ts +24 -0
- package/dist/useMounted/useMounted.js +28 -0
- package/dist/useMounted/useMounted.js.map +1 -0
- package/dist/useRef/index.cjs +3 -0
- package/dist/useRef/index.d.cts +2 -0
- package/dist/useRef/index.d.ts +2 -0
- package/dist/useRef/index.js +2 -0
- package/dist/useRef/useRef.cjs +28 -0
- package/dist/useRef/useRef.cjs.map +1 -0
- package/dist/useRef/useRef.d.cts +25 -0
- package/dist/useRef/useRef.d.ts +25 -0
- package/dist/useRef/useRef.js +27 -0
- package/dist/useRef/useRef.js.map +1 -0
- package/dist/withDefaultProps/constants.cjs +10 -0
- package/dist/withDefaultProps/constants.cjs.map +1 -0
- package/dist/withDefaultProps/constants.d.cts +8 -0
- package/dist/withDefaultProps/constants.d.ts +8 -0
- package/dist/withDefaultProps/constants.js +9 -0
- package/dist/withDefaultProps/constants.js.map +1 -0
- package/dist/withDefaultProps/index.cjs +3 -0
- package/dist/withDefaultProps/index.d.cts +3 -0
- package/dist/withDefaultProps/index.d.ts +3 -0
- package/dist/withDefaultProps/index.js +2 -0
- package/dist/withDefaultProps/types.cjs +0 -0
- package/dist/withDefaultProps/types.d.cts +25 -0
- package/dist/withDefaultProps/types.d.ts +25 -0
- package/dist/withDefaultProps/types.js +0 -0
- package/dist/withDefaultProps/withDefaultProps.cjs +85 -0
- package/dist/withDefaultProps/withDefaultProps.cjs.map +1 -0
- package/dist/withDefaultProps/withDefaultProps.d.cts +48 -0
- package/dist/withDefaultProps/withDefaultProps.d.ts +48 -0
- package/dist/withDefaultProps/withDefaultProps.js +84 -0
- package/dist/withDefaultProps/withDefaultProps.js.map +1 -0
- package/dist/withDefaultPropsHandlers/constants.cjs +7 -0
- package/dist/withDefaultPropsHandlers/constants.cjs.map +1 -0
- package/dist/withDefaultPropsHandlers/constants.d.cts +5 -0
- package/dist/withDefaultPropsHandlers/constants.d.ts +5 -0
- package/dist/withDefaultPropsHandlers/constants.js +6 -0
- package/dist/withDefaultPropsHandlers/constants.js.map +1 -0
- package/dist/withDefaultPropsHandlers/index.cjs +3 -0
- package/dist/withDefaultPropsHandlers/index.d.cts +3 -0
- package/dist/withDefaultPropsHandlers/index.d.ts +3 -0
- package/dist/withDefaultPropsHandlers/index.js +2 -0
- package/dist/withDefaultPropsHandlers/types.cjs +0 -0
- package/dist/withDefaultPropsHandlers/types.d.cts +12 -0
- package/dist/withDefaultPropsHandlers/types.d.ts +12 -0
- package/dist/withDefaultPropsHandlers/types.js +0 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.cjs +81 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.cjs.map +1 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.d.cts +49 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.d.ts +49 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.js +80 -0
- package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.js.map +1 -0
- package/package.json +647 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/useMediator/utils.ts"],"sourcesContent":["import { update } from '@pastweb/tools/update';\n\n/**\n * Synchronizes a mutable record with a source object.\n *\n * Keys missing from the source are removed from the target, then remaining\n * values are merged with the shared tools `update` helper.\n *\n * @param target - Mutable record to update in place.\n * @param source - Source values that should remain on the target.\n */\nexport function syncRecord(target: Record<string, any>, source: Record<string, any>): void {\n Object.keys(target).forEach(key => {\n if (!(key in source)) delete target[key];\n });\n\n update(target, source);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,WAAW,QAA6B,QAAmC;CACzF,OAAO,KAAK,MAAM,CAAC,CAAC,SAAQ,QAAO;EACjC,IAAI,EAAE,OAAO,SAAS,OAAO,OAAO;CACtC,CAAC;CAED,OAAO,QAAQ,MAAM;AACvB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
//#region src/useMounted/useMounted.ts
|
|
4
|
+
/**
|
|
5
|
+
* Registers a callback with Vue's `onMounted` lifecycle hook.
|
|
6
|
+
*
|
|
7
|
+
* Use it for work that requires the component to be mounted, such as reading
|
|
8
|
+
* DOM refs, installing browser-only listeners, or starting client-side effects.
|
|
9
|
+
* Async callbacks are accepted, but Vue does not use the returned promise as a
|
|
10
|
+
* cleanup function.
|
|
11
|
+
*
|
|
12
|
+
* @param fn - Callback invoked once after the component mounts.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { useMounted } from '@pastweb/vue';
|
|
17
|
+
*
|
|
18
|
+
* useMounted(() => {
|
|
19
|
+
* inputRef.value?.focus();
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
function useMounted(fn) {
|
|
24
|
+
(0, vue.onMounted)(fn);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.useMounted = useMounted;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=useMounted.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMounted.cjs","names":[],"sources":["../../src/useMounted/useMounted.ts"],"sourcesContent":["import { onMounted } from 'vue';\n\n/**\n * Registers a callback with Vue's `onMounted` lifecycle hook.\n *\n * Use it for work that requires the component to be mounted, such as reading\n * DOM refs, installing browser-only listeners, or starting client-side effects.\n * Async callbacks are accepted, but Vue does not use the returned promise as a\n * cleanup function.\n *\n * @param fn - Callback invoked once after the component mounts.\n *\n * @example\n * ```ts\n * import { useMounted } from '@pastweb/vue';\n *\n * useMounted(() => {\n * inputRef.value?.focus();\n * });\n * ```\n */\nexport function useMounted(fn: () => void | Promise<void>): void {\n onMounted(fn);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,WAAW,IAAsC;CAC/D,CAAA,GAAA,IAAA,UAAA,CAAU,EAAE;AACd"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/useMounted/useMounted.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Registers a callback with Vue's `onMounted` lifecycle hook.
|
|
4
|
+
*
|
|
5
|
+
* Use it for work that requires the component to be mounted, such as reading
|
|
6
|
+
* DOM refs, installing browser-only listeners, or starting client-side effects.
|
|
7
|
+
* Async callbacks are accepted, but Vue does not use the returned promise as a
|
|
8
|
+
* cleanup function.
|
|
9
|
+
*
|
|
10
|
+
* @param fn - Callback invoked once after the component mounts.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { useMounted } from '@pastweb/vue';
|
|
15
|
+
*
|
|
16
|
+
* useMounted(() => {
|
|
17
|
+
* inputRef.value?.focus();
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function useMounted(fn: () => void | Promise<void>): void;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { useMounted };
|
|
24
|
+
//# sourceMappingURL=useMounted.d.cts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/useMounted/useMounted.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Registers a callback with Vue's `onMounted` lifecycle hook.
|
|
4
|
+
*
|
|
5
|
+
* Use it for work that requires the component to be mounted, such as reading
|
|
6
|
+
* DOM refs, installing browser-only listeners, or starting client-side effects.
|
|
7
|
+
* Async callbacks are accepted, but Vue does not use the returned promise as a
|
|
8
|
+
* cleanup function.
|
|
9
|
+
*
|
|
10
|
+
* @param fn - Callback invoked once after the component mounts.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { useMounted } from '@pastweb/vue';
|
|
15
|
+
*
|
|
16
|
+
* useMounted(() => {
|
|
17
|
+
* inputRef.value?.focus();
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function useMounted(fn: () => void | Promise<void>): void;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { useMounted };
|
|
24
|
+
//# sourceMappingURL=useMounted.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { onMounted } from "vue";
|
|
2
|
+
//#region src/useMounted/useMounted.ts
|
|
3
|
+
/**
|
|
4
|
+
* Registers a callback with Vue's `onMounted` lifecycle hook.
|
|
5
|
+
*
|
|
6
|
+
* Use it for work that requires the component to be mounted, such as reading
|
|
7
|
+
* DOM refs, installing browser-only listeners, or starting client-side effects.
|
|
8
|
+
* Async callbacks are accepted, but Vue does not use the returned promise as a
|
|
9
|
+
* cleanup function.
|
|
10
|
+
*
|
|
11
|
+
* @param fn - Callback invoked once after the component mounts.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { useMounted } from '@pastweb/vue';
|
|
16
|
+
*
|
|
17
|
+
* useMounted(() => {
|
|
18
|
+
* inputRef.value?.focus();
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function useMounted(fn) {
|
|
23
|
+
onMounted(fn);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useMounted };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=useMounted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMounted.js","names":[],"sources":["../../src/useMounted/useMounted.ts"],"sourcesContent":["import { onMounted } from 'vue';\n\n/**\n * Registers a callback with Vue's `onMounted` lifecycle hook.\n *\n * Use it for work that requires the component to be mounted, such as reading\n * DOM refs, installing browser-only listeners, or starting client-side effects.\n * Async callbacks are accepted, but Vue does not use the returned promise as a\n * cleanup function.\n *\n * @param fn - Callback invoked once after the component mounts.\n *\n * @example\n * ```ts\n * import { useMounted } from '@pastweb/vue';\n *\n * useMounted(() => {\n * inputRef.value?.focus();\n * });\n * ```\n */\nexport function useMounted(fn: () => void | Promise<void>): void {\n onMounted(fn);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,WAAW,IAAsC;CAC/D,UAAU,EAAE;AACd"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
//#region src/useRef/useRef.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.
|
|
6
|
+
*
|
|
7
|
+
* The returned value is a normal Vue ref, so consumers read and write through
|
|
8
|
+
* `.value`. Because it is shallow, assigning a new value is reactive, while
|
|
9
|
+
* nested object mutation is not deeply tracked by this helper.
|
|
10
|
+
*
|
|
11
|
+
* @param value - Optional initial ref value.
|
|
12
|
+
* @returns Vue shallow ref containing the initial value.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { useRef } from '@pastweb/vue';
|
|
17
|
+
*
|
|
18
|
+
* const element = useRef<HTMLElement | null>(null);
|
|
19
|
+
* element.value?.focus();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function useRef(value) {
|
|
23
|
+
return (0, vue.shallowRef)(value);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.useRef = useRef;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=useRef.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRef.cjs","names":[],"sources":["../../src/useRef/useRef.ts"],"sourcesContent":["import { shallowRef, type Ref } from 'vue';\n\n/**\n * Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.\n *\n * The returned value is a normal Vue ref, so consumers read and write through\n * `.value`. Because it is shallow, assigning a new value is reactive, while\n * nested object mutation is not deeply tracked by this helper.\n *\n * @param value - Optional initial ref value.\n * @returns Vue shallow ref containing the initial value.\n *\n * @example\n * ```ts\n * import { useRef } from '@pastweb/vue';\n *\n * const element = useRef<HTMLElement | null>(null);\n * element.value?.focus();\n * ```\n */\nexport function useRef<T>(value?: T): Ref<T | undefined> {\n return shallowRef(value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,OAAU,OAA+B;CACvD,QAAA,GAAA,IAAA,WAAA,CAAkB,KAAK;AACzB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/useRef/useRef.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.
|
|
6
|
+
*
|
|
7
|
+
* The returned value is a normal Vue ref, so consumers read and write through
|
|
8
|
+
* `.value`. Because it is shallow, assigning a new value is reactive, while
|
|
9
|
+
* nested object mutation is not deeply tracked by this helper.
|
|
10
|
+
*
|
|
11
|
+
* @param value - Optional initial ref value.
|
|
12
|
+
* @returns Vue shallow ref containing the initial value.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { useRef } from '@pastweb/vue';
|
|
17
|
+
*
|
|
18
|
+
* const element = useRef<HTMLElement | null>(null);
|
|
19
|
+
* element.value?.focus();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function useRef<T>(value?: T): Ref<T | undefined>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { useRef };
|
|
25
|
+
//# sourceMappingURL=useRef.d.cts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/useRef/useRef.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.
|
|
6
|
+
*
|
|
7
|
+
* The returned value is a normal Vue ref, so consumers read and write through
|
|
8
|
+
* `.value`. Because it is shallow, assigning a new value is reactive, while
|
|
9
|
+
* nested object mutation is not deeply tracked by this helper.
|
|
10
|
+
*
|
|
11
|
+
* @param value - Optional initial ref value.
|
|
12
|
+
* @returns Vue shallow ref containing the initial value.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { useRef } from '@pastweb/vue';
|
|
17
|
+
*
|
|
18
|
+
* const element = useRef<HTMLElement | null>(null);
|
|
19
|
+
* element.value?.focus();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function useRef<T>(value?: T): Ref<T | undefined>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { useRef };
|
|
25
|
+
//# sourceMappingURL=useRef.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { shallowRef } from "vue";
|
|
2
|
+
//#region src/useRef/useRef.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.
|
|
5
|
+
*
|
|
6
|
+
* The returned value is a normal Vue ref, so consumers read and write through
|
|
7
|
+
* `.value`. Because it is shallow, assigning a new value is reactive, while
|
|
8
|
+
* nested object mutation is not deeply tracked by this helper.
|
|
9
|
+
*
|
|
10
|
+
* @param value - Optional initial ref value.
|
|
11
|
+
* @returns Vue shallow ref containing the initial value.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { useRef } from '@pastweb/vue';
|
|
16
|
+
*
|
|
17
|
+
* const element = useRef<HTMLElement | null>(null);
|
|
18
|
+
* element.value?.focus();
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function useRef(value) {
|
|
22
|
+
return shallowRef(value);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { useRef };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=useRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRef.js","names":[],"sources":["../../src/useRef/useRef.ts"],"sourcesContent":["import { shallowRef, type Ref } from 'vue';\n\n/**\n * Creates a Vue `shallowRef` with Pastweb's cross-framework ref naming.\n *\n * The returned value is a normal Vue ref, so consumers read and write through\n * `.value`. Because it is shallow, assigning a new value is reactive, while\n * nested object mutation is not deeply tracked by this helper.\n *\n * @param value - Optional initial ref value.\n * @returns Vue shallow ref containing the initial value.\n *\n * @example\n * ```ts\n * import { useRef } from '@pastweb/vue';\n *\n * const element = useRef<HTMLElement | null>(null);\n * element.value?.focus();\n * ```\n */\nexport function useRef<T>(value?: T): Ref<T | undefined> {\n return shallowRef(value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,OAAU,OAA+B;CACvD,OAAO,WAAW,KAAK;AACzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/withDefaultProps/constants.ts
|
|
3
|
+
const OPTIONS = {
|
|
4
|
+
booleanChars: ["+", "-"],
|
|
5
|
+
className: true
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.OPTIONS = OPTIONS;
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","names":[],"sources":["../../src/withDefaultProps/constants.ts"],"sourcesContent":["export const OPTIONS = {\n booleanChars: ['+', '-'],\n className: true,\n};\n"],"mappings":";;AAAA,MAAa,UAAU;CACrB,cAAc,CAAC,KAAK,GAAG;CACvB,WAAW;AACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../src/withDefaultProps/constants.ts"],"sourcesContent":["export const OPTIONS = {\n booleanChars: ['+', '-'],\n className: true,\n};\n"],"mappings":";AAAA,MAAa,UAAU;CACrB,cAAc,CAAC,KAAK,GAAG;CACvB,WAAW;AACb"}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/withDefaultProps/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Options controlling Vue prop default normalization.
|
|
4
|
+
*/
|
|
5
|
+
interface WithDefaultPropsOptions {
|
|
6
|
+
/**
|
|
7
|
+
* String pair converted to boolean `true` and `false`.
|
|
8
|
+
*
|
|
9
|
+
* Useful because Vue coerces absent Boolean props to `false`, so string
|
|
10
|
+
* markers preserve the difference between "unset" and "explicit false" until
|
|
11
|
+
* defaults have been applied. Defaults to `['+', '-']`.
|
|
12
|
+
*/
|
|
13
|
+
booleanChars?: [string, string];
|
|
14
|
+
/** When true, maps a default key named `className` to Vue's `class` prop. */
|
|
15
|
+
className?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Keys to exclude from default merging.
|
|
18
|
+
* Can be a string, RegExp, or array of both.
|
|
19
|
+
* Applied to the original key name from the `defaults` object.
|
|
20
|
+
*/
|
|
21
|
+
exclude?: string | RegExp | Array<string | RegExp>;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { WithDefaultPropsOptions };
|
|
25
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/withDefaultProps/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Options controlling Vue prop default normalization.
|
|
4
|
+
*/
|
|
5
|
+
interface WithDefaultPropsOptions {
|
|
6
|
+
/**
|
|
7
|
+
* String pair converted to boolean `true` and `false`.
|
|
8
|
+
*
|
|
9
|
+
* Useful because Vue coerces absent Boolean props to `false`, so string
|
|
10
|
+
* markers preserve the difference between "unset" and "explicit false" until
|
|
11
|
+
* defaults have been applied. Defaults to `['+', '-']`.
|
|
12
|
+
*/
|
|
13
|
+
booleanChars?: [string, string];
|
|
14
|
+
/** When true, maps a default key named `className` to Vue's `class` prop. */
|
|
15
|
+
className?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Keys to exclude from default merging.
|
|
18
|
+
* Can be a string, RegExp, or array of both.
|
|
19
|
+
* Applied to the original key name from the `defaults` object.
|
|
20
|
+
*/
|
|
21
|
+
exclude?: string | RegExp | Array<string | RegExp>;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { WithDefaultPropsOptions };
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_withDefaultProps_constants = require("./constants.cjs");
|
|
3
|
+
let vue = require("vue");
|
|
4
|
+
let _pastweb_tools_update = require("@pastweb/tools/update");
|
|
5
|
+
//#region src/withDefaultProps/withDefaultProps.ts
|
|
6
|
+
/**
|
|
7
|
+
* Merges Vue props with defaults and returns a reactive normalized object.
|
|
8
|
+
*
|
|
9
|
+
* Defaults are used only when the incoming prop value is `undefined`. Explicit
|
|
10
|
+
* falsy values such as `false`, `0`, and `''` are preserved. The returned object
|
|
11
|
+
* is updated whenever the source props change.
|
|
12
|
+
*
|
|
13
|
+
* Vue coerces absent Boolean props to `false` at runtime, which makes it
|
|
14
|
+
* impossible for this helper to distinguish "not provided" from "explicitly
|
|
15
|
+
* false" when a prop is declared as Boolean. The `booleanChars` option exists
|
|
16
|
+
* for that case: expose the prop as a string union such as `'+' | '-'`, then let
|
|
17
|
+
* this helper normalize those characters back to booleans after defaults are
|
|
18
|
+
* applied. By default, `+` becomes `true` and `-` becomes `false`.
|
|
19
|
+
*
|
|
20
|
+
* A default key named `className` is also exposed as Vue's `class` prop by
|
|
21
|
+
* default.
|
|
22
|
+
*
|
|
23
|
+
* @typeParam T - Resulting props type.
|
|
24
|
+
* @param props - Source Vue props object.
|
|
25
|
+
* @param defaults - Defaults applied when a prop is `undefined`.
|
|
26
|
+
* @param options - Normalization options.
|
|
27
|
+
* @returns Reactive props object containing source props plus defaults.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const props = withDefaultProps(
|
|
32
|
+
* defineProps<{ tone?: string; block?: '+' | '-' }>(),
|
|
33
|
+
* { tone: 'neutral', block: '-' },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // With exclusions
|
|
40
|
+
* const props = withDefaultProps(
|
|
41
|
+
* defineProps<...>(),
|
|
42
|
+
* { tone: 'neutral', internalFlag: true, debug: false },
|
|
43
|
+
* { exclude: ['debug', /^internal/] }
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
function withDefaultProps(props, defaults, options) {
|
|
48
|
+
const opts = {
|
|
49
|
+
...require_withDefaultProps_constants.OPTIONS,
|
|
50
|
+
...options
|
|
51
|
+
};
|
|
52
|
+
const { booleanChars: [trueChar, falseChar] } = opts;
|
|
53
|
+
const excludes = Array.isArray(opts.exclude) ? opts.exclude : [opts.exclude];
|
|
54
|
+
const newProps = (0, vue.shallowReactive)({});
|
|
55
|
+
const shouldExclude = (key) => {
|
|
56
|
+
if (!opts.exclude) return false;
|
|
57
|
+
return excludes.some((rule) => {
|
|
58
|
+
if (typeof rule === "string") return key === rule;
|
|
59
|
+
if (rule instanceof RegExp) return rule.test(key);
|
|
60
|
+
return false;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
(0, vue.watchEffect)(() => {
|
|
64
|
+
const merged = { ...props };
|
|
65
|
+
Object.entries(defaults).forEach(([key, defValue]) => {
|
|
66
|
+
if (shouldExclude(key)) {
|
|
67
|
+
if (props[key] !== void 0) merged[opts.className && key === "className" ? "class" : key] = props[key];
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const value = props[key] !== void 0 ? props[key] : defValue;
|
|
71
|
+
if (typeof value === "string" && (value === trueChar || value === falseChar)) {
|
|
72
|
+
merged[key] = value === trueChar ? true : value === falseChar ? false : defValue;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const targetKey = opts.className && key === "className" ? "class" : key;
|
|
76
|
+
merged[targetKey] = value;
|
|
77
|
+
});
|
|
78
|
+
(0, _pastweb_tools_update.update)(newProps, merged);
|
|
79
|
+
});
|
|
80
|
+
return newProps;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.withDefaultProps = withDefaultProps;
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=withDefaultProps.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withDefaultProps.cjs","names":["OPTIONS"],"sources":["../../src/withDefaultProps/withDefaultProps.ts"],"sourcesContent":["import { shallowReactive, watchEffect } from 'vue';\nimport { update } from '@pastweb/tools/update';\nimport { OPTIONS } from './constants';\nimport type { WithDefaultPropsOptions } from './types';\n\n/**\n * Merges Vue props with defaults and returns a reactive normalized object.\n *\n * Defaults are used only when the incoming prop value is `undefined`. Explicit\n * falsy values such as `false`, `0`, and `''` are preserved. The returned object\n * is updated whenever the source props change.\n *\n * Vue coerces absent Boolean props to `false` at runtime, which makes it\n * impossible for this helper to distinguish \"not provided\" from \"explicitly\n * false\" when a prop is declared as Boolean. The `booleanChars` option exists\n * for that case: expose the prop as a string union such as `'+' | '-'`, then let\n * this helper normalize those characters back to booleans after defaults are\n * applied. By default, `+` becomes `true` and `-` becomes `false`.\n *\n * A default key named `className` is also exposed as Vue's `class` prop by\n * default.\n *\n * @typeParam T - Resulting props type.\n * @param props - Source Vue props object.\n * @param defaults - Defaults applied when a prop is `undefined`.\n * @param options - Normalization options.\n * @returns Reactive props object containing source props plus defaults.\n *\n * @example\n * ```ts\n * const props = withDefaultProps(\n * defineProps<{ tone?: string; block?: '+' | '-' }>(),\n * { tone: 'neutral', block: '-' },\n * );\n * ```\n *\n * @example\n * ```ts\n * // With exclusions\n * const props = withDefaultProps(\n * defineProps<...>(),\n * { tone: 'neutral', internalFlag: true, debug: false },\n * { exclude: ['debug', /^internal/] }\n * );\n * ```\n */\nexport function withDefaultProps<T>(props: Record<string, any>, defaults: Record<string, any>, options?: WithDefaultPropsOptions): T {\n const opts = { ...OPTIONS, ...options };\n const { booleanChars: [trueChar, falseChar] } = opts;\n const excludes = Array.isArray(opts.exclude) ? opts.exclude : [opts.exclude];\n const newProps = shallowReactive<Record<string, any>>({});\n\n const shouldExclude = (key: string): boolean => {\n if (!opts.exclude) return false;\n\n return excludes.some((rule) => {\n if (typeof rule === 'string') {\n return key === rule;\n }\n if (rule instanceof RegExp) {\n return rule.test(key);\n }\n return false;\n });\n };\n\n watchEffect(() => {\n const merged: Record<string, any> = { ...props };\n\n Object.entries(defaults).forEach(([key, defValue]) => {\n if (shouldExclude(key)) {\n // Still copy the original prop if it exists, but don't apply default\n if (props[key] !== undefined) {\n merged[opts.className && key === 'className' ? 'class' : key] = props[key];\n }\n return;\n }\n\n const value = props[key] !== undefined ? props[key] : defValue;\n\n // Boolean char normalization\n if (typeof value === 'string' && (value === trueChar || value === falseChar)) {\n merged[key] = value === trueChar ? true : value === falseChar ? false : defValue;\n return;\n }\n\n // className special handling\n const targetKey = opts.className && key === 'className' ? 'class' : key;\n merged[targetKey] = value;\n });\n\n update(newProps, merged);\n });\n\n return newProps as T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,iBAAoB,OAA4B,UAA+B,SAAsC;CACnI,MAAM,OAAO;EAAE,GAAGA,mCAAAA;EAAS,GAAG;CAAQ;CACtC,MAAM,EAAE,cAAc,CAAC,UAAU,eAAe;CAChD,MAAM,WAAW,MAAM,QAAQ,KAAK,OAAO,IAAI,KAAK,UAAU,CAAC,KAAK,OAAO;CAC3E,MAAM,YAAA,GAAA,IAAA,gBAAA,CAAgD,CAAC,CAAC;CAExD,MAAM,iBAAiB,QAAyB;EAC9C,IAAI,CAAC,KAAK,SAAS,OAAO;EAE1B,OAAO,SAAS,MAAM,SAAS;GAC7B,IAAI,OAAO,SAAS,UAClB,OAAO,QAAQ;GAEjB,IAAI,gBAAgB,QAClB,OAAO,KAAK,KAAK,GAAG;GAEtB,OAAO;EACT,CAAC;CACH;CAEA,CAAA,GAAA,IAAA,YAAA,OAAkB;EAChB,MAAM,SAA8B,EAAE,GAAG,MAAM;EAE/C,OAAO,QAAQ,QAAQ,CAAC,CAAC,SAAS,CAAC,KAAK,cAAc;GACpD,IAAI,cAAc,GAAG,GAAG;IAEtB,IAAI,MAAM,SAAS,KAAA,GACjB,OAAO,KAAK,aAAa,QAAQ,cAAc,UAAU,OAAO,MAAM;IAExE;GACF;GAEA,MAAM,QAAQ,MAAM,SAAS,KAAA,IAAY,MAAM,OAAO;GAGtD,IAAI,OAAO,UAAU,aAAa,UAAU,YAAY,UAAU,YAAY;IAC5E,OAAO,OAAO,UAAU,WAAW,OAAO,UAAU,YAAY,QAAQ;IACxE;GACF;GAGA,MAAM,YAAY,KAAK,aAAa,QAAQ,cAAc,UAAU;GACpE,OAAO,aAAa;EACtB,CAAC;EAED,CAAA,GAAA,sBAAA,OAAA,CAAO,UAAU,MAAM;CACzB,CAAC;CAED,OAAO;AACT"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { WithDefaultPropsOptions } from "./types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/withDefaultProps/withDefaultProps.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Merges Vue props with defaults and returns a reactive normalized object.
|
|
6
|
+
*
|
|
7
|
+
* Defaults are used only when the incoming prop value is `undefined`. Explicit
|
|
8
|
+
* falsy values such as `false`, `0`, and `''` are preserved. The returned object
|
|
9
|
+
* is updated whenever the source props change.
|
|
10
|
+
*
|
|
11
|
+
* Vue coerces absent Boolean props to `false` at runtime, which makes it
|
|
12
|
+
* impossible for this helper to distinguish "not provided" from "explicitly
|
|
13
|
+
* false" when a prop is declared as Boolean. The `booleanChars` option exists
|
|
14
|
+
* for that case: expose the prop as a string union such as `'+' | '-'`, then let
|
|
15
|
+
* this helper normalize those characters back to booleans after defaults are
|
|
16
|
+
* applied. By default, `+` becomes `true` and `-` becomes `false`.
|
|
17
|
+
*
|
|
18
|
+
* A default key named `className` is also exposed as Vue's `class` prop by
|
|
19
|
+
* default.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam T - Resulting props type.
|
|
22
|
+
* @param props - Source Vue props object.
|
|
23
|
+
* @param defaults - Defaults applied when a prop is `undefined`.
|
|
24
|
+
* @param options - Normalization options.
|
|
25
|
+
* @returns Reactive props object containing source props plus defaults.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const props = withDefaultProps(
|
|
30
|
+
* defineProps<{ tone?: string; block?: '+' | '-' }>(),
|
|
31
|
+
* { tone: 'neutral', block: '-' },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // With exclusions
|
|
38
|
+
* const props = withDefaultProps(
|
|
39
|
+
* defineProps<...>(),
|
|
40
|
+
* { tone: 'neutral', internalFlag: true, debug: false },
|
|
41
|
+
* { exclude: ['debug', /^internal/] }
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function withDefaultProps<T>(props: Record<string, any>, defaults: Record<string, any>, options?: WithDefaultPropsOptions): T;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { withDefaultProps };
|
|
48
|
+
//# sourceMappingURL=withDefaultProps.d.cts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { WithDefaultPropsOptions } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/withDefaultProps/withDefaultProps.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Merges Vue props with defaults and returns a reactive normalized object.
|
|
6
|
+
*
|
|
7
|
+
* Defaults are used only when the incoming prop value is `undefined`. Explicit
|
|
8
|
+
* falsy values such as `false`, `0`, and `''` are preserved. The returned object
|
|
9
|
+
* is updated whenever the source props change.
|
|
10
|
+
*
|
|
11
|
+
* Vue coerces absent Boolean props to `false` at runtime, which makes it
|
|
12
|
+
* impossible for this helper to distinguish "not provided" from "explicitly
|
|
13
|
+
* false" when a prop is declared as Boolean. The `booleanChars` option exists
|
|
14
|
+
* for that case: expose the prop as a string union such as `'+' | '-'`, then let
|
|
15
|
+
* this helper normalize those characters back to booleans after defaults are
|
|
16
|
+
* applied. By default, `+` becomes `true` and `-` becomes `false`.
|
|
17
|
+
*
|
|
18
|
+
* A default key named `className` is also exposed as Vue's `class` prop by
|
|
19
|
+
* default.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam T - Resulting props type.
|
|
22
|
+
* @param props - Source Vue props object.
|
|
23
|
+
* @param defaults - Defaults applied when a prop is `undefined`.
|
|
24
|
+
* @param options - Normalization options.
|
|
25
|
+
* @returns Reactive props object containing source props plus defaults.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const props = withDefaultProps(
|
|
30
|
+
* defineProps<{ tone?: string; block?: '+' | '-' }>(),
|
|
31
|
+
* { tone: 'neutral', block: '-' },
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // With exclusions
|
|
38
|
+
* const props = withDefaultProps(
|
|
39
|
+
* defineProps<...>(),
|
|
40
|
+
* { tone: 'neutral', internalFlag: true, debug: false },
|
|
41
|
+
* { exclude: ['debug', /^internal/] }
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
declare function withDefaultProps<T>(props: Record<string, any>, defaults: Record<string, any>, options?: WithDefaultPropsOptions): T;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { withDefaultProps };
|
|
48
|
+
//# sourceMappingURL=withDefaultProps.d.ts.map
|