@cardanvil/frame-kit 0.5.0 → 0.6.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 +45 -0
- package/dist/cli/main.js +16 -0
- package/dist/cli/sourceWatcher.d.ts +40 -0
- package/dist/cli/sourceWatcher.js +100 -0
- package/dist/cli/studio/boxSets.d.ts +33 -0
- package/dist/cli/studio/boxSets.js +87 -0
- package/dist/cli/studio/edit/applyEdits.d.ts +71 -0
- package/dist/cli/studio/edit/applyEdits.js +177 -0
- package/dist/cli/studio/edit/impact.d.ts +53 -0
- package/dist/cli/studio/edit/impact.js +87 -0
- package/dist/cli/studio/edit/resolveModule.d.ts +10 -0
- package/dist/cli/studio/edit/resolveModule.js +55 -0
- package/dist/cli/studio/edit/resolvePath.d.ts +53 -0
- package/dist/cli/studio/edit/resolvePath.js +606 -0
- package/dist/cli/studio/edit/sourceIndex.d.ts +29 -0
- package/dist/cli/studio/edit/sourceIndex.js +73 -0
- package/dist/cli/studio/edit/ts.d.ts +14 -0
- package/dist/cli/studio/edit/ts.js +34 -0
- package/dist/cli/studio/serve.d.ts +23 -0
- package/dist/cli/studio/serve.js +513 -0
- package/dist/cli/studio/session.d.ts +73 -0
- package/dist/cli/studio/session.js +154 -0
- package/dist/cli/watch.d.ts +3 -0
- package/dist/cli/watch.js +20 -89
- package/dist/layout/assetPlacement.d.ts +71 -0
- package/dist/layout/assetPlacement.js +104 -0
- package/dist/layout/decorations.d.ts +78 -0
- package/dist/layout/decorations.js +108 -0
- package/dist/layout/frameLayers.d.ts +136 -0
- package/dist/layout/frameLayers.js +291 -0
- package/dist/layout/index.d.ts +16 -0
- package/dist/layout/index.js +16 -0
- package/dist/layout/resolveFrameAsset.d.ts +31 -0
- package/dist/layout/resolveFrameAsset.js +58 -0
- package/dist/manifest/contract.d.ts +359 -1
- package/dist/manifest/contract.js +3 -1
- package/dist/schema/frame.d.ts +907 -0
- package/dist/schema/frame.js +16 -0
- package/dist/schema/frameAssets.d.ts +3 -1
- package/dist/schema/frameAssets.js +23 -1
- package/dist/studio/assets/PlantinMTProRgIt-D0FB51kb.woff2 +0 -0
- package/dist/studio/assets/beleren-b-B3lFvodX.ttf +0 -0
- package/dist/studio/assets/beleren-bsc-yvL6mU7X.ttf +0 -0
- package/dist/studio/assets/index-CNzyV22G.js +76 -0
- package/dist/studio/index.html +12 -0
- package/package.json +12 -3
package/dist/schema/frame.js
CHANGED
|
@@ -15,6 +15,12 @@ export const TextBoxSchema = BoundsSchema.extend({
|
|
|
15
15
|
outlineWidth: z.number().optional(),
|
|
16
16
|
verticalAlign: z.enum(["top", "center"]).optional(),
|
|
17
17
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
18
|
+
/** Extra spacing between characters, in px (Konva `letterSpacing`),
|
|
19
|
+
* expressed at the box's own `fontSize` — each run scales it by its font
|
|
20
|
+
* size so it reads as constant tracking. Non-zero spacing switches Konva
|
|
21
|
+
* to per-character drawing with kerning off; the canvas measurement path
|
|
22
|
+
* mirrors that so measured widths match the render. */
|
|
23
|
+
letterSpacing: z.number().optional(),
|
|
18
24
|
/** Per-box font family override. When set, the renderer uses this instead
|
|
19
25
|
* of the language-resolved default (e.g. title font). */
|
|
20
26
|
fontFamily: z.string().optional(),
|
|
@@ -155,25 +161,35 @@ export const defaultNicknameConfig = {
|
|
|
155
161
|
x: 378,
|
|
156
162
|
y: 577,
|
|
157
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* A hint rendered under a template setting's control, for anything the label
|
|
166
|
+
* alone can't carry — what the setting changes, or when to reach for it.
|
|
167
|
+
* Optional everywhere; a setting without one renders exactly as before.
|
|
168
|
+
*/
|
|
169
|
+
const helperText = z.string().optional();
|
|
158
170
|
export const TemplateSettingConfigSchema = z.union([
|
|
159
171
|
z.object({
|
|
160
172
|
type: z.literal("boolean"),
|
|
161
173
|
label: z.string(),
|
|
174
|
+
helperText,
|
|
162
175
|
defaultValue: z.boolean(),
|
|
163
176
|
}),
|
|
164
177
|
z.object({
|
|
165
178
|
type: z.literal("string"),
|
|
166
179
|
label: z.string(),
|
|
180
|
+
helperText,
|
|
167
181
|
defaultValue: z.string(),
|
|
168
182
|
}),
|
|
169
183
|
z.object({
|
|
170
184
|
type: z.literal("number"),
|
|
171
185
|
label: z.string(),
|
|
186
|
+
helperText,
|
|
172
187
|
defaultValue: z.string(),
|
|
173
188
|
}),
|
|
174
189
|
z.object({
|
|
175
190
|
type: z.literal("select"),
|
|
176
191
|
label: z.string(),
|
|
192
|
+
helperText,
|
|
177
193
|
defaultValue: z.string(),
|
|
178
194
|
options: z.array(z.string()),
|
|
179
195
|
}),
|
|
@@ -505,13 +505,15 @@ export type FrameAssets = z.infer<typeof FrameAssetsSchema>;
|
|
|
505
505
|
/**
|
|
506
506
|
* Section masks the renderer actually reads. `rightHalf` overrides the global
|
|
507
507
|
* default (`globalMasks.rightHalf`) when a layout ships its own. The legacy
|
|
508
|
-
* `frame
|
|
508
|
+
* `frame` mask key is intentionally absent — nothing reads it.
|
|
509
509
|
*/
|
|
510
510
|
export declare const LayoutMasksSchema: z.ZodObject<{
|
|
511
511
|
pinlines: z.ZodOptional<z.ZodString>;
|
|
512
512
|
titleAndType: z.ZodOptional<z.ZodString>;
|
|
513
513
|
rules: z.ZodOptional<z.ZodString>;
|
|
514
514
|
noBorder: z.ZodOptional<z.ZodString>;
|
|
515
|
+
border: z.ZodOptional<z.ZodString>;
|
|
516
|
+
borderFull: z.ZodOptional<z.ZodString>;
|
|
515
517
|
legendary: z.ZodOptional<z.ZodString>;
|
|
516
518
|
legendaryTransform: z.ZodOptional<z.ZodString>;
|
|
517
519
|
noBorderTransform: z.ZodOptional<z.ZodString>;
|
|
@@ -149,13 +149,35 @@ export const FrameAssetsSchema = z.object({
|
|
|
149
149
|
/**
|
|
150
150
|
* Section masks the renderer actually reads. `rightHalf` overrides the global
|
|
151
151
|
* default (`globalMasks.rightHalf`) when a layout ships its own. The legacy
|
|
152
|
-
* `frame
|
|
152
|
+
* `frame` mask key is intentionally absent — nothing reads it.
|
|
153
153
|
*/
|
|
154
154
|
export const LayoutMasksSchema = z.object({
|
|
155
155
|
pinlines: AssetUrlSchema.optional(),
|
|
156
156
|
titleAndType: AssetUrlSchema.optional(),
|
|
157
157
|
rules: AssetUrlSchema.optional(),
|
|
158
158
|
noBorder: AssetUrlSchema.optional(),
|
|
159
|
+
/**
|
|
160
|
+
* Alpha mask opaque only over the outer border ring itself (everything
|
|
161
|
+
* else — art, text boxes, and the framing surface between them —
|
|
162
|
+
* transparent). Clipped via `destination-in` to isolate the ring's shape
|
|
163
|
+
* so the global border-color setting can recolor just that ring. Distinct
|
|
164
|
+
* from `noBorder`, which cuts the internal framing band too for the
|
|
165
|
+
* extended-art trim — the two are not interchangeable.
|
|
166
|
+
*/
|
|
167
|
+
border: AssetUrlSchema.optional(),
|
|
168
|
+
/**
|
|
169
|
+
* Full-coverage variant of `border`, opaque over the whole outer ring
|
|
170
|
+
* including the strip the collector line sits on.
|
|
171
|
+
*
|
|
172
|
+
* A frame ships this only when its plain `border` mask deliberately covers
|
|
173
|
+
* *less* than the whole ring — m15's stops short of the collector strip, so
|
|
174
|
+
* that the default border recolor leaves the collector line on its original
|
|
175
|
+
* black. Declaring `borderFull` is therefore also what tells the renderer
|
|
176
|
+
* that `border` is a partial mask: see `useFullBorder` in `drawCardToStage`,
|
|
177
|
+
* which picks between the two and decides whether the collector text has to
|
|
178
|
+
* adapt to the border color.
|
|
179
|
+
*/
|
|
180
|
+
borderFull: AssetUrlSchema.optional(),
|
|
159
181
|
legendary: AssetUrlSchema.optional(),
|
|
160
182
|
/** Legendary crown mask variant for transforming MDFC front faces — the
|
|
161
183
|
* composited top-half frame uses a different legendary crown cutout than
|
|
Binary file
|
|
Binary file
|
|
Binary file
|