@flatkit/types 0.14.5 → 0.15.1

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +17 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -324,6 +324,7 @@ type ResolveOpts = {
324
324
  };
325
325
  type Region = {
326
326
  id: string;
327
+ name?: string;
327
328
  color: string;
328
329
  path: Path;
329
330
  paint?: Paint;
@@ -445,6 +446,20 @@ type SymbolDef = {
445
446
  params?: ParamDef[];
446
447
  folderId?: string;
447
448
  };
449
+ /**
450
+ * Text laid out ALONG a path (RFC: text-on-path). Present on a `Text` ⇒ glyphs follow `path`; the item's
451
+ * `transform`/`box`/`wrap` are ignored for layout. `ref` is authoring-only (the named shape the curve came
452
+ * from) and round-trips as `along "<ref>"`; `path` is the resolved/baked outline the runtime samples.
453
+ */
454
+ type TextPath = {
455
+ ref?: string;
456
+ path: Path;
457
+ start?: number;
458
+ side?: 'over' | 'under';
459
+ spacing?: number;
460
+ startExpr?: string;
461
+ spacingExpr?: string;
462
+ };
448
463
  /**
449
464
  * "live" (editable) text: a leaf item animatable like a container (transform/opacity/tint, pivot). LOCAL
450
465
  * origin = top-left corner; text flows toward (box.w, box.h). `box` = measured extent (updated by the
@@ -471,6 +486,7 @@ type Text = {
471
486
  wrap?: boolean;
472
487
  bind?: string;
473
488
  decimals?: number;
489
+ textPath?: TextPath;
474
490
  /** `id` explicitly set by the author via `text "…" as "<id>"` (≠ auto-generated id). Drives the
475
491
  * printing of `as` in the flatFormat DSL. */
476
492
  idExplicit?: boolean;
@@ -556,4 +572,4 @@ type EditFrame = {
556
572
  };
557
573
  type Tool = 'brush' | 'rect' | 'ellipse' | 'eraser' | 'fill' | 'select' | 'transform' | 'text' | 'pan' | 'pen' | 'pathselect' | 'ink';
558
574
 
559
- export type { Action, Asset, BBox, BlendMode, Cel, ClipRect, ContentKey, ContentTrack, Doc, Easing, EditFrame, ExprChannel, ExprContext, Filter, Folder, FrameAction, FrameLabel, FuncDef, Group, Image, Instance, InstanceBind, InstancePlayback, Interaction, Interactor, Item, ItemEvent, ItemInteractionState, Keyframe, Layer, Paint, ParamDef, ParamType, Path, PlaybackMode, Point, PolyGroup, Polygon, Pose, Region, ResolveOpts, Ring, Seg, SendPayload, Shape, SoundClip, SpinDir, StateAnchor, StateMachine, Stop, Stroke, Subpath, SymbolDef, Text, Timeline, TimelineTrack, Tint, Tool, Transform };
575
+ export type { Action, Asset, BBox, BlendMode, Cel, ClipRect, ContentKey, ContentTrack, Doc, Easing, EditFrame, ExprChannel, ExprContext, Filter, Folder, FrameAction, FrameLabel, FuncDef, Group, Image, Instance, InstanceBind, InstancePlayback, Interaction, Interactor, Item, ItemEvent, ItemInteractionState, Keyframe, Layer, Paint, ParamDef, ParamType, Path, PlaybackMode, Point, PolyGroup, Polygon, Pose, Region, ResolveOpts, Ring, Seg, SendPayload, Shape, SoundClip, SpinDir, StateAnchor, StateMachine, Stop, Stroke, Subpath, SymbolDef, Text, TextPath, Timeline, TimelineTrack, Tint, Tool, Transform };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatkit/types",
3
- "version": "0.14.5",
3
+ "version": "0.15.1",
4
4
  "description": "Shared types for the FlatInk format (Doc, Layer, Item, …). The leaf of the dependency graph.",
5
5
  "license": "MIT",
6
6
  "author": "Zwyk Studio",