@samva/vite 0.18.0 → 0.19.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/AGENTS.md +5 -2
- package/CHANGELOG.md +28 -0
- package/README.md +41 -0
- package/dist/{brand-BkXQMGgY.d.ts → brand-q80zlW2d.d.ts} +4 -2
- package/dist/build.d.ts +1 -1
- package/dist/build.js +4 -4
- package/dist/dev.d.ts +2 -2
- package/dist/dev.js +1 -1
- package/dist/editor/assets/index-D2Eh4--j.css +2 -0
- package/dist/editor/assets/index-mDq6Sihj.js +184 -0
- package/dist/editor/index.html +2 -2
- package/dist/editor/licenses/character-entities-legacy.md +22 -0
- package/dist/editor/licenses/character-reference-invalid.md +22 -0
- package/dist/editor/licenses/css-tree.md +19 -0
- package/dist/editor/licenses/decode-named-character-reference.md +22 -0
- package/dist/editor/licenses/devlop.md +22 -0
- package/dist/editor/licenses/estree-util-is-identifier-name.md +22 -0
- package/dist/editor/licenses/estree-util-visit.md +22 -0
- package/dist/editor/licenses/is-alphabetical.md +22 -0
- package/dist/editor/licenses/is-alphanumerical.md +22 -0
- package/dist/editor/licenses/is-decimal.md +22 -0
- package/dist/editor/licenses/is-hexadecimal.md +22 -0
- package/dist/editor/licenses/mdast-util-from-markdown.md +22 -0
- package/dist/editor/licenses/mdast-util-mdx-expression.md +22 -0
- package/dist/editor/licenses/mdast-util-mdx-jsx.md +22 -0
- package/dist/editor/licenses/mdast-util-to-string.md +22 -0
- package/dist/editor/licenses/micromark-core-commonmark.md +22 -0
- package/dist/editor/licenses/micromark-extension-mdx-expression.md +22 -0
- package/dist/editor/licenses/micromark-extension-mdx-jsx.md +22 -0
- package/dist/editor/licenses/micromark-factory-destination.md +22 -0
- package/dist/editor/licenses/micromark-factory-label.md +22 -0
- package/dist/editor/licenses/micromark-factory-mdx-expression.md +22 -0
- package/dist/editor/licenses/micromark-factory-space.md +22 -0
- package/dist/editor/licenses/micromark-factory-title.md +22 -0
- package/dist/editor/licenses/micromark-factory-whitespace.md +22 -0
- package/dist/editor/licenses/micromark-util-character.md +22 -0
- package/dist/editor/licenses/micromark-util-chunked.md +22 -0
- package/dist/editor/licenses/micromark-util-classify-character.md +22 -0
- package/dist/editor/licenses/micromark-util-combine-extensions.md +22 -0
- package/dist/editor/licenses/micromark-util-decode-numeric-character-reference.md +22 -0
- package/dist/editor/licenses/micromark-util-decode-string.md +22 -0
- package/dist/editor/licenses/micromark-util-edit-map.md +22 -0
- package/dist/editor/licenses/micromark-util-events-to-acorn.md +22 -0
- package/dist/editor/licenses/micromark-util-html-tag-name.md +22 -0
- package/dist/editor/licenses/micromark-util-normalize-identifier.md +22 -0
- package/dist/editor/licenses/micromark-util-resolve-all.md +22 -0
- package/dist/editor/licenses/micromark-util-subtokenize.md +22 -0
- package/dist/editor/licenses/micromark.md +22 -0
- package/dist/editor/licenses/parse-entities.md +22 -0
- package/dist/editor/licenses/source-map-js.md +28 -0
- package/dist/editor/licenses/unist-util-position-from-estree.md +22 -0
- package/dist/editor/licenses/unist-util-stringify-position.md +22 -0
- package/dist/editor/licenses/vfile-message.md +22 -0
- package/dist/editor/licenses/yaml.md +13 -0
- package/dist/{editor-CXu5ksXm.js → editor-CXbIfm3N.js} +1 -1
- package/dist/{editor-DfdlKEeu.d.ts → editor-DqMrfMrR.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{project-BDIqD8ho.js → project-l7pOcW8X.js} +73 -15
- package/dist/project.d.ts +13 -2
- package/dist/project.js +2 -2
- package/dist/render.js +4 -4
- package/package.json +3 -3
- package/dist/editor/assets/index-CIlSV4Yp.js +0 -39
- package/dist/editor/assets/index-DRZO63Mg.css +0 -2
package/dist/project.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { DEFAULT_EXPORT_ASSET_BASE, DEFAULT_TEMPLATE_DIRS, SAMVA_DIR, channelsOf, compileProject, createProjectSession, discoverEntries, emailCompatibility, exportProject, finding, hasErrors, loadProject, projectRoot, readProjectFiles, renderChannelFixture, renderEmailFixtures, templateDirectories };
|
|
1
|
+
import { C as renderChannelFixture, S as hasErrors, _ as templateDirectories, a as projectRoot, b as emailCompatibility, d as discoverEntries, f as discoverIssues, g as readProjectFiles, i as loadProject, l as DEFAULT_TEMPLATE_DIRS, n as createProjectSession, r as exportProject, t as DEFAULT_EXPORT_ASSET_BASE, u as SAMVA_DIR, v as channelsOf, w as renderEmailFixtures, x as finding, y as compileProject } from "./project-l7pOcW8X.js";
|
|
2
|
+
export { DEFAULT_EXPORT_ASSET_BASE, DEFAULT_TEMPLATE_DIRS, SAMVA_DIR, channelsOf, compileProject, createProjectSession, discoverEntries, discoverIssues, emailCompatibility, exportProject, finding, hasErrors, loadProject, projectRoot, readProjectFiles, renderChannelFixture, renderEmailFixtures, templateDirectories };
|
package/dist/render.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as renderChannelFixture, S as hasErrors, T as brandDiagnostics, i as loadProject, w as renderEmailFixtures, x as finding } from "./project-l7pOcW8X.js";
|
|
2
2
|
//#region src/render.ts
|
|
3
3
|
/** Compile just enough of the project to find and build the named template. */
|
|
4
4
|
const locate = async (input) => {
|
|
5
|
-
const byPath = input.template
|
|
5
|
+
const byPath = /\.(tsx|md)$/.test(input.template);
|
|
6
6
|
const project = await loadProject(input, byPath ? [input.template.replace(/^\.\//, "")] : void 0);
|
|
7
7
|
const { catalog } = project;
|
|
8
|
-
const entry = catalog.templates.find((candidate) => byPath ? candidate.entryPath === input.template.replace(/^\.\//, "") : candidate.id === input.template);
|
|
8
|
+
const entry = [...catalog.templates, ...catalog.issues].find((candidate) => byPath ? candidate.entryPath === input.template.replace(/^\.\//, "") : candidate.id === input.template);
|
|
9
9
|
const brand = brandDiagnostics(project.brand);
|
|
10
|
-
const ambiguous = entry === void 0 ? [] : catalog.diagnostics.filter((item) => item.code === "duplicate-template-id" && item.message.startsWith(`Template id ${JSON.stringify(entry.id)} `));
|
|
10
|
+
const ambiguous = entry === void 0 ? [] : catalog.diagnostics.filter((item) => !entry.entryPath.endsWith(".md") && item.code === "duplicate-template-id" && item.message.startsWith(`Template id ${JSON.stringify(entry.id)} `) || entry.entryPath.endsWith(".md") && item.code === "duplicate-issue-slug" && item.message.startsWith(`Issue slug ${JSON.stringify(entry.id)} `));
|
|
11
11
|
if (entry !== void 0 && ambiguous.length === 0) return {
|
|
12
12
|
ok: true,
|
|
13
13
|
entry,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Local editor, dev server and build for Samva email, SMS and WhatsApp templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"test:browser:cross": "bun run build:dependencies && bun run build && playwright test --config playwright.config.ts"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@samva/markup": "^0.
|
|
73
|
+
"@samva/markup": "^0.19.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/vitest": "4.0.0",
|
|
77
77
|
"@playwright/test": "1.63.0",
|
|
78
|
-
"@samva/editor": "^0.
|
|
78
|
+
"@samva/editor": "^0.19.0",
|
|
79
79
|
"@types/node": "^26.6.2",
|
|
80
80
|
"tsdown": "^0.22.13",
|
|
81
81
|
"typescript": "^7.0.2",
|