fix
This commit is contained in:
parent
27c45d449a
commit
b7deb69d5a
|
|
@ -4,3 +4,4 @@ var Jr=Object.create;var hr=Object.defineProperty;var Qr=Object.getOwnPropertyDe
|
||||||
@jspm/core/nodelibs/browser/buffer.js:
|
@jspm/core/nodelibs/browser/buffer.js:
|
||||||
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||||||
*/
|
*/
|
||||||
|
//# sourceMappingURL=chunk-MAXH2HJU.js.map
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
||||||
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||||
|
/*# sourceMappingURL=font-LBWDSK65.css.map */
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
import{d as o,e as f,g as s}from"./chunk-ACJPWHEH.js";o();s();f();
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
import{d as o,e as f,g as s}from"./chunk-MAXH2HJU.js";o();s();f();
|
||||||
|
//# sourceMappingURL=font-WINJX3PY.js.map
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||||
|
/*# sourceMappingURL=main.css.map */
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2,10 +2,17 @@ import { codeBuild } from "../../../../../vi/render/script/code-build";
|
||||||
import { getMetaById } from "../../../../logic/active/get-meta";
|
import { getMetaById } from "../../../../logic/active/get-meta";
|
||||||
import { active, PG } from "../../../../logic/ed-global";
|
import { active, PG } from "../../../../logic/ed-global";
|
||||||
|
|
||||||
export const codeEditAdvJs = (p: PG, value: string) => {
|
export const codeEditAdvJs = async (p: PG, value: string) => {
|
||||||
const meta = getMetaById(p, active.item_id);
|
const meta = getMetaById(p, active.item_id);
|
||||||
|
|
||||||
if (meta && meta.mitem) {
|
if (meta && meta.mitem) {
|
||||||
|
const valueBuilt = (
|
||||||
|
await codeBuild(
|
||||||
|
{ _: `render (${value})` },
|
||||||
|
`[item: ${meta.item.name} - ${meta.item.id}]`
|
||||||
|
)
|
||||||
|
)["_"];
|
||||||
|
|
||||||
meta.mitem.doc?.transact(() => {
|
meta.mitem.doc?.transact(() => {
|
||||||
let mprop = meta.mitem?.get("adv");
|
let mprop = meta.mitem?.get("adv");
|
||||||
|
|
||||||
|
|
@ -16,11 +23,6 @@ export const codeEditAdvJs = (p: PG, value: string) => {
|
||||||
|
|
||||||
if (mprop) {
|
if (mprop) {
|
||||||
try {
|
try {
|
||||||
const valueBuilt = codeBuild(
|
|
||||||
{ _: `render (${value})` },
|
|
||||||
`[item: ${meta.item.name} - ${meta.item.id}]`
|
|
||||||
)["_"];
|
|
||||||
|
|
||||||
mprop.set("js", value);
|
mprop.set("js", value);
|
||||||
mprop.set("jsBuilt", valueBuilt);
|
mprop.set("jsBuilt", valueBuilt);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { codeBuild } from "../../../../../vi/render/script/code-build";
|
||||||
import { getMetaById } from "../../../../logic/active/get-meta";
|
import { getMetaById } from "../../../../logic/active/get-meta";
|
||||||
import { active, PG } from "../../../../logic/ed-global";
|
import { active, PG } from "../../../../logic/ed-global";
|
||||||
|
|
||||||
export const codeEditPropInstance = (p: PG, value: string) => {
|
export const codeEditPropInstance = async (p: PG, value: string) => {
|
||||||
const prop_name = p.ui.popup.script.prop_name;
|
const prop_name = p.ui.popup.script.prop_name;
|
||||||
const meta = getMetaById(p, active.item_id);
|
const meta = getMetaById(p, active.item_id);
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ export const codeEditPropInstance = (p: PG, value: string) => {
|
||||||
const mprop = meta.mitem?.get("component")?.get("props")?.get(prop_name);
|
const mprop = meta.mitem?.get("component")?.get("props")?.get(prop_name);
|
||||||
if (mprop) {
|
if (mprop) {
|
||||||
try {
|
try {
|
||||||
const valueBuilt = codeBuild({ _: value })["_"];
|
const valueBuilt = (await codeBuild({ _: value }))["_"];
|
||||||
mprop.doc?.transact(() => {
|
mprop.doc?.transact(() => {
|
||||||
mprop.set("value", value);
|
mprop.set("value", value);
|
||||||
mprop.set("valueBuilt", valueBuilt);
|
mprop.set("valueBuilt", valueBuilt);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { codeBuild } from "../../../../../vi/render/script/code-build";
|
import { codeBuild } from "../../../../../vi/render/script/code-build";
|
||||||
import { active, PG } from "../../../../logic/ed-global";
|
import { active, PG } from "../../../../logic/ed-global";
|
||||||
|
|
||||||
export const codeEditPropMaster = (p: PG, value: string) => {
|
export const codeEditPropMaster = async (p: PG, value: string) => {
|
||||||
const prop_kind = p.ui.popup.script.prop_kind;
|
const prop_kind = p.ui.popup.script.prop_kind;
|
||||||
const prop_name = p.ui.popup.script.prop_name;
|
const prop_name = p.ui.popup.script.prop_name;
|
||||||
const comp = p.comp.list[active.comp_id];
|
const comp = p.comp.list[active.comp_id];
|
||||||
|
|
@ -15,7 +15,7 @@ export const codeEditPropMaster = (p: PG, value: string) => {
|
||||||
?.get(prop_name);
|
?.get(prop_name);
|
||||||
if (mprop) {
|
if (mprop) {
|
||||||
try {
|
try {
|
||||||
const valueBuilt = codeBuild({ _: value })["_"];
|
const valueBuilt = (await codeBuild({ _: value }))["_"];
|
||||||
mprop.doc?.transact(() => {
|
mprop.doc?.transact(() => {
|
||||||
if (prop_kind === "value") {
|
if (prop_kind === "value") {
|
||||||
mprop.set("value", value);
|
mprop.set("value", value);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,20 @@
|
||||||
import { transform } from "sucrase";
|
import type { transform } from "sucrase";
|
||||||
|
|
||||||
|
const imported = {
|
||||||
|
transform: null as null | typeof transform,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const codeBuild = async (
|
||||||
|
codes: Record<string, string>,
|
||||||
|
filePath?: string
|
||||||
|
) => {
|
||||||
|
if (!imported.transform) {
|
||||||
|
imported.transform = (await import("sucrase")).transform;
|
||||||
|
}
|
||||||
|
|
||||||
export const codeBuild = (codes: Record<string, string>, filePath?: string) => {
|
|
||||||
const result = {} as Record<string, string>;
|
const result = {} as Record<string, string>;
|
||||||
for (const [k, v] of Object.entries(codes)) {
|
for (const [k, v] of Object.entries(codes)) {
|
||||||
result[k] = transform(v, {
|
result[k] = imported.transform(v, {
|
||||||
transforms: ["typescript", "imports", "jsx"],
|
transforms: ["typescript", "imports", "jsx"],
|
||||||
preserveDynamicImport: true,
|
preserveDynamicImport: true,
|
||||||
disableESTransforms: true,
|
disableESTransforms: true,
|
||||||
|
|
|
||||||
|
|
@ -205,8 +205,8 @@ const updatePropValueBuilt = (mprop: FMCompDef, src: string) => {
|
||||||
conf.src[id] = src;
|
conf.src[id] = src;
|
||||||
}
|
}
|
||||||
clearTimeout(conf.timeout);
|
clearTimeout(conf.timeout);
|
||||||
conf.timeout = setTimeout(() => {
|
conf.timeout = setTimeout(async () => {
|
||||||
const result = codeBuild(conf.src);
|
const result = await codeBuild(conf.src);
|
||||||
|
|
||||||
let doc = null as unknown as Doc;
|
let doc = null as unknown as Doc;
|
||||||
for (const [k, v] of Object.entries(result)) {
|
for (const [k, v] of Object.entries(result)) {
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ export const devItem = (
|
||||||
for (const [k, v] of Object.entries(compile)) {
|
for (const [k, v] of Object.entries(compile)) {
|
||||||
src[k] = v.value;
|
src[k] = v.value;
|
||||||
}
|
}
|
||||||
let code_result = codeBuild(src);
|
let code_result = await codeBuild(src);
|
||||||
await new Promise((done) => {
|
await new Promise((done) => {
|
||||||
setTimeout(done);
|
setTimeout(done);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@ const ctx = await context({
|
||||||
format: "esm",
|
format: "esm",
|
||||||
jsx: "transform",
|
jsx: "transform",
|
||||||
minify: true,
|
minify: true,
|
||||||
sourcemap: false,
|
sourcemap: true,
|
||||||
logLevel: "error",
|
logLevel: "error",
|
||||||
|
metafile: true,
|
||||||
assetNames: `[name]`,
|
assetNames: `[name]`,
|
||||||
loader: { ".woff": "file", ".ttf": "file", ".woff2": "file" },
|
loader: { ".woff": "file", ".ttf": "file", ".woff2": "file" },
|
||||||
define: {
|
define: {
|
||||||
|
|
@ -81,4 +82,7 @@ const ctx = await context({
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ctx.rebuild().then((e) => {
|
||||||
|
Bun.write(dir.data("metafile.json"), JSON.stringify(e.metafile));
|
||||||
|
});
|
||||||
ctx.watch();
|
ctx.watch();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue