@autono/open-pages 0.8.0 → 0.9.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.
- package/dist/{build-CCoxDxL-.js → build-Cpod-K9R.js} +9 -4
- package/dist/cli/bin.js +5 -5
- package/dist/{config-D_U_aCQz.js → config-CYLBzMMb.js} +1077 -18
- package/dist/{config-p-TWNXbv.d.ts → config-IkwICvOe.d.ts} +2 -1
- package/dist/{dev-CTrB263u.js → dev-B7x-G-wk.js} +1 -1
- package/dist/{export-enKL9R7x.js → export-BxMksWEc.js} +74 -12
- package/dist/index.d.ts +23 -3
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +96 -0
- package/dist/{preview-Dmzyd1cf.js → preview-CMv1lGOC.js} +1 -1
- package/dist/{types-DDdUFUIS.d.ts → types-B-9WXL93.d.ts} +24 -0
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/skills/apply-comments/SKILL.md +6 -4
- package/skills/create-email/SKILL.md +166 -0
- package/skills/create-theme/SKILL.md +31 -7
- package/skills/create-theme/references/email-theme-from-css.mjs +185 -0
- package/skills/create-theme/references/email-theme.md +48 -0
- package/skills/current-page/SKILL.md +3 -3
- package/src/app/app.tsx +4 -0
- package/src/app/components/command/home-command-menu.tsx +19 -2
- package/src/app/components/selection-note.tsx +71 -0
- package/src/app/components/sidebar/folder-item.tsx +9 -2
- package/src/app/components/sidebar/sidebar.tsx +10 -0
- package/src/app/frame/email-inspect.ts +17 -0
- package/src/app/lib/emails.ts +17 -0
- package/src/app/lib/frame.ts +15 -4
- package/src/app/lib/page-thumb.tsx +11 -3
- package/src/app/lib/sdk.ts +22 -0
- package/src/app/routes/email.tsx +424 -0
- package/src/app/routes/emails.tsx +94 -0
- package/src/app/routes/home-shell.tsx +21 -2
- package/src/app/routes/page.tsx +9 -50
- package/src/app/virtual.d.ts +10 -0
- package/src/locale/en.ts +25 -0
- package/src/locale/ja.ts +25 -0
- package/src/locale/types.ts +24 -0
- package/src/locale/zh-cn.ts +25 -0
- package/src/locale/zh-tw.ts +25 -0
- package/workspace/components.json +3 -1
- package/workspace/styles/globals.css +8 -2
- package/dist/open-pages-plugin-C8cFhMB9.js +0 -662
- package/dist/version-DZrXLoAD.js +0 -42
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as findEmails, l as findPages, n as readCoreVersion, t as createViteConfig, u as loadUserConfig } from "./config-CYLBzMMb.js";
|
|
2
2
|
import { r as printHeader, t as createCliLogger } from "./cli/bin.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as createViteConfig } from "./config-D_U_aCQz.js";
|
|
5
|
-
import { buildPage } from "./export-enKL9R7x.js";
|
|
3
|
+
import { buildPage, exportEmails } from "./export-BxMksWEc.js";
|
|
6
4
|
import path from "node:path";
|
|
7
5
|
import { build as build$1, mergeConfig } from "vite";
|
|
8
6
|
//#region src/cli/build.ts
|
|
@@ -31,6 +29,13 @@ async function build(opts = {}) {
|
|
|
31
29
|
outDir: path.join(outDir, "__page", entry.id),
|
|
32
30
|
base: `${siteBase.replace(/\/$/, "")}/__page/${entry.id}/`
|
|
33
31
|
});
|
|
32
|
+
const emails = await findEmails(userCwd, config.emailsDir ?? "emails");
|
|
33
|
+
await exportEmails({
|
|
34
|
+
userCwd,
|
|
35
|
+
config,
|
|
36
|
+
entries: emails,
|
|
37
|
+
outDir: path.join(outDir, "__email")
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
//#endregion
|
|
36
41
|
export { build };
|
package/dist/cli/bin.js
CHANGED
|
@@ -458,22 +458,22 @@ async function run(argv) {
|
|
|
458
458
|
program.command("dev").description("Start the dev server").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").option("--no-skills-check", "skip the built-in skills drift check").action(async (flags) => {
|
|
459
459
|
if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
|
|
460
460
|
await assertViteResolvesToCore();
|
|
461
|
-
const { dev } = await import("../dev-
|
|
461
|
+
const { dev } = await import("../dev-B7x-G-wk.js");
|
|
462
462
|
await dev(flags);
|
|
463
463
|
});
|
|
464
464
|
program.command("build").description("Build the workspace as a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
|
|
465
465
|
await assertViteResolvesToCore();
|
|
466
|
-
const { build } = await import("../build-
|
|
466
|
+
const { build } = await import("../build-Cpod-K9R.js");
|
|
467
467
|
await build(flags);
|
|
468
468
|
});
|
|
469
469
|
program.command("preview").description("Preview the production build").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").action(async (flags) => {
|
|
470
470
|
await assertViteResolvesToCore();
|
|
471
|
-
const { preview } = await import("../preview-
|
|
471
|
+
const { preview } = await import("../preview-CMv1lGOC.js");
|
|
472
472
|
await preview(flags);
|
|
473
473
|
});
|
|
474
|
-
program.command("export").description("Build pages into
|
|
474
|
+
program.command("export").description("Build pages and emails into static folders (one per id)").argument("[pages...]", "page or email ids to export (default: all)").option("--out-dir <dir>", "output directory (defaults to `export`)").action(async (pages, flags) => {
|
|
475
475
|
await assertViteResolvesToCore();
|
|
476
|
-
const { exportPages } = await import("../export-
|
|
476
|
+
const { exportPages } = await import("../export-BxMksWEc.js");
|
|
477
477
|
await exportPages({
|
|
478
478
|
pages,
|
|
479
479
|
outDir: flags.outDir
|