@maizzle/framework 6.1.1 → 6.1.3

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 (35) hide show
  1. package/dist/render/buildTemplate.js +1 -1
  2. package/dist/render/buildTemplate.js.map +1 -1
  3. package/dist/render/createRenderer.d.ts +7 -0
  4. package/dist/render/createRenderer.d.ts.map +1 -1
  5. package/dist/render/createRenderer.js +54 -2
  6. package/dist/render/createRenderer.js.map +1 -1
  7. package/dist/serve.d.ts.map +1 -1
  8. package/dist/serve.js +55 -6
  9. package/dist/serve.js.map +1 -1
  10. package/dist/server/ui/.vite/deps/_metadata.json +14 -14
  11. package/dist/server/ui/.vite/deps/reka-ui.js +273 -75
  12. package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
  13. package/dist/transformers/index.d.ts +1 -1
  14. package/dist/transformers/index.d.ts.map +1 -1
  15. package/dist/transformers/index.js +4 -4
  16. package/dist/transformers/index.js.map +1 -1
  17. package/dist/transformers/shorthandCss.d.ts +0 -22
  18. package/dist/transformers/shorthandCss.d.ts.map +1 -1
  19. package/dist/transformers/shorthandCss.js +36 -2
  20. package/dist/transformers/shorthandCss.js.map +1 -1
  21. package/dist/transformers/tailwindComponent.d.ts +1 -1
  22. package/dist/transformers/tailwindComponent.d.ts.map +1 -1
  23. package/dist/transformers/tailwindComponent.js +25 -7
  24. package/dist/transformers/tailwindComponent.js.map +1 -1
  25. package/dist/transformers/tailwindcss.d.ts +10 -3
  26. package/dist/transformers/tailwindcss.d.ts.map +1 -1
  27. package/dist/transformers/tailwindcss.js +30 -14
  28. package/dist/transformers/tailwindcss.js.map +1 -1
  29. package/dist/types/config.d.ts +11 -0
  30. package/dist/types/config.d.ts.map +1 -1
  31. package/dist/utils/watchPaths.d.ts +28 -1
  32. package/dist/utils/watchPaths.d.ts.map +1 -1
  33. package/dist/utils/watchPaths.js +38 -3
  34. package/dist/utils/watchPaths.js.map +1 -1
  35. package/package.json +3 -3
@@ -4,8 +4,35 @@
4
4
  * chokidar matches any of the given globs. Patterns are interpreted as
5
5
  * project-relative; a leading `./` is stripped so user-supplied globs like
6
6
  * `./locales/**` behave identically to `locales/**`.
7
+ *
8
+ * Negated patterns (`!…`) are excludes: a file matches when it matches an
9
+ * include pattern and no exclude pattern. They must not reach `matchesGlob`
10
+ * as-is — it treats a lone negated pattern as "everything except", which
11
+ * under `some()` would make the predicate true for almost every file.
7
12
  */
8
13
  declare function createWatchedFileMatcher(patterns: string[], cwd: string): (file: string) => boolean;
14
+ /**
15
+ * Derive the directories the dev server watcher must cover explicitly now
16
+ * that its Vite root is the dev UI directory, not the project cwd: the
17
+ * static prefixes of the content globs, component source dirs, the Maizzle
18
+ * root, and the static prefixes of the watch globs. Directories, not globs —
19
+ * the dev server runs with Vite's default `disableGlobbing`, so globs passed
20
+ * to `watcher.add` are treated literally.
21
+ *
22
+ * Negated patterns are excludes and produce no watch root. A watch pattern
23
+ * with no static prefix (a bare `*.json`, or a glob starting with `**`)
24
+ * deliberately falls back to `cwd`:
25
+ * it asks for project-wide matching, and only a project-wide watch can honor
26
+ * it. Content patterns cannot hit that fallback — they arrive from
27
+ * `resolveConfig` already resolved against the (absolute) root.
28
+ */
29
+ declare function deriveWatchRoots(options: {
30
+ content: string[];
31
+ componentDirs: string[];
32
+ root?: string;
33
+ watchPaths: string[];
34
+ cwd: string;
35
+ }): string[];
9
36
  //#endregion
10
- export { createWatchedFileMatcher };
37
+ export { createWatchedFileMatcher, deriveWatchRoots };
11
38
  //# sourceMappingURL=watchPaths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchPaths.d.ts","names":[],"sources":["../../src/utils/watchPaths.ts"],"mappings":";;;;;;;iBAQgB,yBAAyB,oBAAoB,eAEnD"}
1
+ {"version":3,"file":"watchPaths.d.ts","names":[],"sources":["../../src/utils/watchPaths.ts"],"mappings":";;;;;;;;;;;;iBAagB,yBAAyB,oBAAoB,eAInD;;;;;;;;;;;;;;;;iBAqBM,iBAAiB;EAC/B;EACA;EACA;EACA;EACA"}
@@ -5,15 +5,50 @@ import { matchesGlob, relative } from "pathe";
5
5
  * chokidar matches any of the given globs. Patterns are interpreted as
6
6
  * project-relative; a leading `./` is stripped so user-supplied globs like
7
7
  * `./locales/**` behave identically to `locales/**`.
8
+ *
9
+ * Negated patterns (`!…`) are excludes: a file matches when it matches an
10
+ * include pattern and no exclude pattern. They must not reach `matchesGlob`
11
+ * as-is — it treats a lone negated pattern as "everything except", which
12
+ * under `some()` would make the predicate true for almost every file.
8
13
  */
9
14
  function createWatchedFileMatcher(patterns, cwd) {
10
- const normalized = patterns.map((p) => p.replace(/^\.\//, ""));
15
+ const stripDotSlash = (p) => p.replace(/^\.\//, "");
16
+ const includes = patterns.filter((p) => !p.startsWith("!")).map(stripDotSlash);
17
+ const excludes = patterns.filter((p) => p.startsWith("!")).map((p) => stripDotSlash(p.slice(1)));
11
18
  return (file) => {
12
19
  const rel = relative(cwd, file);
13
- return normalized.some((p) => matchesGlob(rel, p));
20
+ return includes.some((p) => matchesGlob(rel, p)) && !excludes.some((p) => matchesGlob(rel, p));
14
21
  };
15
22
  }
23
+ /**
24
+ * Derive the directories the dev server watcher must cover explicitly now
25
+ * that its Vite root is the dev UI directory, not the project cwd: the
26
+ * static prefixes of the content globs, component source dirs, the Maizzle
27
+ * root, and the static prefixes of the watch globs. Directories, not globs —
28
+ * the dev server runs with Vite's default `disableGlobbing`, so globs passed
29
+ * to `watcher.add` are treated literally.
30
+ *
31
+ * Negated patterns are excludes and produce no watch root. A watch pattern
32
+ * with no static prefix (a bare `*.json`, or a glob starting with `**`)
33
+ * deliberately falls back to `cwd`:
34
+ * it asks for project-wide matching, and only a project-wide watch can honor
35
+ * it. Content patterns cannot hit that fallback — they arrive from
36
+ * `resolveConfig` already resolved against the (absolute) root.
37
+ */
38
+ function deriveWatchRoots(options) {
39
+ const { content, componentDirs, root, watchPaths, cwd } = options;
40
+ const globFreePrefix = (pattern) => {
41
+ const prefix = pattern.split(/[*?{[]|[+@!]\(/)[0];
42
+ return prefix.endsWith("/") ? prefix.slice(0, -1) : prefix;
43
+ };
44
+ return [...new Set([
45
+ ...content.filter((p) => !p.startsWith("!")).map(globFreePrefix),
46
+ ...componentDirs,
47
+ ...root ? [root] : [],
48
+ ...watchPaths.filter((p) => !p.startsWith("!")).map((p) => globFreePrefix(p) || cwd)
49
+ ].filter(Boolean))];
50
+ }
16
51
  //#endregion
17
- export { createWatchedFileMatcher };
52
+ export { createWatchedFileMatcher, deriveWatchRoots };
18
53
 
19
54
  //# sourceMappingURL=watchPaths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchPaths.js","names":[],"sources":["../../src/utils/watchPaths.ts"],"sourcesContent":["import { matchesGlob, relative } from 'pathe'\n\n/**\n * Build a predicate that tells whether an absolute file path emitted by\n * chokidar matches any of the given globs. Patterns are interpreted as\n * project-relative; a leading `./` is stripped so user-supplied globs like\n * `./locales/**` behave identically to `locales/**`.\n */\nexport function createWatchedFileMatcher(patterns: string[], cwd: string) {\n const normalized = patterns.map(p => p.replace(/^\\.\\//, ''))\n return (file: string) => {\n const rel = relative(cwd, file)\n return normalized.some(p => matchesGlob(rel, p))\n }\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,yBAAyB,UAAoB,KAAa;CACxE,MAAM,aAAa,SAAS,KAAI,MAAK,EAAE,QAAQ,SAAS,EAAE,CAAC;CAC3D,QAAQ,SAAiB;EACvB,MAAM,MAAM,SAAS,KAAK,IAAI;EAC9B,OAAO,WAAW,MAAK,MAAK,YAAY,KAAK,CAAC,CAAC;CACjD;AACF"}
1
+ {"version":3,"file":"watchPaths.js","names":[],"sources":["../../src/utils/watchPaths.ts"],"sourcesContent":["import { matchesGlob, relative } from 'pathe'\n\n/**\n * Build a predicate that tells whether an absolute file path emitted by\n * chokidar matches any of the given globs. Patterns are interpreted as\n * project-relative; a leading `./` is stripped so user-supplied globs like\n * `./locales/**` behave identically to `locales/**`.\n *\n * Negated patterns (`!…`) are excludes: a file matches when it matches an\n * include pattern and no exclude pattern. They must not reach `matchesGlob`\n * as-is — it treats a lone negated pattern as \"everything except\", which\n * under `some()` would make the predicate true for almost every file.\n */\nexport function createWatchedFileMatcher(patterns: string[], cwd: string) {\n const stripDotSlash = (p: string) => p.replace(/^\\.\\//, '')\n const includes = patterns.filter(p => !p.startsWith('!')).map(stripDotSlash)\n const excludes = patterns.filter(p => p.startsWith('!')).map(p => stripDotSlash(p.slice(1)))\n return (file: string) => {\n const rel = relative(cwd, file)\n return includes.some(p => matchesGlob(rel, p)) && !excludes.some(p => matchesGlob(rel, p))\n }\n}\n\n/**\n * Derive the directories the dev server watcher must cover explicitly now\n * that its Vite root is the dev UI directory, not the project cwd: the\n * static prefixes of the content globs, component source dirs, the Maizzle\n * root, and the static prefixes of the watch globs. Directories, not globs —\n * the dev server runs with Vite's default `disableGlobbing`, so globs passed\n * to `watcher.add` are treated literally.\n *\n * Negated patterns are excludes and produce no watch root. A watch pattern\n * with no static prefix (a bare `*.json`, or a glob starting with `**`)\n * deliberately falls back to `cwd`:\n * it asks for project-wide matching, and only a project-wide watch can honor\n * it. Content patterns cannot hit that fallback — they arrive from\n * `resolveConfig` already resolved against the (absolute) root.\n */\nexport function deriveWatchRoots(options: {\n content: string[]\n componentDirs: string[]\n root?: string\n watchPaths: string[]\n cwd: string\n}): string[] {\n const { content, componentDirs, root, watchPaths, cwd } = options\n\n // Stop at any glob syntax across both glob backends in use — pathe's\n // matchesGlob for the watched-file matcher (wildcards, ?, braces, bracket\n // classes) and tinyglobby/picomatch for template listing (additionally\n // extglobs: +(…), @(…), !(…), matched as two-char openers so bare\n // parentheses in directory names stay literal). Splitting too late would\n // leave a literal never-existing path as the root and silently lose\n // coverage; splitting too early merely watches the parent directory,\n // which still covers the target — so err on the side of splitting.\n const globFreePrefix = (pattern: string) => {\n const prefix = pattern.split(/[*?{[]|[+@!]\\(/)[0]\n return prefix.endsWith('/') ? prefix.slice(0, -1) : prefix\n }\n\n return [...new Set([\n ...content.filter(p => !p.startsWith('!')).map(globFreePrefix),\n ...componentDirs,\n ...(root ? [root] : []),\n ...watchPaths.filter(p => !p.startsWith('!')).map(p => globFreePrefix(p) || cwd),\n ].filter(Boolean))]\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgB,yBAAyB,UAAoB,KAAa;CACxE,MAAM,iBAAiB,MAAc,EAAE,QAAQ,SAAS,EAAE;CAC1D,MAAM,WAAW,SAAS,QAAO,MAAK,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,IAAI,aAAa;CAC3E,MAAM,WAAW,SAAS,QAAO,MAAK,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,KAAI,MAAK,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;CAC3F,QAAQ,SAAiB;EACvB,MAAM,MAAM,SAAS,KAAK,IAAI;EAC9B,OAAO,SAAS,MAAK,MAAK,YAAY,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,MAAK,MAAK,YAAY,KAAK,CAAC,CAAC;CAC3F;AACF;;;;;;;;;;;;;;;;AAiBA,SAAgB,iBAAiB,SAMpB;CACX,MAAM,EAAE,SAAS,eAAe,MAAM,YAAY,QAAQ;CAU1D,MAAM,kBAAkB,YAAoB;EAC1C,MAAM,SAAS,QAAQ,MAAM,gBAAgB,CAAC,CAAC;EAC/C,OAAO,OAAO,SAAS,GAAG,IAAI,OAAO,MAAM,GAAG,EAAE,IAAI;CACtD;CAEA,OAAO,CAAC,GAAG,IAAI,IAAI;EACjB,GAAG,QAAQ,QAAO,MAAK,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,IAAI,cAAc;EAC7D,GAAG;EACH,GAAI,OAAO,CAAC,IAAI,IAAI,CAAC;EACrB,GAAG,WAAW,QAAO,MAAK,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,KAAI,MAAK,eAAe,CAAC,KAAK,GAAG;CACjF,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC;AACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
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",
@@ -58,11 +58,11 @@
58
58
  "markdown-exit": "^1.1.0-beta.2",
59
59
  "nodemailer": "^9.0.0",
60
60
  "ora": "^9.3.0",
61
- "oxfmt": "^0.64.0",
61
+ "oxfmt": "^0.65.0",
62
62
  "pathe": "^2.0.3",
63
63
  "postcss": "^8.5.6",
64
64
  "postcss-calc": "^10.1.1",
65
- "postcss-merge-longhand": "^8.0.0",
65
+ "postcss-merge-longhand": "^9.0.1",
66
66
  "postcss-safe-parser": "^7.0.1",
67
67
  "postcss-sort-media-queries": "^6.5.0",
68
68
  "postcss-value-parser": "^4.2.0",