@softure-ai/marketing-kit 0.13.1 → 0.13.2
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/CHANGELOG.md +9 -0
- package/README.md +8 -0
- package/dist/og/element.d.ts.map +1 -1
- package/dist/og/element.js +8 -2
- package/dist/og/element.js.map +1 -1
- package/package.json +2 -2
- package/src/og/element.ts +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ Newest first. Each version lists what changed for an app that uses `@softure-ai/
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done"). Versions before the first one below are described in their GitHub Releases (`marketing-kit@x.y.z`).
|
|
6
6
|
|
|
7
|
+
## 0.13.2
|
|
8
|
+
|
|
9
|
+
- satori 0.63.2 (was 0.35.1, still pinned exactly, #254). satori 0.36 and later size boxes like CSS's default
|
|
10
|
+
`content-box`, so a `width` or `100%` no longer included the padding and the OG templates ran past the frame; every
|
|
11
|
+
element now carries `boxSizing: "border-box"`, and the four snapshots render the same layout (only anti-aliasing
|
|
12
|
+
differs).
|
|
13
|
+
- Docs: the README's Install section explains the `fflate` 0.7.3 audit finding that comes with satori and the
|
|
14
|
+
`overrides` entry that lifts it.
|
|
15
|
+
|
|
7
16
|
## 0.13.1
|
|
8
17
|
|
|
9
18
|
- hyperframes 0.9.6 (was 0.9.5): `HYPERFRAMES_VERSION` follows; the fixture and footage film renders pass unchanged.
|
package/README.md
CHANGED
|
@@ -25,6 +25,14 @@ An app runs the kit through `npx` with a pinned version, not as a dependency:
|
|
|
25
25
|
never runs it. Bump the pin and the `$schema` URL of `marketing.json` together. A project that imports the library
|
|
26
26
|
API (`@softure-ai/marketing-kit`, `@softure-ai/marketing-kit/og`) installs it as usual.
|
|
27
27
|
|
|
28
|
+
satori pins `fflate` to 0.7.3, which `npm audit` reports as moderate (GHSA-px8p-9vwx-vf98, an endless loop in
|
|
29
|
+
`unzipSync` on a malformed ZIP64 archive). satori and its font parser only call `inflateSync`, so the kit never
|
|
30
|
+
reaches the flaw, but a project that installs the kit (or audits its lockfile) can lift the copy with an override:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{ "overrides": { "fflate": "^0.7.5" } }
|
|
34
|
+
```
|
|
35
|
+
|
|
28
36
|
## Commands
|
|
29
37
|
|
|
30
38
|
```bash
|
package/dist/og/element.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/og/element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;QAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC1F;
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/og/element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;QAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC1F;AAQD,mFAAmF;AACnF,wBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,CAKvG;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhD"}
|
package/dist/og/element.js
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
* The element tree Satori lays out: the shape React elements have, built without React. A style is
|
|
3
3
|
* a CSS-in-JS object in Satori's flexbox subset.
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* Satori 0.36 and later follow CSS and size a box's content (`content-box`): a `width` or `100%` no longer includes the
|
|
7
|
+
* padding and border. Every template was written for the border box, so it is the default on every element.
|
|
8
|
+
*/
|
|
9
|
+
const BOX_SIZING = { boxSizing: "border-box" };
|
|
5
10
|
/** `h("div", { style }, ...children)`: one element; empty children are dropped. */
|
|
6
11
|
export function h(type, props, ...children) {
|
|
7
12
|
const kept = children.filter((child) => child !== null && child !== false);
|
|
13
|
+
const sized = { ...props, style: { ...BOX_SIZING, ...props.style } };
|
|
8
14
|
if (kept.length === 0)
|
|
9
|
-
return { type, props };
|
|
10
|
-
return { type, props: { ...
|
|
15
|
+
return { type, props: sized };
|
|
16
|
+
return { type, props: { ...sized, children: kept.length === 1 ? kept[0] : kept } };
|
|
11
17
|
}
|
|
12
18
|
/** Every node of a tree, the root first. */
|
|
13
19
|
export function listNodes(node) {
|
package/dist/og/element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/og/element.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,mFAAmF;AACnF,MAAM,UAAU,CAAC,CAAC,IAAY,EAAE,KAAsB,EAAE,GAAG,QAAoC;IAC7F,MAAM,IAAI,GAA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AAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC3F,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/marketing-kit",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "SOFTURE AI marketing kit: a CLI that turns a project's real app into a vertical film (cached voiceover, frame-by-frame recording, HTML composition, hyperframes render) plus per-platform post copy and OG images.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"gsap": "^3.15.0",
|
|
53
53
|
"hyperframes": "0.9.6",
|
|
54
54
|
"playwright": "^1.63.0",
|
|
55
|
-
"satori": "0.
|
|
55
|
+
"satori": "0.63.2",
|
|
56
56
|
"tsx": "^4.23.0",
|
|
57
57
|
"zod": "^4.6.7"
|
|
58
58
|
},
|
package/src/og/element.ts
CHANGED
|
@@ -12,11 +12,18 @@ export interface OgNode {
|
|
|
12
12
|
props: { style?: OgStyle; children?: OgChild | OgChild[]; [attribute: string]: unknown };
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Satori 0.36 and later follow CSS and size a box's content (`content-box`): a `width` or `100%` no longer includes the
|
|
17
|
+
* padding and border. Every template was written for the border box, so it is the default on every element.
|
|
18
|
+
*/
|
|
19
|
+
const BOX_SIZING: OgStyle = { boxSizing: "border-box" };
|
|
20
|
+
|
|
15
21
|
/** `h("div", { style }, ...children)`: one element; empty children are dropped. */
|
|
16
22
|
export function h(type: string, props: OgNode["props"], ...children: (OgChild | null | false)[]): OgNode {
|
|
17
23
|
const kept = children.filter((child): child is OgChild => child !== null && child !== false);
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
const sized = { ...props, style: { ...BOX_SIZING, ...props.style } };
|
|
25
|
+
if (kept.length === 0) return { type, props: sized };
|
|
26
|
+
return { type, props: { ...sized, children: kept.length === 1 ? kept[0] : kept } };
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
/** Every node of a tree, the root first. */
|