@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.
- package/README.md +19 -0
- package/dist/cli/build.d.ts +2 -0
- package/dist/cli/build.js +20 -3
- package/dist/cli/main.js +11 -2
- package/dist/cli/watch.js +3 -0
- package/dist/manifest/contract.d.ts +313 -1
- package/dist/manifest/contract.js +5 -1
- package/dist/schema/frame.d.ts +785 -0
- package/dist/schema/frame.js +11 -0
- package/dist/schema/frameMeta.d.ts +1 -0
- package/dist/schema/frameMeta.js +12 -0
- package/package.json +1 -1
- package/schema/frame-meta.schema.json +4 -0
package/dist/schema/frame.js
CHANGED
|
@@ -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>;
|
package/dist/schema/frameMeta.js
CHANGED
|
@@ -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