@cardanvil/frame-kit 0.3.1 → 0.5.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.
@@ -23,6 +23,17 @@ export const TextBoxSchema = BoundsSchema.extend({
23
23
  * true when omitted (matches the original behavior). Set to false to
24
24
  * disable the shadow (e.g. flipside mana-cost badges on light backgrounds). */
25
25
  shadow: z.boolean().optional(),
26
+ /** Shaped-text mask: a full-canvas-sized PNG whose opaque pixels define the
27
+ * region text in this box may occupy. Alpha is what matters (any pixel with
28
+ * alpha > ~12% counts as inside), so color is irrelevant. Each wrapped line
29
+ * is measured against the mask's horizontal extent at the line's vertical
30
+ * band instead of the box's plain rectangle; lines are aligned/centered
31
+ * within that extent. The box still bounds everything: a mask region wider
32
+ * than the box is clamped to it, and a mask region narrower than the box
33
+ * shrinks the usable width. When the box has no width at a line's vertical
34
+ * position (the shape is absent there), the line falls back to the full box
35
+ * width. */
36
+ mask: AssetUrlSchema.optional(),
26
37
  });
27
38
  export const CardBoxesSchema = z.object({
28
39
  art: BoundsSchema,
@@ -14,6 +14,7 @@ export declare const FrameMetaSchema: z.ZodObject<{
14
14
  slug: z.ZodOptional<z.ZodString>;
15
15
  entry: z.ZodDefault<z.ZodString>;
16
16
  export: z.ZodDefault<z.ZodString>;
17
+ private: z.ZodDefault<z.ZodBoolean>;
17
18
  author: z.ZodObject<{
18
19
  name: z.ZodString;
19
20
  url: z.ZodOptional<z.ZodURL>;
@@ -33,6 +33,18 @@ export const FrameMetaSchema = z.object({
33
33
  entry: z.string().default("./index.ts"),
34
34
  /** Named export to read from `entry`. */
35
35
  export: z.string().default("default"),
36
+ /**
37
+ * Keeps the frame out of every build: it is never packaged, never indexed
38
+ * and never released. `validate` still loads and checks it, so a frame
39
+ * nobody ships cannot quietly rot.
40
+ *
41
+ * The author template's `example` frame is the case this exists for. It has
42
+ * to stay in the repository because `new-frame` copies it, but an id is
43
+ * permanent identity — publishing it would put the same
44
+ * `com.example.example` in every release by every author who forgot to
45
+ * delete it.
46
+ */
47
+ private: z.boolean().default(false),
36
48
  author: z.object({
37
49
  name: z.string().min(1),
38
50
  url: z.url().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardanvil/frame-kit",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "The contract Card Anvil frames are authored against: schemas, types, authoring helpers, and the distributable manifest format.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,6 +40,10 @@
40
40
  "minLength": 1,
41
41
  "type": "string"
42
42
  },
43
+ "private": {
44
+ "default": false,
45
+ "type": "boolean"
46
+ },
43
47
  "slug": {
44
48
  "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
45
49
  "type": "string"