@jbpark/live-editor 4.1.0 → 4.2.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 (63) hide show
  1. package/README.ko.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/ast-CMD20ykx.js +1613 -0
  4. package/dist/ast-CMD20ykx.js.map +1 -0
  5. package/dist/{boundary-C90q3YsT.js → boundary-D2IFja-3.js} +2 -2
  6. package/dist/boundary-D2IFja-3.js.map +1 -0
  7. package/dist/cache-B0-XcIxJ.js +51 -0
  8. package/dist/cache-B0-XcIxJ.js.map +1 -0
  9. package/dist/{utils-BQ7WL7Jh.js → cn-CAnad2vL.js} +3 -128
  10. package/dist/cn-CAnad2vL.js.map +1 -0
  11. package/dist/compile-0Dvp8zp5.js +135 -0
  12. package/dist/compile-0Dvp8zp5.js.map +1 -0
  13. package/dist/constants-CKvdqZtO.js +1457 -0
  14. package/dist/constants-CKvdqZtO.js.map +1 -0
  15. package/dist/{context-Y-M9fViD.js → context-93X3gyfJ.js} +3 -3
  16. package/dist/context-93X3gyfJ.js.map +1 -0
  17. package/dist/{core-Co8Nlq16.js → core-B3ruccKb.js} +3 -2
  18. package/dist/core-B3ruccKb.js.map +1 -0
  19. package/dist/detect-typescript-5MV4mCM7.js +10 -0
  20. package/dist/detect-typescript-5MV4mCM7.js.map +1 -0
  21. package/dist/dnd/index.d.ts +2 -2
  22. package/dist/dnd/index.js +2 -2
  23. package/dist/{dnd-D_rG92-R.js → dnd-DBaH2L8N.js} +548 -137
  24. package/dist/dnd-DBaH2L8N.js.map +1 -0
  25. package/dist/{extract-abHYmNsu.js → document-C3eCRQlj.js} +6791 -8938
  26. package/dist/document-C3eCRQlj.js.map +1 -0
  27. package/dist/{document-J9Lo9p81.d.ts → document-Ct4jW78J.d.ts} +42 -22
  28. package/dist/editor/index.js +2 -2
  29. package/dist/{editor-aNRx7hRY.js → editor-DvMruljw.js} +2 -2
  30. package/dist/{editor-aNRx7hRY.js.map → editor-DvMruljw.js.map} +1 -1
  31. package/dist/editor-caches-ClMvdcQF.js +23 -0
  32. package/dist/editor-caches-ClMvdcQF.js.map +1 -0
  33. package/dist/error/index.js +2 -2
  34. package/dist/{error-o0SBwtTv.js → error-KW8XCcjH.js} +2 -2
  35. package/dist/{error-o0SBwtTv.js.map → error-KW8XCcjH.js.map} +1 -1
  36. package/dist/{index-Doh4VTXr.d.ts → index-DVgwXnPa.d.ts} +109 -34
  37. package/dist/{index-B_p74BRM.d.ts → index-w3kLcCXl.d.ts} +29 -5
  38. package/dist/index.d.ts +4 -4
  39. package/dist/index.js +5 -5
  40. package/dist/index.js.map +1 -1
  41. package/dist/preview/index.js +2 -2
  42. package/dist/{preview-CS6Rsppd.js → preview-B9Jhv1Up.js} +4 -4
  43. package/dist/preview-B9Jhv1Up.js.map +1 -0
  44. package/dist/provider/index.js +1 -1
  45. package/dist/sections-A4TAXUP8.js +24 -0
  46. package/dist/sections-A4TAXUP8.js.map +1 -0
  47. package/dist/{use-dynamic-tailwind-SOgrb2qc.js → use-dynamic-tailwind-BDfytfYC.js} +33 -9
  48. package/dist/use-dynamic-tailwind-BDfytfYC.js.map +1 -0
  49. package/dist/utils/ast/index.d.ts +3 -3
  50. package/dist/utils/ast/index.js +3 -3
  51. package/dist/utils/index.d.ts +20 -9
  52. package/dist/utils/index.js +7 -3
  53. package/package.json +1 -1
  54. package/dist/ast-CZwpVrJv.js +0 -851
  55. package/dist/ast-CZwpVrJv.js.map +0 -1
  56. package/dist/boundary-C90q3YsT.js.map +0 -1
  57. package/dist/context-Y-M9fViD.js.map +0 -1
  58. package/dist/core-Co8Nlq16.js.map +0 -1
  59. package/dist/dnd-D_rG92-R.js.map +0 -1
  60. package/dist/extract-abHYmNsu.js.map +0 -1
  61. package/dist/preview-CS6Rsppd.js.map +0 -1
  62. package/dist/use-dynamic-tailwind-SOgrb2qc.js.map +0 -1
  63. package/dist/utils-BQ7WL7Jh.js.map +0 -1
@@ -0,0 +1,135 @@
1
+ import { n as CONFIG } from "./constants-CKvdqZtO.js";
2
+ import { n as registerEditorCache } from "./editor-caches-ClMvdcQF.js";
3
+ import { t as createBoundedCache } from "./cache-B0-XcIxJ.js";
4
+ import { t as detectTypeScript } from "./detect-typescript-5MV4mCM7.js";
5
+ import React from "react";
6
+ import * as Babel from "@babel/standalone";
7
+ //#region src/utils/scripts.ts
8
+ const pins = /* @__PURE__ */ new Map();
9
+ const deferredRevocations = /* @__PURE__ */ new Map();
10
+ const revoke = (src, blobUrl) => {
11
+ if (!pins.has(src)) {
12
+ URL.revokeObjectURL(blobUrl);
13
+ return;
14
+ }
15
+ deferredRevocations.set(src, [...deferredRevocations.get(src) ?? [], blobUrl]);
16
+ };
17
+ const pin = (src) => {
18
+ pins.set(src, (pins.get(src) ?? 0) + 1);
19
+ };
20
+ const unpin = (src) => {
21
+ const count = (pins.get(src) ?? 0) - 1;
22
+ if (count > 0) {
23
+ pins.set(src, count);
24
+ return;
25
+ }
26
+ pins.delete(src);
27
+ deferredRevocations.get(src)?.forEach((blobUrl) => {
28
+ URL.revokeObjectURL(blobUrl);
29
+ });
30
+ deferredRevocations.delete(src);
31
+ };
32
+ const scriptCache = createBoundedCache(CONFIG.SCRIPT_CACHE_LIMIT, revoke);
33
+ const loadingScriptCache = /* @__PURE__ */ new Map();
34
+ const getCachedScriptBlob = async (src) => {
35
+ const cached = scriptCache.get(src);
36
+ if (cached) return cached;
37
+ const existing = loadingScriptCache.get(src);
38
+ if (existing) return existing;
39
+ const promise = fetch(src).then((res) => res.text()).then((text) => {
40
+ const blob = new Blob([text], { type: "application/javascript" });
41
+ const blobUrl = URL.createObjectURL(blob);
42
+ scriptCache.set(src, blobUrl);
43
+ return blobUrl;
44
+ }).finally(() => {
45
+ loadingScriptCache.delete(src);
46
+ });
47
+ loadingScriptCache.set(src, promise);
48
+ return promise;
49
+ };
50
+ const withScriptBlobs = async (scripts, inject) => {
51
+ scripts.forEach(pin);
52
+ try {
53
+ inject(await Promise.all(scripts.map(getCachedScriptBlob)));
54
+ } finally {
55
+ scripts.forEach(unpin);
56
+ }
57
+ };
58
+ const preloadScripts = (scripts) => {
59
+ scripts.forEach((src) => {
60
+ getCachedScriptBlob(src).catch(() => {});
61
+ });
62
+ };
63
+ const clearScriptCache = () => {
64
+ scriptCache.clear();
65
+ loadingScriptCache.clear();
66
+ };
67
+ registerEditorCache(clearScriptCache);
68
+ //#endregion
69
+ //#region src/utils/compile.ts
70
+ const compilationKeys = /* @__PURE__ */ new Set();
71
+ const compilationCache = createBoundedCache(CONFIG.CACHE_LIMIT, (key) => compilationKeys.delete(key));
72
+ const createCacheKey = (code, modules) => ({
73
+ code,
74
+ modules: Object.keys(modules).sort().map((name) => [name, modules[name]])
75
+ });
76
+ const compile = (code, modules) => {
77
+ const candidate = createCacheKey(code, modules);
78
+ for (const key of compilationKeys) if (key.code === candidate.code && key.modules.length === candidate.modules.length && key.modules.every(([name, value], index) => name === candidate.modules[index][0] && Object.is(value, candidate.modules[index][1]))) return compilationCache.get(key);
79
+ const result = compileModule(code, Object.fromEntries(candidate.modules));
80
+ compilationCache.set(candidate, result);
81
+ compilationKeys.add(candidate);
82
+ return result;
83
+ };
84
+ const clearCompilationCache = () => {
85
+ compilationCache.clear();
86
+ };
87
+ const transformCode = (code, isTypeScript = false) => {
88
+ try {
89
+ return Babel.transform(code, {
90
+ filename: isTypeScript ? "preview.tsx" : "preview.jsx",
91
+ presets: isTypeScript ? [
92
+ "typescript",
93
+ "env",
94
+ "react"
95
+ ] : ["env", "react"],
96
+ sourceType: "module",
97
+ plugins: [Babel.availablePlugins["transform-modules-commonjs"]]
98
+ }).code || "";
99
+ } catch (e) {
100
+ console.error("❌ Babel transformation error:", e);
101
+ return code;
102
+ }
103
+ };
104
+ const compileModule = (code, modules) => {
105
+ const isTypeScript = detectTypeScript(code);
106
+ let render;
107
+ try {
108
+ render = new Function("exports", "require", "module", "React", transformCode(code, isTypeScript));
109
+ } catch (e) {
110
+ return {
111
+ exports: {},
112
+ error: e instanceof Error ? e.message : "Syntax error"
113
+ };
114
+ }
115
+ const module = { exports: {} };
116
+ const customRequire = (name) => {
117
+ if (name === "react") return React;
118
+ if (name in modules) return modules[name];
119
+ throw new Error(`Module not found: ${name}`);
120
+ };
121
+ try {
122
+ render(module.exports, customRequire, module, React);
123
+ } catch (e) {
124
+ return {
125
+ exports: {},
126
+ error: e instanceof Error ? e.message : "Runtime error"
127
+ };
128
+ }
129
+ return module;
130
+ };
131
+ registerEditorCache(clearCompilationCache);
132
+ //#endregion
133
+ export { getCachedScriptBlob as a, clearScriptCache as i, compile as n, preloadScripts as o, transformCode as r, withScriptBlobs as s, clearCompilationCache as t };
134
+
135
+ //# sourceMappingURL=compile-0Dvp8zp5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile-0Dvp8zp5.js","names":[],"sources":["../src/utils/scripts.ts","../src/utils/compile.ts"],"sourcesContent":["import { CONFIG } from '../constants';\nimport { createBoundedCache } from './cache';\nimport { registerEditorCache } from './editor-caches';\n\n// How many callers are between requesting a script and injecting it, per\n// source. A blob URL evicted in that window can't be revoked yet: the caller\n// already holds it and is about to hand it to a <script>, which then fails to\n// load without any error (#443). The LRU still drops the entry on schedule;\n// only the revocation waits, in `deferredRevocations`, until the last pin on\n// that source is released.\nconst pins = new Map<string, number>();\nconst deferredRevocations = new Map<string, string[]>();\n\nconst revoke = (src: string, blobUrl: string) => {\n if (!pins.has(src)) {\n URL.revokeObjectURL(blobUrl);\n return;\n }\n\n deferredRevocations.set(src, [\n ...(deferredRevocations.get(src) ?? []),\n blobUrl,\n ]);\n};\n\nconst pin = (src: string) => {\n pins.set(src, (pins.get(src) ?? 0) + 1);\n};\n\nconst unpin = (src: string) => {\n const count = (pins.get(src) ?? 0) - 1;\n\n if (count > 0) {\n pins.set(src, count);\n return;\n }\n\n pins.delete(src);\n deferredRevocations.get(src)?.forEach(blobUrl => {\n URL.revokeObjectURL(blobUrl);\n });\n deferredRevocations.delete(src);\n};\n\nconst scriptCache = createBoundedCache<string, string>(\n CONFIG.SCRIPT_CACHE_LIMIT,\n revoke,\n);\nconst loadingScriptCache = new Map<string, Promise<string>>();\n\nexport const getCachedScriptBlob = async (src: string): Promise<string> => {\n const cached = scriptCache.get(src);\n\n if (cached) {\n return cached;\n }\n\n const existing = loadingScriptCache.get(src);\n\n if (existing) {\n return existing;\n }\n\n const promise = fetch(src)\n .then(res => res.text())\n .then(text => {\n const blob = new Blob([text], { type: 'application/javascript' });\n const blobUrl = URL.createObjectURL(blob);\n\n scriptCache.set(src, blobUrl);\n\n return blobUrl;\n })\n // Cleanup belongs on both paths, not just the successful one. A rejected\n // promise left in this map is adopted by every later caller, so a single\n // failed fetch made that script unloadable for the rest of the session\n // even after the network recovered.\n .finally(() => {\n loadingScriptCache.delete(src);\n });\n\n loadingScriptCache.set(src, promise);\n\n return promise;\n};\n\n// Resolves every script to a blob URL and hands them to `inject` while none of\n// them can be revoked. `inject` has to consume them synchronously, which\n// appending the <script> elements does: the browser resolves a blob URL when\n// the element is inserted, so revoking it afterwards is safe.\n//\n// Needed because the URLs resolve at different times. A frame waiting on\n// several scripts, or several frames loading at once, can push more distinct\n// scripts through the cache than it holds before the last one arrives, and\n// the LRU used to revoke the first URLs while they were still waiting to be\n// injected (#443).\nexport const withScriptBlobs = async (\n scripts: string[],\n inject: (blobUrls: string[]) => void,\n): Promise<void> => {\n scripts.forEach(pin);\n\n try {\n inject(await Promise.all(scripts.map(getCachedScriptBlob)));\n } finally {\n scripts.forEach(unpin);\n }\n};\n\nexport const preloadScripts = (scripts: string[]): void => {\n scripts.forEach(src => {\n // Fire-and-forget by design, so the rejection is absorbed here rather\n // than surfacing as an unhandled one. The retry now works (see above),\n // and the real load path reports the failure to whoever awaits it.\n getCachedScriptBlob(src).catch(() => {});\n });\n};\n\n// Blob URLs are browser resources, not just memory, so dropping the entries\n// is not enough — they have to be revoked. `clear()` runs the same `onEvict`\n// the LRU does, so the `URL.revokeObjectURL` above covers this path too.\n//\n// `loadingScriptCache` goes with it: a promise from a session that no longer\n// exists should not be adopted by the next one, which would otherwise hand\n// back a blob URL created before the revocation.\nexport const clearScriptCache = () => {\n scriptCache.clear();\n loadingScriptCache.clear();\n};\n\nregisterEditorCache(clearScriptCache);\n","import React from 'react';\n\nimport * as Babel from '@babel/standalone';\n\nimport type { Module } from '~/types';\n\nimport { CONFIG } from '../constants';\nimport { createBoundedCache } from './cache';\nimport { detectTypeScript } from './detect-typescript';\nimport { registerEditorCache } from './editor-caches';\n\ninterface CompilationKey {\n code: string;\n modules: [string, unknown][];\n}\n\n// The index holds only the keys still in the bounded LRU. Comparing at most\n// CACHE_LIMIT snapshots avoids an unbounded identity registry for symbols\n// or serializing module objects/functions (which may be cyclic or closures).\nconst compilationKeys = new Set<CompilationKey>();\nconst compilationCache = createBoundedCache<CompilationKey, Module>(\n CONFIG.CACHE_LIMIT,\n key => compilationKeys.delete(key),\n);\n\nconst createCacheKey = (\n code: string,\n modules: Record<string, unknown>,\n): CompilationKey => ({\n code,\n modules: Object.keys(modules)\n .sort()\n .map(name => [name, modules[name]]),\n});\n\n// Objects/functions compare by reference; primitives compare by value.\n// Replace a module object when its implementation changes. In-place edits\n// inside an existing module are intentionally not observed by this cache.\nexport const compile = (\n code: string,\n modules: Record<string, unknown>,\n): Module => {\n const candidate = createCacheKey(code, modules);\n\n for (const key of compilationKeys) {\n if (\n key.code === candidate.code &&\n key.modules.length === candidate.modules.length &&\n key.modules.every(\n ([name, value], index) =>\n name === candidate.modules[index]![0] &&\n Object.is(value, candidate.modules[index]![1]),\n )\n ) {\n return compilationCache.get(key)!;\n }\n }\n\n const result = compileModule(code, Object.fromEntries(candidate.modules));\n\n compilationCache.set(candidate, result);\n compilationKeys.add(candidate);\n\n return result;\n};\n\n// `compilationKeys` needs no separate pass: it is drained by the `onEvict`\n// the cache was built with, which `clear()` runs for every entry.\nexport const clearCompilationCache = () => {\n compilationCache.clear();\n};\n\n// TypeScript source used to go through `ts.transpileModule` and then this\n// same Babel pass — a double transpile, and one that required an eagerly\n// awaited top-level `import('typescript')` (a 3.4 MB chunk with none of the\n// laziness a dynamic import would normally buy, since it was awaited at\n// module scope). `@babel/standalone` already ships `preset-typescript` and\n// already runs this exact pass for the non-TS case, so folding TS in here\n// removes the `typescript` dependency entirely — see #192. Babel transpiles\n// per-file with no type information, so `const enum` comes out as a real\n// enum object and legacy decorators aren't supported; neither matters for\n// previewing React components, and errors here already fall back to\n// returning the input unchanged, same as compileTypeScript did.\nexport const transformCode = (code: string, isTypeScript = false): string => {\n try {\n const result = Babel.transform(code, {\n filename: isTypeScript ? 'preview.tsx' : 'preview.jsx',\n presets: isTypeScript ? ['typescript', 'env', 'react'] : ['env', 'react'],\n sourceType: 'module',\n plugins: [Babel.availablePlugins['transform-modules-commonjs']],\n }).code;\n\n return result || '';\n } catch (e) {\n console.error('❌ Babel transformation error:', e);\n return code;\n }\n};\n\nconst compileModule = (\n code: string,\n modules: Record<string, unknown>,\n): Module => {\n const isTypeScript = detectTypeScript(code);\n\n type RenderFunction = (\n exports: Module['exports'],\n require: (name: string) => unknown,\n module: Module,\n React: typeof import('react'),\n ) => void;\n\n let render: RenderFunction;\n\n // Runs in this window's own JS realm, not inside the preview iframe — the iframe only\n // renders the resulting React elements via portal. See README \"Security Notes\".\n try {\n render = new Function(\n 'exports',\n 'require',\n 'module',\n 'React',\n transformCode(code, isTypeScript),\n ) as RenderFunction;\n } catch (e) {\n const errorMessage = e instanceof Error ? e.message : 'Syntax error';\n return { exports: {}, error: errorMessage };\n }\n\n const module: Module = { exports: {} };\n\n const customRequire = (name: string) => {\n if (name === 'react') {\n return React;\n }\n\n // Presence, not truthiness: a module may legitimately *be* a falsy\n // primitive (`0`, `''`, `false`, `null`), which compile() supports and\n // compares by value. A truthiness check reported those as missing.\n if (name in modules) {\n return modules[name];\n }\n\n throw new Error(`Module not found: ${name}`);\n };\n\n try {\n render(module.exports, customRequire, module, React);\n } catch (e) {\n const errorMessage = e instanceof Error ? e.message : 'Runtime error';\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