@vrowzer/vite-plugin 0.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.
Files changed (39) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +290 -0
  3. package/dist/ide/assets/css.worker-uWEFNxvl.js +89 -0
  4. package/dist/ide/assets/html.worker-1tLoAl5Z.js +502 -0
  5. package/dist/ide/assets/json.worker-CL3sVQd6.js +58 -0
  6. package/dist/ide/assets/ts.worker-BFpNHPy5.js +67719 -0
  7. package/dist/ide/css-CPSW8DVZ.js +286 -0
  8. package/dist/ide/cssMode-B5DtFEwy.js +65 -0
  9. package/dist/ide/graphql-BteLL2CG.js +176 -0
  10. package/dist/ide/handlebars-BcqMM6pa.js +412 -0
  11. package/dist/ide/html-CxO5OaJl.js +333 -0
  12. package/dist/ide/htmlMode-DxpUG2jm.js +74 -0
  13. package/dist/ide/ide.css +2 -0
  14. package/dist/ide/ide.js +5523 -0
  15. package/dist/ide/javascript-CvtLx4_Z.js +21 -0
  16. package/dist/ide/jsonMode-LVtiYWKr.js +449 -0
  17. package/dist/ide/less-BubkcFWW.js +244 -0
  18. package/dist/ide/lspLanguageFeatures-BDyekQt2.js +1455 -0
  19. package/dist/ide/markdown-DPB5N4OB.js +264 -0
  20. package/dist/ide/mdx-Sun87_nd.js +329 -0
  21. package/dist/ide/monaco.contribution-DVj8eGe_.js +116 -0
  22. package/dist/ide/pug-BONHZNEg.js +302 -0
  23. package/dist/ide/scss-0r6NeK1P.js +419 -0
  24. package/dist/ide/shell-Vh_eZpea.js +225 -0
  25. package/dist/ide/toggleHighContrast-DI4ZeqFk.js +113328 -0
  26. package/dist/ide/tsMode-BKTkt1bt.js +567 -0
  27. package/dist/ide/typescript-CHC4VYBW.js +257 -0
  28. package/dist/ide/workers-IG_hD8Jy.js +47 -0
  29. package/dist/ide/xml-C0QFzMaz.js +130 -0
  30. package/dist/ide/yaml-o-RP7lYY.js +223 -0
  31. package/dist/index.d.mts +138 -0
  32. package/dist/index.d.mts.map +1 -0
  33. package/dist/index.mjs +1335 -0
  34. package/dist/index.mjs.map +1 -0
  35. package/dist/manifest-generate.d.mts +89 -0
  36. package/dist/manifest-generate.d.mts.map +1 -0
  37. package/dist/manifest-generate.mjs +438 -0
  38. package/dist/manifest-generate.mjs.map +1 -0
  39. package/package.json +88 -0
@@ -0,0 +1,138 @@
1
+ import { GenerateManifestLog, GenerateManifestOptions, ManifestResult, generateManifest } from "./manifest-generate.mjs";
2
+ import { Plugin } from "vite";
3
+
4
+ //#region src/options.d.ts
5
+
6
+ /**
7
+ * vite-plugin-vrowzer options
8
+ *
9
+ * @module options
10
+ */
11
+ interface Alias {
12
+ find: string | RegExp;
13
+ replacement: string;
14
+ }
15
+ interface VrowzerManifestOptions {
16
+ /**
17
+ * Directory to scan for project source files (index.html, src/, public/).
18
+ * When the host page and preview content are in different directories,
19
+ * set this to the preview content directory.
20
+ *
21
+ * Resolved relative to Vite's project root.
22
+ *
23
+ * @default Vite project root
24
+ */
25
+ sourceDir?: string;
26
+ /**
27
+ * Package directory for node_modules resolution.
28
+ * Defaults to sourceDir.
29
+ */
30
+ pkgDir?: string;
31
+ /**
32
+ * Package name(s) to include in nodeModules.
33
+ * When specified, only these packages (+ their transitive deps) are included.
34
+ * When omitted, all dependencies are included.
35
+ */
36
+ targets?: string[];
37
+ }
38
+ interface VrowzerIdeOptions {
39
+ /**
40
+ * Port for the birpc WebSocket server.
41
+ * @default auto (find available port)
42
+ */
43
+ port?: number;
44
+ }
45
+ interface VrowzerExperimentalOptions {
46
+ /**
47
+ * Enable browser IDE at `/__vrowzer__/`.
48
+ *
49
+ * When `true` or an options object, the plugin serves a browser-based IDE
50
+ * with Monaco Editor, File Explorer, and Preview at `/__vrowzer__/`.
51
+ *
52
+ * @default false (disabled)
53
+ */
54
+ ide?: boolean | VrowzerIdeOptions;
55
+ /**
56
+ * Enable Vite DevTools panel in IDE.
57
+ *
58
+ * Requires `@vitejs/devtools` to be installed and configured
59
+ * in `vite.config.ts` (with injection plugin excluded).
60
+ *
61
+ * @default false
62
+ */
63
+ devtools?: boolean;
64
+ }
65
+ interface VrowzerOptions {
66
+ /**
67
+ * Enable auto-generation of vrowzer manifest.
68
+ *
69
+ * When `true` (default), the plugin automatically generates the manifest from
70
+ * the project's package.json dependencies in `configResolved`. The manifest is
71
+ * cached in `node_modules/.vrowzer-manifest/` and provided via the
72
+ * `virtual:vrowzer-manifest` virtual module.
73
+ *
74
+ * When `false`, use `VrowzerManifest()` plugin with a manually created
75
+ * `vrowzer-manifest.json` file (e.g. via `gen:manifest`).
76
+ *
77
+ * @default true
78
+ */
79
+ auto?: boolean;
80
+ /**
81
+ * Auto manifest generation options (used when auto: true).
82
+ */
83
+ manifest?: VrowzerManifestOptions;
84
+ /**
85
+ * The base path for the preview system location, which is used to serve the preview files via service worker of Vrowzer.
86
+ *
87
+ * @default '/__preview__/'
88
+ */
89
+ basePath?: string;
90
+ /**
91
+ * The scope for the service worker of Vrowzer, which determines the range of URLs that the service worker will control.
92
+ *
93
+ * @default '/' (the entire origin)
94
+ */
95
+ serviceWorkerScope?: string;
96
+ /**
97
+ * The version of the service worker for Vrowzer, which can be used to manage updates and cache invalidation for the preview system.
98
+ *
99
+ * @default 'SERVICE_WORKER_VERSION'
100
+ */
101
+ serviceWorkerVersion?: string;
102
+ /**
103
+ * Explicit Service Worker entry file path.
104
+ * When specified, `unplugin-service-worker` will bundle this file directly
105
+ * instead of scanning source code for `createSvcWorkerController()` calls.
106
+ *
107
+ * This is required when using a library-provided Service Worker (e.g. `vrowzer/service-worker`)
108
+ * that is in `node_modules` and excluded from code scanning.
109
+ *
110
+ * @example 'vrowzer/service-worker'
111
+ * @default Resolved path to 'vrowzer/service-worker' (node_modules/vrowzer/dist/service-worker.ts)
112
+ */
113
+ serviceWorkerEntry?: string;
114
+ /**
115
+ * Worker-specific resolve settings (e.g. vendor aliases).
116
+ * These are NOT added to the host Vite config (which would break host package resolution),
117
+ * but are passed to the Worker's internal Vite dev server.
118
+ *
119
+ * @example { alias: [{ find: 'vue', replacement: '/vendor/vue.js' }] }
120
+ * @default undefined
121
+ */
122
+ resolve?: {
123
+ alias?: Alias[];
124
+ };
125
+ /**
126
+ * Experimental features.
127
+ */
128
+ experimental?: VrowzerExperimentalOptions;
129
+ }
130
+ //#endregion
131
+ //#region src/manifest.d.ts
132
+ declare function VrowzerManifest(): Plugin;
133
+ //#endregion
134
+ //#region src/index.d.ts
135
+ declare function Vrowzer(options?: VrowzerOptions): Plugin[];
136
+ //#endregion
137
+ export { type GenerateManifestLog, type GenerateManifestOptions, type ManifestResult, Vrowzer, VrowzerManifest, generateManifest };
138
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/options.ts","../src/manifest.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAaA;AAKiB,UALA,KAAA,CAKA;EAwBA,IAAA,EAAA,MAAA,GA5BA,MA4BiB;EAQjB,WAAA,EAAA,MAAA;AAqBjB;AAkBa,UAvEI,sBAAA,CAuEJ;EAuCS;;;;;;ACxFtB;;;;ECRgB;;;;;;;;;;;;UFUC,iBAAA;;;;;;;UAQA,0BAAA;;;;;;;;;kBASC;;;;;;;;;;;UAYD,cAAA;;;;;;;;;;;;;;;;;;aAkBJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuCS;;;;;iBAIL;;;;AAA0B,iBC5F3B,eAAA,CAAA,CD4F2B,EC5FR,MD4FQ;;;AAlF1B,iBElBD,OAAA,CFkBC,OASC,CATyB,EElBV,cF2Bf,CAAA,EE3BqC,MF2BpB,EAAA"}