@jbpark/live-editor 1.10.0 → 1.12.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.
@@ -1,4 +1,3 @@
1
- import { a as getSections, i as generateSectionPreviews, n as generateDocumentCode, o as parseDocument, r as generateSectionPreview, s as replaceDocumentSections, t as clearDocumentParseCache } from "../../document-DJDRM79h.mjs";
2
- import { _ as parseArrayExpression, a as bulkUpdate, c as extract, d as getCurrentValue, f as parseBinding, g as extractObjectProperties, h as extractNodeValue, i as replaceIds, m as createNodeFromValue, n as clone, o as update, p as arrayExpressionToCode, r as fillIds, s as clearExtractCache, t as validateBindingValue, u as findEditableChildren, v as parseValue, y as generateCode } from "../../ast-DiVN0l7x.mjs";
3
-
4
- export { arrayExpressionToCode, bulkUpdate, clearDocumentParseCache, clearExtractCache, clone, createNodeFromValue, extract, extractNodeValue, extractObjectProperties, fillIds, findEditableChildren, generateCode, generateDocumentCode, generateSectionPreview, generateSectionPreviews, getCurrentValue, getSections, parseArrayExpression, parseBinding, parseDocument, parseValue, replaceDocumentSections, replaceIds, update, validateBindingValue };
1
+ import { a as generateSectionPreviews, c as replaceDocumentSections, i as generateSectionPreview, n as createSectionPreviewCache, o as getSections, r as generateDocumentCode, s as parseDocument, t as clearDocumentParseCache } from "../../document-DocoSXLT.mjs";
2
+ import { _ as parseArrayExpression, a as bulkUpdate, c as extract, d as getCurrentValue, f as parseBinding, g as extractObjectProperties, h as extractNodeValue, i as replaceIds, m as createNodeFromValue, n as clone, o as update, p as arrayExpressionToCode, r as fillIds, s as clearExtractCache, t as validateBindingValue, u as findEditableChildren, v as parseValue, y as generateCode } from "../../ast-9E8pNi7j.mjs";
3
+ export { arrayExpressionToCode, bulkUpdate, clearDocumentParseCache, clearExtractCache, clone, createNodeFromValue, createSectionPreviewCache, extract, extractNodeValue, extractObjectProperties, fillIds, findEditableChildren, generateCode, generateDocumentCode, generateSectionPreview, generateSectionPreviews, getCurrentValue, getSections, parseArrayExpression, parseBinding, parseDocument, parseValue, replaceDocumentSections, replaceIds, update, validateBindingValue };
@@ -1,7 +1,7 @@
1
- import { n as Section, t as Module } from "../index-DdSjzvA3.mjs";
1
+ import { n as Section, t as Module } from "../index-C8h8TcIl.mjs";
2
+ import { i as createSectionPreviewCache, n as SectionPreviewCache } from "../document-BVWq-dmf.mjs";
2
3
  import * as ui from "@jbpark/ui-kit";
3
4
  import * as utils from "@jbpark/ui-kit/utils";
4
-
5
5
  //#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts
6
6
  type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
7
7
  type ClassDictionary = Record<string, any>;
@@ -24,5 +24,5 @@ declare const generateSections: (codes: string[], fullCode: string) => string[];
24
24
  declare const getCachedScriptBlob: (src: string) => Promise<string>;
25
25
  declare const preloadScripts: (scripts: string[]) => void;
26
26
  //#endregion
27
- export { baseModules, clearCompilationCache, cn, compile, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, replaceSections, transformCode };
27
+ export { type SectionPreviewCache, baseModules, clearCompilationCache, cn, compile, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, replaceSections, transformCode };
28
28
  //# sourceMappingURL=index.d.mts.map
@@ -1,4 +1,3 @@
1
- import "../document-DJDRM79h.mjs";
2
- import { a as detectTypeScript, c as generateSections, d as replaceSections, f as transformCode, i as compile, l as getCachedScriptBlob, n as clearCompilationCache, o as extractSections, r as cn, s as generateSection, t as baseModules, u as preloadScripts } from "../utils-D1tlgtgj.mjs";
3
-
4
- export { baseModules, clearCompilationCache, cn, compile, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, replaceSections, transformCode };
1
+ import { n as createSectionPreviewCache } from "../document-DocoSXLT.mjs";
2
+ import { a as detectTypeScript, c as generateSections, d as replaceSections, f as transformCode, i as compile, l as getCachedScriptBlob, n as clearCompilationCache, o as extractSections, r as cn, s as generateSection, t as baseModules, u as preloadScripts } from "../utils-DP9WPbBJ.mjs";
3
+ export { baseModules, clearCompilationCache, cn, compile, createSectionPreviewCache, detectTypeScript, extractSections, generateSection, generateSections, getCachedScriptBlob, preloadScripts, replaceSections, transformCode };
@@ -1,37 +1,2 @@
1
- import { compile } from "tailwindcss";
2
-
3
- //#region src/utils/tailwind/index.ts
4
- const extractClasses = (code) => {
5
- const classes = /* @__PURE__ */ new Set();
6
- const cnPattern = /cn\(([^)]*(?:\([^)]*\)[^)]*)*)\)/gs;
7
- let cnMatch;
8
- while ((cnMatch = cnPattern.exec(code)) !== null) {
9
- const cnContent = cnMatch[1];
10
- const stringPattern = /['"`]([^'"`]+)['"`]/g;
11
- let strMatch;
12
- while ((strMatch = stringPattern.exec(cnContent)) !== null) strMatch[1].split(/\s+/).forEach((cls) => {
13
- if (cls.trim()) classes.add(cls.trim());
14
- });
15
- }
16
- for (const pattern of [/className=["']([^"']+)["']/g, /className=\{["'`]([^"'`]+)["'`]\}/g]) {
17
- let match;
18
- while ((match = pattern.exec(code)) !== null) match[1].split(/\s+/).forEach((cls) => {
19
- if (cls.trim()) classes.add(cls.trim());
20
- });
21
- }
22
- const conditionalPattern = /&&\s*['"`]([^'"`]+)['"`]/g;
23
- let condMatch;
24
- while ((condMatch = conditionalPattern.exec(code)) !== null) condMatch[1].split(/\s+/).forEach((cls) => {
25
- if (cls.trim()) classes.add(cls.trim());
26
- });
27
- return Array.from(classes);
28
- };
29
- const generateTailwindCSS = async (code) => {
30
- const classes = extractClasses(code);
31
- if (classes.length === 0) return "";
32
- return (await compile(`@tailwind utilities;`)).build(classes);
33
- };
34
-
35
- //#endregion
1
+ import { t as generateTailwindCSS } from "../../tailwind-CzPhj3D9.mjs";
36
2
  export { generateTailwindCSS };
37
- //# sourceMappingURL=index.mjs.map