@autono/open-pages 0.7.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.
Files changed (47) hide show
  1. package/dist/{build-CCoxDxL-.js → build-Cpod-K9R.js} +9 -4
  2. package/dist/cli/bin.js +7 -7
  3. package/dist/{config-D_U_aCQz.js → config-CYLBzMMb.js} +1077 -18
  4. package/dist/{config-p-TWNXbv.d.ts → config-IkwICvOe.d.ts} +2 -1
  5. package/dist/{dev-CTrB263u.js → dev-B7x-G-wk.js} +1 -1
  6. package/dist/{export-enKL9R7x.js → export-BxMksWEc.js} +74 -12
  7. package/dist/index.d.ts +23 -3
  8. package/dist/locale/index.d.ts +1 -1
  9. package/dist/locale/index.js +96 -0
  10. package/dist/{preview-Dmzyd1cf.js → preview-CMv1lGOC.js} +1 -1
  11. package/dist/{types-DDdUFUIS.d.ts → types-B-9WXL93.d.ts} +24 -0
  12. package/dist/vite/index.d.ts +1 -1
  13. package/dist/vite/index.js +1 -1
  14. package/package.json +1 -1
  15. package/skills/apply-comments/SKILL.md +6 -3
  16. package/skills/create-email/SKILL.md +166 -0
  17. package/skills/create-page/SKILL.md +5 -1
  18. package/skills/create-theme/SKILL.md +33 -7
  19. package/skills/create-theme/references/email-theme-from-css.mjs +185 -0
  20. package/skills/create-theme/references/email-theme.md +48 -0
  21. package/skills/current-page/SKILL.md +3 -3
  22. package/skills/page-authoring/SKILL.md +3 -0
  23. package/skills/web-design-guidelines/SKILL.md +41 -0
  24. package/src/app/app.tsx +4 -0
  25. package/src/app/components/command/home-command-menu.tsx +19 -2
  26. package/src/app/components/selection-note.tsx +71 -0
  27. package/src/app/components/sidebar/folder-item.tsx +9 -2
  28. package/src/app/components/sidebar/sidebar.tsx +10 -0
  29. package/src/app/frame/email-inspect.ts +17 -0
  30. package/src/app/lib/emails.ts +17 -0
  31. package/src/app/lib/frame.ts +15 -4
  32. package/src/app/lib/page-thumb.tsx +11 -3
  33. package/src/app/lib/sdk.ts +22 -0
  34. package/src/app/routes/email.tsx +424 -0
  35. package/src/app/routes/emails.tsx +94 -0
  36. package/src/app/routes/home-shell.tsx +21 -2
  37. package/src/app/routes/page.tsx +21 -57
  38. package/src/app/virtual.d.ts +10 -0
  39. package/src/locale/en.ts +25 -0
  40. package/src/locale/ja.ts +25 -0
  41. package/src/locale/types.ts +24 -0
  42. package/src/locale/zh-cn.ts +25 -0
  43. package/src/locale/zh-tw.ts +25 -0
  44. package/workspace/components.json +3 -1
  45. package/workspace/styles/globals.css +8 -2
  46. package/dist/open-pages-plugin-C8cFhMB9.js +0 -662
  47. package/dist/version-DZrXLoAD.js +0 -42
@@ -1,8 +1,6 @@
1
- import { r as readCoreVersion } from "./version-DZrXLoAD.js";
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 { i as loadUserConfig, n as findPages } from "./open-pages-plugin-C8cFhMB9.js";
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
@@ -11,7 +11,7 @@ import { createHash } from "node:crypto";
11
11
  import * as readline$1 from "node:readline";
12
12
  import { stripVTControlCharacters } from "node:util";
13
13
  //#region src/cli/preflight.ts
14
- const PAGES_URL = "https://pages.openpages.sh/quickstart";
14
+ const DOCS_URL = "https://docs.openpages.sh/quickstart";
15
15
  const VITE_CONSUMERS = ["@vitejs/plugin-react", "@tailwindcss/vite"];
16
16
  const DEPENDENCY_FIELDS = [
17
17
  "dependencies",
@@ -116,7 +116,7 @@ function formatViteMismatch(mismatch, { cwd = process.cwd(), packageManager = "n
116
116
  ` ${chalk.dim("$")} ${chalk.cyan(cmd)}`,
117
117
  ""
118
118
  ];
119
- const footer = `${chalk.dim("Pages")} ${chalk.cyan.underline(PAGES_URL)}`;
119
+ const footer = `${chalk.dim("Docs")} ${chalk.cyan.underline(DOCS_URL)}`;
120
120
  if (!declaration) return [
121
121
  chalk.bold("Conflicting vite versions in node_modules"),
122
122
  "",
@@ -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-CTrB263u.js");
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-CCoxDxL-.js");
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-Dmzyd1cf.js");
471
+ const { preview } = await import("../preview-CMv1lGOC.js");
472
472
  await preview(flags);
473
473
  });
474
- program.command("export").description("Build pages into self-contained static folders (one per page)").argument("[pages...]", "page ids to export (default: all)").option("--out-dir <dir>", "output directory (defaults to `export`)").action(async (pages, flags) => {
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-enKL9R7x.js");
476
+ const { exportPages } = await import("../export-BxMksWEc.js");
477
477
  await exportPages({
478
478
  pages,
479
479
  outDir: flags.outDir