@sepveneto/plugin-mp-router-view 0.4.3 → 0.5.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/dist/esbuild.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  unpluginFactory
3
- } from "./chunk-SSACLDVN.js";
3
+ } from "./chunk-34IBKFGI.js";
4
+ import "./chunk-M3QQKYK3.js";
4
5
 
5
6
  // src/esbuild.ts
6
7
  import { createEsbuildPlugin } from "unplugin";
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/helper/index.ts
21
+ var helper_exports = {};
22
+ __export(helper_exports, {
23
+ getPageMeta: () => getPageMeta
24
+ });
25
+ module.exports = __toCommonJS(helper_exports);
26
+
27
+ // src/util/constant.ts
28
+ var PAGE_META = "$$__PageMeta";
29
+
30
+ // src/helper/index.ts
31
+ function getPageMeta() {
32
+ var __g = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : (
33
+ // @ts-expect-error: ignore
34
+ typeof global !== "undefined" ? global : Function("return this")()
35
+ );
36
+ const meta = __g[Symbol.for(PAGE_META)];
37
+ if (!meta) {
38
+ throw new Error("[RouterView]: Page meta not found, maybe you forget to inject page meta?");
39
+ }
40
+ return meta;
41
+ }
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ getPageMeta
45
+ });
@@ -0,0 +1,5 @@
1
+ import { Page } from '../type.d.js';
2
+
3
+ declare function getPageMeta(): Page;
4
+
5
+ export { getPageMeta };
@@ -0,0 +1,19 @@
1
+ import {
2
+ PAGE_META
3
+ } from "../chunk-M3QQKYK3.js";
4
+
5
+ // src/helper/index.ts
6
+ function getPageMeta() {
7
+ var __g = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : (
8
+ // @ts-expect-error: ignore
9
+ typeof global !== "undefined" ? global : Function("return this")()
10
+ );
11
+ const meta = __g[Symbol.for(PAGE_META)];
12
+ if (!meta) {
13
+ throw new Error("[RouterView]: Page meta not found, maybe you forget to inject page meta?");
14
+ }
15
+ return meta;
16
+ }
17
+ export {
18
+ getPageMeta
19
+ };