@codepress/codepress-engine 0.9.4-dev.leo-secrets.20260319181139 → 0.9.4-dev.leo-secrets.20260319215954

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.
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Vite plugin for CodePress visual editing
3
+ *
4
+ * Enables the browser extension's preview/HMR pipeline for Vite+React projects.
5
+ * In dev mode, this plugin:
6
+ * 1. Injects bundler detection (window.__CP_BUNDLER__ = 'vite')
7
+ * 2. Registers source module exports in a global map (window.__CP_VITE_MODULES__)
8
+ * 3. Provides a dev server endpoint for the extension to query module info
9
+ *
10
+ * The module registry uses getter-based live bindings so module exports
11
+ * are always up-to-date, even after HMR updates.
12
+ *
13
+ * @example
14
+ * // vite.config.ts
15
+ * import react from '@vitejs/plugin-react';
16
+ * import codepressVitePlugin from '@codepress/codepress-engine/vite-plugin';
17
+ *
18
+ * export default defineConfig({
19
+ * plugins: [
20
+ * react({ babel: { plugins: ['@codepress/codepress-engine'] } }),
21
+ * codepressVitePlugin(),
22
+ * ],
23
+ * });
24
+ */
25
+ interface HtmlTagDescriptor {
26
+ tag: string;
27
+ attrs?: Record<string, string | boolean>;
28
+ children?: string;
29
+ injectTo?: "head" | "body" | "head-prepend" | "body-prepend";
30
+ }
31
+ interface VitePlugin {
32
+ name: string;
33
+ enforce?: "pre" | "post";
34
+ configResolved?: (config: {
35
+ root: string;
36
+ }) => void;
37
+ transformIndexHtml?: () => HtmlTagDescriptor[];
38
+ transform?: (code: string, id: string, options?: {
39
+ ssr?: boolean;
40
+ }) => {
41
+ code: string;
42
+ map: null;
43
+ } | undefined;
44
+ configureServer?: (server: {
45
+ middlewares: {
46
+ use: (path: string, handler: (req: unknown, res: ServerResponse) => void) => void;
47
+ };
48
+ }) => void;
49
+ }
50
+ interface ServerResponse {
51
+ setHeader: (key: string, value: string) => void;
52
+ end: (body: string) => void;
53
+ }
54
+ export interface ExportBinding {
55
+ localName: string;
56
+ exportedName: string;
57
+ }
58
+ /**
59
+ * Parse export declarations from source code.
60
+ * Returns the local binding name and exported name for each export.
61
+ *
62
+ * Handles:
63
+ * - export function Foo()
64
+ * - export async function Foo()
65
+ * - export class Foo
66
+ * - export const/let/var Foo
67
+ * - export default function Foo()
68
+ * - export default class Foo
69
+ * - export { Foo, Bar } (local scope only, not re-exports)
70
+ * - export { Foo as Bar }
71
+ * - export default Identifier (simple identifier, not a call or member expression)
72
+ *
73
+ * Does NOT handle:
74
+ * - Anonymous default exports (export default () => ...)
75
+ * - Wrapped default exports (export default memo(...), export default forwardRef(...))
76
+ * - Re-exports (export { Foo } from './other')
77
+ * - export * from './other'
78
+ * - Destructured exports (export const { a, b } = ...)
79
+ *
80
+ * Note: This plugin runs with enforce:'post', so comments are already stripped
81
+ * by Babel before our transform sees the code. String false positives are
82
+ * theoretically possible but extremely rare in practice.
83
+ */
84
+ export declare function parseExports(code: string): ExportBinding[];
85
+ /**
86
+ * Generate a registration IIFE that captures module exports in
87
+ * window.__CP_VITE_MODULES__ using getter-based live bindings.
88
+ *
89
+ * The getters reference local variable bindings from the module scope,
90
+ * which means they always return the current value (important for HMR).
91
+ */
92
+ export declare function buildRegistrationCode(relativePath: string, bindings: ExportBinding[]): string;
93
+ /**
94
+ * Create the CodePress Vite plugin.
95
+ *
96
+ * This plugin runs with `enforce: 'post'` so it executes after
97
+ * @vitejs/plugin-react (which runs the Babel instrumentation plugin
98
+ * and adds React Fast Refresh). By the time our transform runs,
99
+ * codepress-data-fp attributes are already injected and the export
100
+ * structure is finalized.
101
+ */
102
+ export default function codepressVitePlugin(): VitePlugin;
103
+ export { codepressVitePlugin as CodePressVitePlugin };
@@ -0,0 +1,221 @@
1
+ "use strict";
2
+ /**
3
+ * Vite plugin for CodePress visual editing
4
+ *
5
+ * Enables the browser extension's preview/HMR pipeline for Vite+React projects.
6
+ * In dev mode, this plugin:
7
+ * 1. Injects bundler detection (window.__CP_BUNDLER__ = 'vite')
8
+ * 2. Registers source module exports in a global map (window.__CP_VITE_MODULES__)
9
+ * 3. Provides a dev server endpoint for the extension to query module info
10
+ *
11
+ * The module registry uses getter-based live bindings so module exports
12
+ * are always up-to-date, even after HMR updates.
13
+ *
14
+ * @example
15
+ * // vite.config.ts
16
+ * import react from '@vitejs/plugin-react';
17
+ * import codepressVitePlugin from '@codepress/codepress-engine/vite-plugin';
18
+ *
19
+ * export default defineConfig({
20
+ * plugins: [
21
+ * react({ babel: { plugins: ['@codepress/codepress-engine'] } }),
22
+ * codepressVitePlugin(),
23
+ * ],
24
+ * });
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.parseExports = parseExports;
28
+ exports.buildRegistrationCode = buildRegistrationCode;
29
+ exports.default = codepressVitePlugin;
30
+ exports.CodePressVitePlugin = codepressVitePlugin;
31
+ /**
32
+ * Parse export declarations from source code.
33
+ * Returns the local binding name and exported name for each export.
34
+ *
35
+ * Handles:
36
+ * - export function Foo()
37
+ * - export async function Foo()
38
+ * - export class Foo
39
+ * - export const/let/var Foo
40
+ * - export default function Foo()
41
+ * - export default class Foo
42
+ * - export { Foo, Bar } (local scope only, not re-exports)
43
+ * - export { Foo as Bar }
44
+ * - export default Identifier (simple identifier, not a call or member expression)
45
+ *
46
+ * Does NOT handle:
47
+ * - Anonymous default exports (export default () => ...)
48
+ * - Wrapped default exports (export default memo(...), export default forwardRef(...))
49
+ * - Re-exports (export { Foo } from './other')
50
+ * - export * from './other'
51
+ * - Destructured exports (export const { a, b } = ...)
52
+ *
53
+ * Note: This plugin runs with enforce:'post', so comments are already stripped
54
+ * by Babel before our transform sees the code. String false positives are
55
+ * theoretically possible but extremely rare in practice.
56
+ */
57
+ function parseExports(code) {
58
+ const seen = new Set();
59
+ const positioned = [];
60
+ function add(pos, localName, exportedName) {
61
+ if (seen.has(exportedName))
62
+ return;
63
+ seen.add(exportedName);
64
+ positioned.push({ pos, localName, exportedName });
65
+ }
66
+ // export default function Foo() / export default async function Foo()
67
+ // export default class Foo
68
+ for (const m of code.matchAll(/export\s+default\s+(?:async\s+)?(?:function|class)\s+(\w+)/g)) {
69
+ add(m.index, m[1], "default");
70
+ }
71
+ // export default Identifier (not a function/class declaration, not a call or member access)
72
+ // Matches: export default Hero; export default Component;
73
+ // Skips: export default memo(...); export default React.memo(...); export default 42;
74
+ // The \b after \w* prevents backtracking from matching a partial identifier.
75
+ for (const m of code.matchAll(/export\s+default\s+(?!function\b|class\b|async\b|new\b)([a-zA-Z_$]\w*)\b(?!\s*[.(])/g)) {
76
+ add(m.index, m[1], "default");
77
+ }
78
+ // export function Foo() (excludes "export default function")
79
+ for (const m of code.matchAll(/export\s+(?!default\b)(?:async\s+)?function\s+(\w+)/g)) {
80
+ add(m.index, m[1], m[1]);
81
+ }
82
+ // export class Foo (excludes "export default class")
83
+ for (const m of code.matchAll(/export\s+(?!default\b)class\s+(\w+)/g)) {
84
+ add(m.index, m[1], m[1]);
85
+ }
86
+ // export const/let/var Foo
87
+ for (const m of code.matchAll(/export\s+(?:const|let|var)\s+(\w+)/g)) {
88
+ add(m.index, m[1], m[1]);
89
+ }
90
+ // export { Foo, Bar } — but NOT export { Foo } from './other'
91
+ for (const m of code.matchAll(/export\s*\{([^}]+)\}(?!\s*from)/g)) {
92
+ const inner = m[1];
93
+ for (const binding of inner.split(",")) {
94
+ const trimmed = binding.trim();
95
+ // export { local as exported }
96
+ const asMatch = trimmed.match(/^(\w+)\s+as\s+(\w+)$/);
97
+ if (asMatch) {
98
+ add(m.index, asMatch[1], asMatch[2]);
99
+ }
100
+ else if (/^\w+$/.test(trimmed)) {
101
+ add(m.index, trimmed, trimmed);
102
+ }
103
+ }
104
+ }
105
+ // Sort by source position for predictable output
106
+ positioned.sort((a, b) => a.pos - b.pos);
107
+ return positioned.map(({ localName, exportedName }) => ({
108
+ localName,
109
+ exportedName,
110
+ }));
111
+ }
112
+ /**
113
+ * Generate a registration IIFE that captures module exports in
114
+ * window.__CP_VITE_MODULES__ using getter-based live bindings.
115
+ *
116
+ * The getters reference local variable bindings from the module scope,
117
+ * which means they always return the current value (important for HMR).
118
+ */
119
+ function buildRegistrationCode(relativePath, bindings) {
120
+ if (bindings.length === 0)
121
+ return "";
122
+ const getters = bindings
123
+ .map((e) => ` get ${JSON.stringify(e.exportedName)}() { return ${e.localName}; }`)
124
+ .join(",\n");
125
+ return [
126
+ "",
127
+ ";(function() {",
128
+ ' if (typeof window === "undefined" || !window.__CP_VITE_MODULES__) return;',
129
+ ` window.__CP_VITE_MODULES__[${JSON.stringify(relativePath)}] = {`,
130
+ getters,
131
+ " };",
132
+ "})();",
133
+ ].join("\n");
134
+ }
135
+ /**
136
+ * Create the CodePress Vite plugin.
137
+ *
138
+ * This plugin runs with `enforce: 'post'` so it executes after
139
+ * @vitejs/plugin-react (which runs the Babel instrumentation plugin
140
+ * and adds React Fast Refresh). By the time our transform runs,
141
+ * codepress-data-fp attributes are already injected and the export
142
+ * structure is finalized.
143
+ */
144
+ function codepressVitePlugin() {
145
+ let projectRoot = "";
146
+ const moduleExports = new Map();
147
+ return {
148
+ name: "codepress",
149
+ enforce: "post",
150
+ configResolved(config) {
151
+ projectRoot = config.root;
152
+ },
153
+ transformIndexHtml() {
154
+ return [
155
+ {
156
+ tag: "script",
157
+ children: [
158
+ 'window.__CP_BUNDLER__ = "vite";',
159
+ "window.__CP_VITE_MODULES__ = {};",
160
+ ].join("\n"),
161
+ injectTo: "head-prepend",
162
+ },
163
+ ];
164
+ },
165
+ transform(code, id, options) {
166
+ // Skip SSR builds
167
+ if (options === null || options === void 0 ? void 0 : options.ssr)
168
+ return;
169
+ // Skip dependencies (use path separator to avoid false positives on
170
+ // filenames that happen to contain "node_modules" as a substring)
171
+ if (id.includes("/node_modules/"))
172
+ return;
173
+ // Strip Vite query strings (e.g., ?t=123456 for HMR cache busting)
174
+ // Must happen before extension check since ?t= is appended to the filename
175
+ const cleanId = id.split("?")[0];
176
+ // Only process JS/TS source files
177
+ if (!/\.(tsx?|jsx?|mjs)$/.test(cleanId))
178
+ return;
179
+ // Compute path relative to project root
180
+ const relativePath = cleanId.startsWith(projectRoot + "/")
181
+ ? cleanId.slice(projectRoot.length + 1)
182
+ : cleanId;
183
+ const bindings = parseExports(code);
184
+ const previousBindings = moduleExports.get(relativePath);
185
+ moduleExports.set(relativePath, bindings);
186
+ // If file lost all exports during HMR, clean up stale registry entry
187
+ if (bindings.length === 0) {
188
+ if (previousBindings && previousBindings.length > 0) {
189
+ const cleanup = `\n;(function(){if(typeof window!=="undefined"&&window.__CP_VITE_MODULES__)delete window.__CP_VITE_MODULES__[${JSON.stringify(relativePath)}];})();`;
190
+ return { code: code + cleanup, map: null };
191
+ }
192
+ return;
193
+ }
194
+ const registration = buildRegistrationCode(relativePath, bindings);
195
+ return {
196
+ code: code + registration,
197
+ map: null,
198
+ };
199
+ },
200
+ configureServer(server) {
201
+ server.middlewares.use("/__codepress/modules", (_req, res) => {
202
+ const map = {};
203
+ for (const [filePath, bindings] of moduleExports) {
204
+ map[filePath] = {
205
+ path: filePath,
206
+ exports: bindings.map((e) => e.exportedName),
207
+ };
208
+ }
209
+ res.setHeader("Content-Type", "application/json");
210
+ res.end(JSON.stringify(map));
211
+ });
212
+ },
213
+ };
214
+ }
215
+ module.exports = codepressVitePlugin;
216
+ module.exports.codepressVitePlugin = codepressVitePlugin;
217
+ module.exports.CodePressVitePlugin = codepressVitePlugin;
218
+ module.exports.default = codepressVitePlugin;
219
+ module.exports.parseExports = parseExports;
220
+ module.exports.buildRegistrationCode = buildRegistrationCode;
221
+ //# sourceMappingURL=vite-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-plugin.js","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;AAoEH,oCAuEC;AASD,sDAsBC;AAWD,sCA+EC;AAG+B,kDAAmB;AA7NnD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,YAAY,CAAC,IAAY;IACvC,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AC,QAAQ,EAAE,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC;oBACjD,GAAG,CAAC,QAAQ,CAAC,GAAG;wBACd,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;qBAC7C,CAAC;gBACJ,CAAC;gBACD,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;gBAClD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAID,MAAM,CAAC,OAAO,GAAG,mBAAmB,CAAC;AACrC,MAAM,CAAC,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AACzD,MAAM,CAAC,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AACzD,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,mBAAmB,CAAC;AAC7C,MAAM,CAAC,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,OAAO,CAAC,qBAAqB,GAAG,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codepress/codepress-engine",
3
- "version": "0.9.4-dev.leo-secrets.20260319181139",
3
+ "version": "0.9.4-dev.leo-secrets.20260319215954",
4
4
  "description": "CodePress engine - Babel and SWC plug-ins",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./src/index.ts",
@@ -40,6 +40,11 @@
40
40
  "require": "./dist/webpack-plugin.js",
41
41
  "default": "./dist/webpack-plugin.js"
42
42
  },
43
+ "./vite-plugin": {
44
+ "types": "./src/vite-plugin.ts",
45
+ "require": "./dist/vite-plugin.js",
46
+ "default": "./dist/vite-plugin.js"
47
+ },
43
48
  "./refresh-provider": {
44
49
  "types": "./src/CPRefreshProvider.tsx",
45
50
  "require": "./dist/CPRefreshProvider.js",
@@ -89,6 +94,11 @@
89
94
  "require": "./dist/webpack-plugin.js",
90
95
  "default": "./dist/webpack-plugin.js"
91
96
  },
97
+ "./vite-plugin": {
98
+ "types": "./dist/vite-plugin.d.ts",
99
+ "require": "./dist/vite-plugin.js",
100
+ "default": "./dist/vite-plugin.js"
101
+ },
92
102
  "./refresh-provider": {
93
103
  "types": "./dist/CPRefreshProvider.d.ts",
94
104
  "require": "./dist/CPRefreshProvider.js",