@maizzle/framework 6.0.0-rc.13 → 6.0.0-rc.15

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 (79) hide show
  1. package/dist/components/Button.vue +2 -2
  2. package/dist/components/CodeBlock.vue +2 -1
  3. package/dist/components/Column.vue +28 -22
  4. package/dist/components/Container.vue +47 -9
  5. package/dist/components/Font.vue +96 -0
  6. package/dist/components/Head.vue +1 -1
  7. package/dist/components/Layout.vue +24 -4
  8. package/dist/components/Outlook.vue +38 -11
  9. package/dist/components/Overlap.vue +75 -18
  10. package/dist/components/Row.vue +90 -19
  11. package/dist/components/Section.vue +35 -8
  12. package/dist/components/utils.d.mts +14 -1
  13. package/dist/components/utils.d.mts.map +1 -1
  14. package/dist/components/utils.mjs +32 -1
  15. package/dist/components/utils.mjs.map +1 -1
  16. package/dist/components/utils.ts +39 -0
  17. package/dist/composables/renderContext.d.mts +8 -1
  18. package/dist/composables/renderContext.d.mts.map +1 -1
  19. package/dist/composables/renderContext.mjs.map +1 -1
  20. package/dist/composables/useFont.d.mts +50 -0
  21. package/dist/composables/useFont.d.mts.map +1 -0
  22. package/dist/composables/useFont.mjs +93 -0
  23. package/dist/composables/useFont.mjs.map +1 -0
  24. package/dist/index.d.mts +3 -1
  25. package/dist/index.mjs +3 -1
  26. package/dist/plugins/postcss/quoteFontFamilies.d.mts +13 -0
  27. package/dist/plugins/postcss/quoteFontFamilies.d.mts.map +1 -0
  28. package/dist/plugins/postcss/quoteFontFamilies.mjs +84 -0
  29. package/dist/plugins/postcss/quoteFontFamilies.mjs.map +1 -0
  30. package/dist/prepare.d.mts +17 -0
  31. package/dist/prepare.d.mts.map +1 -0
  32. package/dist/prepare.mjs +44 -0
  33. package/dist/prepare.mjs.map +1 -0
  34. package/dist/render/createRenderer.d.mts.map +1 -1
  35. package/dist/render/createRenderer.mjs +10 -2
  36. package/dist/render/createRenderer.mjs.map +1 -1
  37. package/dist/render/injectFonts.d.mts +15 -0
  38. package/dist/render/injectFonts.d.mts.map +1 -0
  39. package/dist/render/injectFonts.mjs +46 -0
  40. package/dist/render/injectFonts.mjs.map +1 -0
  41. package/dist/render/plugins/rowSourceLocation.d.mts +18 -0
  42. package/dist/render/plugins/rowSourceLocation.d.mts.map +1 -0
  43. package/dist/render/plugins/rowSourceLocation.mjs +45 -0
  44. package/dist/render/plugins/rowSourceLocation.mjs.map +1 -0
  45. package/dist/serve.d.mts.map +1 -1
  46. package/dist/serve.mjs +6 -2
  47. package/dist/serve.mjs.map +1 -1
  48. package/dist/server/ui/App.vue +25 -11
  49. package/dist/server/ui/lib/emulated-dark-mode.ts +131 -0
  50. package/dist/server/ui/pages/Preview.vue +24 -5
  51. package/dist/transformers/columnWidth.d.mts +31 -0
  52. package/dist/transformers/columnWidth.d.mts.map +1 -0
  53. package/dist/transformers/columnWidth.mjs +166 -0
  54. package/dist/transformers/columnWidth.mjs.map +1 -0
  55. package/dist/transformers/filters/index.mjs +1 -1
  56. package/dist/transformers/filters/index.mjs.map +1 -1
  57. package/dist/transformers/index.d.mts.map +1 -1
  58. package/dist/transformers/index.mjs +5 -1
  59. package/dist/transformers/index.mjs.map +1 -1
  60. package/dist/transformers/msoWidthFromClass.d.mts +19 -0
  61. package/dist/transformers/msoWidthFromClass.d.mts.map +1 -0
  62. package/dist/transformers/msoWidthFromClass.mjs +61 -0
  63. package/dist/transformers/msoWidthFromClass.mjs.map +1 -0
  64. package/dist/transformers/tailwindcss.d.mts.map +1 -1
  65. package/dist/transformers/tailwindcss.mjs +4 -12
  66. package/dist/transformers/tailwindcss.mjs.map +1 -1
  67. package/dist/utils/decodeStyleEntities.d.mts +15 -0
  68. package/dist/utils/decodeStyleEntities.d.mts.map +1 -0
  69. package/dist/utils/decodeStyleEntities.mjs +18 -0
  70. package/dist/utils/decodeStyleEntities.mjs.map +1 -0
  71. package/node_modules/maizzle/dist/commands/new.mjs +3 -3
  72. package/node_modules/maizzle/dist/index.d.mts +1 -0
  73. package/node_modules/maizzle/dist/index.mjs +3 -0
  74. package/node_modules/maizzle/package.json +3 -2
  75. package/node_modules/nypm/dist/cli.mjs +28 -5
  76. package/node_modules/nypm/dist/index.d.mts +0 -8
  77. package/node_modules/nypm/dist/index.mjs +27 -4
  78. package/node_modules/nypm/package.json +12 -12
  79. package/package.json +2 -1
@@ -8,7 +8,7 @@ import { existsSync } from "node:fs";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { join as join$1 } from "node:path";
10
10
  var name = "nypm";
11
- var version = "0.6.4";
11
+ var version = "0.6.5";
12
12
  var description = "Unified Package Manager for Node.js";
13
13
  const packageManagers = [
14
14
  {
@@ -86,11 +86,32 @@ async function findup(cwd, match, options = {}) {
86
86
  segments.pop();
87
87
  }
88
88
  }
89
- async function readPackageJSON(cwd) {
89
+ async function readPackageJSON(cwd, options = {}) {
90
90
  return findup(cwd, (p) => {
91
91
  const pkgPath = join$1(p, "package.json");
92
92
  if (existsSync(pkgPath)) return readFile(pkgPath, "utf8").then((data) => JSON.parse(data));
93
- });
93
+ }, options);
94
+ }
95
+ async function readInstalledPackageJSON(pkgName, cwd) {
96
+ const pkgJSONPath = await findup(cwd, (p) => {
97
+ const candidate = join$1(p, "node_modules", pkgName, "package.json");
98
+ if (existsSync(candidate)) return candidate;
99
+ }, { includeParentDirs: true });
100
+ if (!pkgJSONPath) return null;
101
+ try {
102
+ return JSON.parse(await readFile(pkgJSONPath, "utf8"));
103
+ } catch {
104
+ return null;
105
+ }
106
+ }
107
+ async function readPackageJSONFromResolver(requireFn, pkgName) {
108
+ let resolved;
109
+ try {
110
+ resolved = requireFn.resolve(pkgName);
111
+ } catch {
112
+ return null;
113
+ }
114
+ return readPackageJSON(resolved, { includeParentDirs: true });
94
115
  }
95
116
  function cached(fn) {
96
117
  let v;
@@ -222,8 +243,10 @@ async function addDependency(name, options = {}) {
222
243
  const _require = createRequire(join$1(resolvedOptions.cwd, "/_.js"));
223
244
  for (const _name of names) {
224
245
  const pkgName = _name.match(/^(.[^@]+)/)?.[0];
225
- const pkg = await readPackageJSON(_require.resolve(pkgName));
226
- if (!pkg?.peerDependencies || pkg?.name !== pkgName) continue;
246
+ if (!pkgName) continue;
247
+ let pkg = await readPackageJSONFromResolver(_require, pkgName);
248
+ if (pkg?.name !== pkgName) pkg = await readInstalledPackageJSON(pkgName, resolvedOptions.cwd);
249
+ if (!pkg?.peerDependencies) continue;
227
250
  for (const [peerDependency, version] of Object.entries(pkg.peerDependencies)) {
228
251
  if (pkg.peerDependenciesMeta?.[peerDependency]?.optional) continue;
229
252
  if (existingPkg?.dependencies?.[peerDependency] || existingPkg?.devDependencies?.[peerDependency]) continue;
@@ -1,4 +1,3 @@
1
- //#region src/types.d.ts
2
1
  type PackageManagerName = "npm" | "yarn" | "pnpm" | "bun" | "deno";
3
2
  type PackageManager = {
4
3
  name: PackageManagerName;
@@ -27,8 +26,6 @@ type OperationResult = {
27
26
  args: string[];
28
27
  };
29
28
  };
30
- //#endregion
31
- //#region src/package-manager.d.ts
32
29
  type DetectPackageManagerOptions = {
33
30
  /**
34
31
  * Whether to ignore the lock file
@@ -64,8 +61,6 @@ declare const packageManagers: PackageManager[];
64
61
  declare function detectPackageManager(cwd: string, options?: DetectPackageManagerOptions): Promise<(PackageManager & {
65
62
  warnings?: string[];
66
63
  }) | undefined>;
67
- //#endregion
68
- //#region src/api.d.ts
69
64
  /**
70
65
  * Installs project dependencies.
71
66
  *
@@ -172,8 +167,6 @@ declare function dlx(name: string, options?: Pick<OperationOptions, "cwd" | "env
172
167
  short?: boolean;
173
168
  packages?: string[];
174
169
  }): Promise<OperationResult>;
175
- //#endregion
176
- //#region src/cmd.d.ts
177
170
  /**
178
171
  * Get the command to install dependencies with the package manager.
179
172
  */
@@ -205,5 +198,4 @@ declare function dlxCommand(packageManager: PackageManagerName, name: string, op
205
198
  short?: boolean;
206
199
  packages?: string[];
207
200
  }): string;
208
- //#endregion
209
201
  export { DetectPackageManagerOptions, OperationOptions, OperationResult, PackageManager, PackageManagerName, addDependency, addDependencyCommand, addDevDependency, dedupeDependencies, detectPackageManager, dlx, dlxCommand, ensureDependencyInstalled, installDependencies, installDependenciesCommand, packageManagers, removeDependency, runScript, runScriptCommand };
@@ -13,11 +13,32 @@ async function findup(cwd, match, options = {}) {
13
13
  segments.pop();
14
14
  }
15
15
  }
16
- async function readPackageJSON(cwd) {
16
+ async function readPackageJSON(cwd, options = {}) {
17
17
  return findup(cwd, (p) => {
18
18
  const pkgPath = join$1(p, "package.json");
19
19
  if (existsSync(pkgPath)) return readFile(pkgPath, "utf8").then((data) => JSON.parse(data));
20
- });
20
+ }, options);
21
+ }
22
+ async function readInstalledPackageJSON(pkgName, cwd) {
23
+ const pkgJSONPath = await findup(cwd, (p) => {
24
+ const candidate = join$1(p, "node_modules", pkgName, "package.json");
25
+ if (existsSync(candidate)) return candidate;
26
+ }, { includeParentDirs: true });
27
+ if (!pkgJSONPath) return null;
28
+ try {
29
+ return JSON.parse(await readFile(pkgJSONPath, "utf8"));
30
+ } catch {
31
+ return null;
32
+ }
33
+ }
34
+ async function readPackageJSONFromResolver(requireFn, pkgName) {
35
+ let resolved;
36
+ try {
37
+ resolved = requireFn.resolve(pkgName);
38
+ } catch {
39
+ return null;
40
+ }
41
+ return readPackageJSON(resolved, { includeParentDirs: true });
21
42
  }
22
43
  function cached(fn) {
23
44
  let v;
@@ -307,8 +328,10 @@ async function addDependency(name, options = {}) {
307
328
  const _require = createRequire(join$1(resolvedOptions.cwd, "/_.js"));
308
329
  for (const _name of names) {
309
330
  const pkgName = _name.match(/^(.[^@]+)/)?.[0];
310
- const pkg = await readPackageJSON(_require.resolve(pkgName));
311
- if (!pkg?.peerDependencies || pkg?.name !== pkgName) continue;
331
+ if (!pkgName) continue;
332
+ let pkg = await readPackageJSONFromResolver(_require, pkgName);
333
+ if (pkg?.name !== pkgName) pkg = await readInstalledPackageJSON(pkgName, resolvedOptions.cwd);
334
+ if (!pkg?.peerDependencies) continue;
312
335
  for (const [peerDependency, version] of Object.entries(pkg.peerDependencies)) {
313
336
  if (pkg.peerDependenciesMeta?.[peerDependency]?.optional) continue;
314
337
  if (existingPkg?.dependencies?.[peerDependency] || existingPkg?.devDependencies?.[peerDependency]) continue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nypm",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Unified Package Manager for Node.js",
5
5
  "license": "MIT",
6
6
  "repository": "unjs/nypm",
@@ -18,25 +18,25 @@
18
18
  ".": "./dist/index.mjs"
19
19
  },
20
20
  "dependencies": {
21
- "citty": "^0.2.0",
21
+ "citty": "^0.2.2",
22
22
  "pathe": "^2.0.3",
23
- "tinyexec": "^1.0.2"
23
+ "tinyexec": "^1.1.1"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^25.2.1",
27
- "@typescript/native-preview": "^7.0.0-dev.20260205.1",
28
- "@vitest/coverage-v8": "^4.0.18",
26
+ "@types/node": "^25.6.0",
27
+ "@typescript/native-preview": "^7.0.0-dev.20260424.1",
28
+ "@vitest/coverage-v8": "^4.1.5",
29
29
  "automd": "^0.4.3",
30
30
  "changelogen": "^0.6.2",
31
31
  "eslint-config-unjs": "^0.6.2",
32
- "obuild": "^0.4.22",
33
- "oxfmt": "^0.28.0",
34
- "oxlint": "^1.43.0",
32
+ "obuild": "^0.4.33",
33
+ "oxfmt": "^0.46.0",
34
+ "oxlint": "^1.61.0",
35
35
  "pkg-types": "^2.3.0",
36
- "std-env": "^3.10.0",
37
- "typescript": "^5.9.3",
36
+ "std-env": "^4.1.0",
37
+ "typescript": "^6.0.3",
38
38
  "ufo": "^1.6.3",
39
- "vitest": "^4.0.18"
39
+ "vitest": "^4.1.5"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=18"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "6.0.0-rc.13",
3
+ "version": "6.0.0-rc.15",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,6 +43,7 @@
43
43
  "clsx": "^2.1.1",
44
44
  "color-shorthand-hex-to-six-digit": "^5.1.3",
45
45
  "css-select": "^7.0.0",
46
+ "culori": "^4.0.2",
46
47
  "defu": "^6.1.4",
47
48
  "dom-serializer": "^3.0.0",
48
49
  "domhandler": "^6.0.1",