okno 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as a } from "./plugin-Cwwh6E1P.js";
1
+ import { o as a } from "./plugin-rPgNLY_g.js";
2
2
  export {
3
3
  a as okno
4
4
  };
@@ -1,9 +1,9 @@
1
- import { join as u, extname as M, dirname as R, relative as D, resolve as y } from "node:path";
2
- import { existsSync as $, readFileSync as V, mkdirSync as H, writeFileSync as J } from "node:fs";
3
- import { readdir as v, writeFile as G, readFile as A } from "node:fs/promises";
4
- import { fileURLToPath as U } from "node:url";
5
- import { simpleGit as B } from "simple-git";
6
- async function E(a) {
1
+ import { join as u, extname as R, dirname as E, relative as L, resolve as I } from "node:path";
2
+ import { existsSync as $, readFileSync as M, mkdirSync as V, writeFileSync as D } from "node:fs";
3
+ import { readdir as y, writeFile as H, readFile as J } from "node:fs/promises";
4
+ import { fileURLToPath as G } from "node:url";
5
+ import { simpleGit as A } from "simple-git";
6
+ async function C(a) {
7
7
  const n = [
8
8
  "// Auto-generated by okno. Do not edit.",
9
9
  "",
@@ -25,50 +25,50 @@ async function E(a) {
25
25
  " ? { [K in keyof T]: OknoWrapped<T[K]> } & OknoValue<T>",
26
26
  " : OknoValue<T>",
27
27
  ""
28
- ], o = u(a, "pages"), e = await W(o);
28
+ ], o = u(a, "pages"), e = await P(o);
29
29
  if (e.length > 0) {
30
30
  n.push('declare module "okno:pages" {');
31
31
  for (const r of e) {
32
32
  const t = `./pages/${r}`;
33
- n.push(` import _${b(r)} from "${t}"`), n.push(` export const ${r}: OknoWrapped<typeof _${b(r)}>`);
33
+ n.push(` import _${k(r)} from "${t}"`), n.push(` export const ${r}: OknoWrapped<typeof _${k(r)}>`);
34
34
  }
35
35
  n.push("}"), n.push("");
36
36
  }
37
37
  const s = u(a, "collections");
38
38
  if ($(s)) {
39
- const r = (await v(s, { withFileTypes: !0 })).filter((t) => t.isDirectory());
39
+ const r = (await y(s, { withFileTypes: !0 })).filter((t) => t.isDirectory());
40
40
  if (r.length > 0) {
41
41
  n.push('declare module "okno:collections" {');
42
42
  for (const t of r) {
43
- const i = await W(u(s, t.name));
43
+ const i = await P(u(s, t.name));
44
44
  if (i.length === 0) continue;
45
45
  const p = i[0];
46
46
  n.push(
47
- ` import _${b(t.name)}_item from "./collections/${t.name}/${p}"`
48
- ), n.push(` export const ${t.name}: OknoWrapped<typeof _${b(t.name)}_item>[]`);
47
+ ` import _${k(t.name)}_item from "./collections/${t.name}/${p}"`
48
+ ), n.push(` export const ${t.name}: OknoWrapped<typeof _${k(t.name)}_item>[]`);
49
49
  }
50
50
  n.push("}"), n.push("");
51
51
  }
52
52
  }
53
- const l = u(a, "globals"), c = await W(l);
53
+ const l = u(a, "globals"), c = await P(l);
54
54
  if (c.length > 0) {
55
55
  n.push('declare module "okno:globals" {');
56
56
  for (const r of c) {
57
57
  const t = `./globals/${r}`;
58
- n.push(` import _${b(r)} from "${t}"`), n.push(` export const ${r}: OknoWrapped<typeof _${b(r)}>`);
58
+ n.push(` import _${k(r)} from "${t}"`), n.push(` export const ${r}: OknoWrapped<typeof _${k(r)}>`);
59
59
  }
60
60
  n.push("}"), n.push("");
61
61
  }
62
- await G(u(a, "modules.d.ts"), n.join(`
62
+ await H(u(a, "modules.d.ts"), n.join(`
63
63
  `));
64
64
  }
65
- async function W(a) {
66
- return $(a) ? (await v(a)).filter((o) => o.endsWith(".ts") && o !== "index.ts" && o !== "modules.d.ts").map((o) => o.replace(".ts", "")) : [];
65
+ async function P(a) {
66
+ return $(a) ? (await y(a)).filter((o) => o.endsWith(".ts") && o !== "index.ts" && o !== "modules.d.ts").map((o) => o.replace(".ts", "")) : [];
67
67
  }
68
- function b(a) {
68
+ function k(a) {
69
69
  return a.replace(/-/g, "_");
70
70
  }
71
- const K = {
71
+ const U = {
72
72
  ".webp": "image/webp",
73
73
  ".png": "image/png",
74
74
  ".jpg": "image/jpeg",
@@ -89,7 +89,7 @@ const K = {
89
89
  ".ttf": "font/ttf",
90
90
  ".otf": "font/otf"
91
91
  };
92
- function z(a, n) {
92
+ function B(a, n) {
93
93
  a.middlewares.use((o, e, s) => {
94
94
  var t;
95
95
  if (o.method !== "GET" || !((t = o.url) != null && t.startsWith("/okno/files/"))) return s();
@@ -98,8 +98,8 @@ function z(a, n) {
98
98
  const c = u(n, "files", l);
99
99
  if (!$(c))
100
100
  return e.statusCode = 404, e.end("Not found");
101
- const r = M(l).toLowerCase();
102
- e.setHeader("Content-Type", K[r] || "application/octet-stream"), e.setHeader("Cache-Control", "public, max-age=3600"), e.end(V(c));
101
+ const r = R(l).toLowerCase();
102
+ e.setHeader("Content-Type", U[r] || "application/octet-stream"), e.setHeader("Cache-Control", "public, max-age=3600"), e.end(M(c));
103
103
  }), a.middlewares.use(async (o, e, s) => {
104
104
  var c;
105
105
  if (!((c = o.url) != null && c.startsWith("/__okno/"))) return s();
@@ -113,22 +113,22 @@ function z(a, n) {
113
113
  const i = u(n, t);
114
114
  if ($(i))
115
115
  return e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, skipped: !0 }));
116
- const p = await X(o);
117
- return H(R(i), { recursive: !0 }), J(i, p), e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, written: t, bytes: p.length }));
116
+ const p = await K(o);
117
+ return V(E(i), { recursive: !0 }), D(i, p), e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, written: t, bytes: p.length }));
118
118
  }
119
119
  if (o.method === "POST" && l === "sync") {
120
- const r = await Y(o), t = r == null ? void 0 : r.path;
120
+ const r = await z(o), t = r == null ? void 0 : r.path;
121
121
  if (t) {
122
122
  const f = u(n, t);
123
- return I(a, t, f), e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, invalidated: t }));
123
+ return F(a, t, f), e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, invalidated: t }));
124
124
  }
125
- const i = B(n), p = await i.revparse(["--show-toplevel"]), m = D(p.trim(), n);
125
+ const i = A(n), p = await i.revparse(["--show-toplevel"]), m = L(p.trim(), n);
126
126
  try {
127
127
  const f = await i.pull();
128
128
  for (const d of f.files)
129
129
  if (d.startsWith(`${m}/`)) {
130
130
  const h = d.slice(`${m}/`.length), g = u(n, h);
131
- I(a, h, g);
131
+ F(a, h, g);
132
132
  }
133
133
  return e.setHeader("Content-Type", "application/json"), e.end(JSON.stringify({ ok: !0, files: f.files }));
134
134
  } catch (f) {
@@ -143,13 +143,13 @@ function z(a, n) {
143
143
  }
144
144
  });
145
145
  }
146
- function X(a) {
146
+ function K(a) {
147
147
  return new Promise((n, o) => {
148
148
  const e = [];
149
149
  a.on("data", (s) => e.push(s)), a.on("end", () => n(Buffer.concat(e))), a.on("error", o);
150
150
  });
151
151
  }
152
- function Y(a) {
152
+ function z(a) {
153
153
  return new Promise((n) => {
154
154
  let o = "";
155
155
  a.on("data", (e) => {
@@ -163,7 +163,7 @@ function Y(a) {
163
163
  }), a.on("error", () => n(null));
164
164
  });
165
165
  }
166
- function I(a, n, o) {
166
+ function F(a, n, o) {
167
167
  const e = "\0okno:";
168
168
  let s;
169
169
  if (n.startsWith("pages/") ? s = e + "pages" : n.startsWith("collections/") ? s = e + "collections" : n.startsWith("globals/") && (s = e + "globals"), s) {
@@ -175,8 +175,8 @@ function I(a, n, o) {
175
175
  });
176
176
  }
177
177
  }
178
- const Z = "okno:", O = "\0okno:", L = R(U(import.meta.url)), k = y(L, "../../editor"), Q = y(L, "../runtime");
179
- function ct(a = {}) {
178
+ const X = "okno:", T = "\0okno:", Y = E(G(import.meta.url)), Z = I(Y, "../runtime");
179
+ function lt(a = {}) {
180
180
  const n = a.dir ?? "okno";
181
181
  let o, e;
182
182
  return a.isEditor, {
@@ -202,36 +202,24 @@ function ct(a = {}) {
202
202
  `**/${n}/files/**`
203
203
  ]
204
204
  }
205
- },
206
- resolve: {
207
- alias: {
208
- "@modules": y(k, "modules"),
209
- "@lib": y(k, "lib"),
210
- "@controllers": y(k, "controllers"),
211
- "@components": y(k, "components"),
212
- "@pages": y(k, "pages"),
213
- "@assets": y(k, "assets"),
214
- "@/types": y(k, "lib/types"),
215
- "@logger": y(k, "lib/logger.svelte")
216
- }
217
205
  }
218
206
  };
219
207
  },
220
208
  configResolved(s) {
221
- o = s.root, e = y(o, n);
209
+ o = s.root, e = I(o, n);
222
210
  },
223
211
  async buildStart() {
224
- $(e) && await E(e);
212
+ $(e) && await C(e);
225
213
  },
226
214
  configureServer(s) {
227
- z(s, e);
215
+ B(s, e);
228
216
  },
229
217
  async handleHotUpdate(s) {
230
218
  const l = u(e, "schema.ts"), c = u(e, "users.json"), r = u(e, "permissions.ts"), t = u(e, "modules.d.ts");
231
219
  if (s.file === l) {
232
- await E(e);
220
+ await C(e);
233
221
  for (const i of ["pages", "collections", "globals"]) {
234
- const p = s.server.moduleGraph.getModuleById(O + i);
222
+ const p = s.server.moduleGraph.getModuleById(T + i);
235
223
  p && s.server.moduleGraph.invalidateModule(p);
236
224
  }
237
225
  return [];
@@ -240,33 +228,33 @@ function ct(a = {}) {
240
228
  return [];
241
229
  },
242
230
  resolveId(s) {
243
- if (s.startsWith(Z))
231
+ if (s.startsWith(X))
244
232
  return "\0" + s;
245
233
  },
246
234
  async load(s) {
247
- if (!s.startsWith(O)) return;
248
- const l = s.slice(O.length);
235
+ if (!s.startsWith(T)) return;
236
+ const l = s.slice(T.length);
249
237
  if (l === "runtime")
250
- return `export { __oknoWrap } from "${u(Q, "wrap.ts")}"`;
238
+ return `export { __oknoWrap } from "${u(Z, "wrap.ts")}"`;
251
239
  if (l === "pages") {
252
- const c = await j(o, "pages");
253
- return await et(e, c);
240
+ const c = await W(o, "pages");
241
+ return await tt(e, c);
254
242
  }
255
243
  if (l === "collections") {
256
- const c = await j(o, "collections");
257
- return await ot(e, c);
244
+ const c = await W(o, "collections");
245
+ return await et(e, c);
258
246
  }
259
247
  if (l === "globals") {
260
- const c = await j(o, "globals");
261
- return await nt(e, c);
248
+ const c = await W(o, "globals");
249
+ return await ot(e, c);
262
250
  }
263
251
  }
264
252
  };
265
253
  }
266
- async function N(a) {
267
- return $(a) ? (await v(a)).filter((o) => o.endsWith(".ts") && o !== "index.ts") : [];
254
+ async function v(a) {
255
+ return $(a) ? (await y(a)).filter((o) => o.endsWith(".ts") && o !== "index.ts") : [];
268
256
  }
269
- const q = /* @__PURE__ */ new Set([".astro", ".svelte", ".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue"]), tt = /* @__PURE__ */ new Set([
257
+ const Q = /* @__PURE__ */ new Set([".astro", ".svelte", ".ts", ".tsx", ".js", ".jsx", ".mjs", ".vue"]), q = /* @__PURE__ */ new Set([
270
258
  "node_modules",
271
259
  ".astro",
272
260
  ".svelte-kit",
@@ -278,18 +266,18 @@ const q = /* @__PURE__ */ new Set([".astro", ".svelte", ".ts", ".tsx", ".js", ".
278
266
  ".git",
279
267
  ".turbo"
280
268
  ]);
281
- async function j(a, n) {
269
+ async function W(a, n) {
282
270
  const o = new RegExp(`import\\s*\\{([^}]+)\\}\\s*from\\s*["']okno:${n}["']`, "g"), e = /* @__PURE__ */ new Set();
283
271
  async function s(l) {
284
272
  var r;
285
273
  let c;
286
274
  try {
287
- c = await v(l, { withFileTypes: !0 });
275
+ c = await y(l, { withFileTypes: !0 });
288
276
  } catch {
289
277
  return;
290
278
  }
291
279
  for (const t of c) {
292
- if (t.name.startsWith(".") && t.name !== "." || tt.has(t.name)) continue;
280
+ if (t.name.startsWith(".") && t.name !== "." || q.has(t.name)) continue;
293
281
  const i = u(l, t.name);
294
282
  if (t.isDirectory()) {
295
283
  await s(i);
@@ -298,10 +286,10 @@ async function j(a, n) {
298
286
  const p = t.name.lastIndexOf(".");
299
287
  if (p === -1) continue;
300
288
  const m = t.name.slice(p);
301
- if (!q.has(m)) continue;
289
+ if (!Q.has(m)) continue;
302
290
  let f;
303
291
  try {
304
- f = await A(i, "utf-8");
292
+ f = await J(i, "utf-8");
305
293
  } catch {
306
294
  continue;
307
295
  }
@@ -317,25 +305,25 @@ async function j(a, n) {
317
305
  }
318
306
  return await s(a), e;
319
307
  }
320
- function S(a) {
308
+ function N(a) {
321
309
  return a.replace(".ts", "").replace(/-/g, "_");
322
310
  }
323
- function x(a) {
311
+ function S(a) {
324
312
  return a.replace(".ts", "").replace(/-/g, "_");
325
313
  }
326
- function C(a) {
314
+ function O(a) {
327
315
  return a.replace(".ts", "");
328
316
  }
329
- async function et(a, n = /* @__PURE__ */ new Set()) {
317
+ async function tt(a, n = /* @__PURE__ */ new Set()) {
330
318
  const o = u(a, "pages"), e = [
331
319
  'import { __oknoWrap } from "okno:runtime"'
332
320
  ], s = /* @__PURE__ */ new Set();
333
321
  if ($(o)) {
334
- const c = (await v(o, { withFileTypes: !0 })).filter((t) => t.isDirectory()).map((t) => t.name);
322
+ const c = (await y(o, { withFileTypes: !0 })).filter((t) => t.isDirectory()).map((t) => t.name);
335
323
  if (c.length > 0) {
336
- const t = c[0], i = await N(u(o, t));
324
+ const t = c[0], i = await v(u(o, t));
337
325
  for (const p of i) {
338
- const m = S(p), f = x(p), d = [], h = [];
326
+ const m = N(p), f = S(p), d = [], h = [];
339
327
  for (const g of c) {
340
328
  const w = u(o, g, p);
341
329
  if ($(w)) {
@@ -346,9 +334,9 @@ async function et(a, n = /* @__PURE__ */ new Set()) {
346
334
  e.push(...d), e.push(`const _${m} = { ${h.join(", ")} }`), e.push(`export const ${f} = __oknoWrap(_${m}, "${f}")`), s.add(f);
347
335
  }
348
336
  } else {
349
- const t = await N(o);
337
+ const t = await v(o);
350
338
  for (const i of t) {
351
- const p = S(i), m = x(i), f = C(i), d = u(o, i);
339
+ const p = N(i), m = S(i), f = O(i), d = u(o, i);
352
340
  e.push(`import _${p} from "${d}"`), e.push(`export const ${m} = __oknoWrap(_${p}, "${f}")`), s.add(m);
353
341
  }
354
342
  }
@@ -358,7 +346,7 @@ async function et(a, n = /* @__PURE__ */ new Set()) {
358
346
  return e.join(`
359
347
  `);
360
348
  }
361
- async function ot(a, n = /* @__PURE__ */ new Set()) {
349
+ async function et(a, n = /* @__PURE__ */ new Set()) {
362
350
  const o = u(a, "collections");
363
351
  if (!$(o)) {
364
352
  const t = [];
@@ -369,7 +357,7 @@ async function ot(a, n = /* @__PURE__ */ new Set()) {
369
357
  return t.join(`
370
358
  `) || "export {}";
371
359
  }
372
- const e = await v(o, { withFileTypes: !0 }), s = e.filter((t) => t.isDirectory() && /^[a-z]{2}(-[a-z]{2})?$/.test(t.name)).map((t) => t.name), l = e.filter((t) => t.isDirectory() && !s.includes(t.name)).map((t) => t.name), c = s.length > 0, r = [
360
+ const e = await y(o, { withFileTypes: !0 }), s = e.filter((t) => t.isDirectory() && /^[a-z]{2}(-[a-z]{2})?$/.test(t.name)).map((t) => t.name), l = e.filter((t) => t.isDirectory() && !s.includes(t.name)).map((t) => t.name), c = s.length > 0, r = [
373
361
  'import { __oknoWrap } from "okno:runtime"'
374
362
  ];
375
363
  if (c) {
@@ -377,14 +365,14 @@ async function ot(a, n = /* @__PURE__ */ new Set()) {
377
365
  for (const i of l) {
378
366
  const p = u(o, t, i);
379
367
  if (!$(p)) continue;
380
- const m = await N(p), f = [];
368
+ const m = await v(p), f = [];
381
369
  for (const d of m) {
382
- const h = `_${i}_${S(d)}`, g = x(d), w = [], _ = [];
383
- for (const P of s) {
384
- const F = u(o, P, i, d);
385
- if ($(F)) {
386
- const T = `${h}_${P}`;
387
- w.push(`import ${T} from "${F}"`), P === t ? _.push(`...${T}`) : _.push(`${P}: { ...${h}_${t}, ...${T} }`);
370
+ const h = `_${i}_${N(d)}`, g = S(d), w = [], _ = [];
371
+ for (const b of s) {
372
+ const j = u(o, b, i, d);
373
+ if ($(j)) {
374
+ const x = `${h}_${b}`;
375
+ w.push(`import ${x} from "${j}"`), b === t ? _.push(`...${x}`) : _.push(`${b}: { ...${h}_${t}, ...${x} }`);
388
376
  }
389
377
  }
390
378
  r.push(...w), r.push(`const ${h} = { ${_.join(", ")} }`), f.push(`__oknoWrap(${h}, "${i}.${g}")`);
@@ -393,9 +381,9 @@ async function ot(a, n = /* @__PURE__ */ new Set()) {
393
381
  }
394
382
  } else
395
383
  for (const t of l) {
396
- const i = u(o, t), p = await N(i), m = [], f = t.replace(/-/g, "_");
384
+ const i = u(o, t), p = await v(i), m = [], f = t.replace(/-/g, "_");
397
385
  for (const d of p) {
398
- const h = `_${f}_${S(d)}`, g = C(d);
386
+ const h = `_${f}_${N(d)}`, g = O(d);
399
387
  r.push(`import ${h} from "${u(i, d)}"`), m.push(`__oknoWrap(${h}, "${t}.${g}")`);
400
388
  }
401
389
  r.push(`export const ${f} = [${m.join(", ")}]`);
@@ -403,16 +391,16 @@ async function ot(a, n = /* @__PURE__ */ new Set()) {
403
391
  return r.join(`
404
392
  `);
405
393
  }
406
- async function nt(a, n = /* @__PURE__ */ new Set()) {
394
+ async function ot(a, n = /* @__PURE__ */ new Set()) {
407
395
  const o = u(a, "globals"), e = [
408
396
  'import { __oknoWrap } from "okno:runtime"'
409
397
  ], s = /* @__PURE__ */ new Set();
410
398
  if ($(o)) {
411
- const c = (await v(o, { withFileTypes: !0 })).filter((t) => t.isDirectory()).map((t) => t.name);
399
+ const c = (await y(o, { withFileTypes: !0 })).filter((t) => t.isDirectory()).map((t) => t.name);
412
400
  if (c.length > 0) {
413
- const t = c[0], i = await N(u(o, t));
401
+ const t = c[0], i = await v(u(o, t));
414
402
  for (const p of i) {
415
- const m = S(p), f = x(p), d = [], h = [];
403
+ const m = N(p), f = S(p), d = [], h = [];
416
404
  for (const g of c) {
417
405
  const w = u(o, g, p);
418
406
  if ($(w)) {
@@ -423,9 +411,9 @@ async function nt(a, n = /* @__PURE__ */ new Set()) {
423
411
  e.push(...d), e.push(`const _${m} = { ${h.join(", ")} }`), e.push(`export const ${f} = __oknoWrap(_${m}, "${f}")`), s.add(f);
424
412
  }
425
413
  } else {
426
- const t = await N(o);
414
+ const t = await v(o);
427
415
  for (const i of t) {
428
- const p = S(i), m = x(i), f = C(i), d = u(o, i);
416
+ const p = N(i), m = S(i), f = O(i), d = u(o, i);
429
417
  e.push(`import _${p} from "${d}"`), e.push(`export const ${m} = __oknoWrap(_${p}, "${f}")`), s.add(m);
430
418
  }
431
419
  }
@@ -436,5 +424,5 @@ async function nt(a, n = /* @__PURE__ */ new Set()) {
436
424
  `);
437
425
  }
438
426
  export {
439
- ct as o
427
+ lt as o
440
428
  };
@@ -1,4 +1,4 @@
1
- import { o as a } from "../plugin-Cwwh6E1P.js";
1
+ import { o as a } from "../plugin-rPgNLY_g.js";
2
2
  export {
3
3
  a as okno
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAepD,wBAAgB,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,MAAM,CAqHpD"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vite/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAcpD,wBAAgB,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,MAAM,CAyGpD"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "okno",
3
3
  "description": "Git-backed CMS with live editing for any Vite framework",
4
4
  "author": "Gabriel Uhlíř",
5
- "version": "1.0.0-alpha.2",
5
+ "version": "1.0.0-alpha.4",
6
6
  "homepage": "https://okno.build",
7
7
  "type": "module",
8
8
  "types": "./dist/index.d.ts",
@@ -10,15 +10,15 @@
10
10
  "module": "./dist/index.js",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./src/index.ts",
13
+ "types": "./dist/index.d.ts",
14
14
  "default": "./dist/index.js"
15
15
  },
16
16
  "./vite": {
17
- "import": "./src/vite/index.ts",
17
+ "types": "./dist/vite/index.d.ts",
18
18
  "default": "./dist/vite/index.js"
19
19
  },
20
20
  "./editor": {
21
- "import": "./editor/index.ts",
21
+ "types": "./dist/editor/index.d.ts",
22
22
  "default": "./dist/editor/index.js"
23
23
  }
24
24
  },