@mapples/types 2.1.0-beta.20261118132629 → 2.1.0-beta.20261118170634

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mapples/types
2
2
 
3
- ## 2.1.0-beta.20261118132629
3
+ ## 2.1.0-beta.20261118170634
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -20,6 +20,32 @@
20
20
 
21
21
  Creator: a Translations panel (languages, texts per language, missing markers, JSON / CSV import and export, a locale preview for the canvas and Play), translation keys in the binding picker, and the same data in the share viewer and the Preview app.
22
22
 
23
+ - d2ce13d: Everything a hand-made motion design needs from project data (kit #538): easing curves and keyframes of the project's own, stagger, transforms, more gradients, new components and device actions.
24
+ - `@mapples/style`:
25
+ - A timing function may be a curve written as text, `cubic-bezier(0.3, 1.4, 0.5, 1)` (`y` may overshoot) or `steps(4)`, in `transitionTimingFunction`, `animationTimingFunction` and on a single keyframe. `styled()` turns it into Reanimated's easing, which its native CSS layer needs.
26
+ - Motion tokens: `ThemeConfig.motion` holds the project's `easings` (`{ spring: 'cubic-bezier(…)' }`, used as `easing.spring`) and `keyframes` (named sets, played by `animationName` / `exitAnimationName` like a preset; a project set with a preset's name replaces it). Keyframes may name theme colours (`theme.primary.main`) and the playing element's own colour (`$color(0.55)`). `useMotionTokens`, `validateMotionTokens`, `resolveTimingFunction`, `isTimingFunctionText`.
27
+ - New presets: `rise`, `pop`, `stampIn`, `dropIn` (enter) and `float`, `bob`, `pulseRing`, `shine`, `scanLine` (loop); `ANIMATION_PRESET_TIMING` names the duration and curve each is designed for.
28
+ - `animationStagger` on a parent starts each child's animation that much later than the one before it (the rows of a `FlatList` too). `MotionStagger`, `staggerRowDelay`.
29
+ - `resolveMotionStyle(style, { reducedMotion, tokens, staggerDelay, getColor })` replaces the positional `reducedMotion` argument.
30
+ - `@mapples/types`: `Gradient` is `LinearGradient | RadialGradient | ConicGradient`.
31
+ - `@mapples/ui`: `GradientBackground` and `View` paint radial and conic gradients with `react-native-svg` (a conic one with `repeat` draws rays).
32
+ - `@mapples/state`: `mapples:delay` (`{ duration, then }`) and `DelayActionHandler`.
33
+ - `@mapples/components`:
34
+ - New components: `Marquee`, `Confetti`, `FlipCard`, `CodeScanner` (`expo-camera`, an optional peer; a pressable stand-in on the web).
35
+ - New actions `mapples:haptic`, `mapples:copy`, `mapples:share`, handled by `DeviceActionHandler`; each takes a `then` follow-up. `expo-haptics` and `expo-clipboard` are optional peers. `@mapples/state` is now a peer.
36
+ - `ProgressCircle` and `ProgressBar` take `animate`, `animateDelay`, `animateDuration`: the fill grows from empty when it appears.
37
+ - `@mapples/app`: `MapplesRuntime` mounts `DelayActionHandler` and `DeviceActionHandler`.
38
+ - `@mapples/codegen`: the four new component types import from `@mapples/components`.
39
+ - `@mapples/fonts`: Anton (Regular), a condensed display face.
40
+ - `@mapplesorg/canvas`:
41
+ - A Transform section (move, scale, rotate, rotate X / Y, skew, perspective, origin, back face) and a border style (solid, dashed, dotted).
42
+ - The Motion section takes a custom curve, lists the project's easing tokens and keyframe sets, writes each preset's own timing, and sets the stagger of a parent.
43
+ - The Gradient section sets the kind (linear, radial, angular).
44
+ - Actions: Haptic feedback, Copy to clipboard, Share and Wait, with chained "Then" steps.
45
+ - `resolveProjectPackages` counts the packages an element's actions need.
46
+ - `@mapplesorg/schematics`: the new components' schematics; packages `camera`, `haptics`, `clipboard` and `ACTION_PACKAGES`; `StyleFormType.Transform`; Transform and Motion on text, pressable, image, SVG and code elements; `childrenAsItems`.
47
+ - `@mapplesorg/ai-tools`: `update_motion_tokens`; `add_connection` takes `haptic`, `copy`, `share`, `delay` and nested `then`; the motion hint covers curves, tokens, the new presets, stagger, transforms and border style; the gradient hint covers radial and conic.
48
+
23
49
  - dcfd14b: Foldable phones. The device presets gain iPhone Duo, Galaxy Z Fold8 and Galaxy Z Flip8, each with two viewports: unfolded (the inner screen) and folded (the outer one). A frame stores the folded posture next to its device (`frame.posture`); frames without one, and every frame saved before, are unchanged. The canvas shows a posture picker beside the device picker for a foldable, Play draws each posture's hardware with the crease of the inner screen and has a Folded switch under the device, beside Bezels, and the share viewer and template preview offer the same devices and postures.
24
50
 
25
51
  `@mapples/style` exports `useHinge()`, `HingeProvider` and the `Hinge` type, shaped as `expo-hinge` reports the hinge. `useHinge()` returns `null` until a `HingeProvider` supplies a value: an app passes it `expo-hinge`'s `useHinge()`, and Play passes the played device's posture (closed at 0° folded, fully open at 180° unfolded).
package/dist/style.d.ts CHANGED
@@ -51,10 +51,50 @@ export interface LinearGradient {
51
51
  };
52
52
  }
53
53
  /**
54
- * Any gradient payload a node may carry. Currently only linear gradients are
55
- * supported; widening this union (radial, angular) is the extension point.
54
+ * A radial gradient: colours spread from a centre outwards. `center` is in
55
+ * the same normalized object space as a linear gradient's `start` / `end`
56
+ * (`{x: 0.5, y: 0.5}` is the middle of the box); `radius` is a fraction of
57
+ * the box's larger side (`0.5` reaches the edges of a square from its
58
+ * middle).
56
59
  *
57
60
  * @public
58
61
  */
59
- export type Gradient = LinearGradient;
62
+ export interface RadialGradient {
63
+ type: 'radial';
64
+ stops: GradientStop[];
65
+ center: {
66
+ x: number;
67
+ y: number;
68
+ };
69
+ radius: number;
70
+ }
71
+ /**
72
+ * An angular (conic) gradient: colours sweep around a centre, clockwise
73
+ * from `angle` (degrees; `0` points up). `repeat` plays the stops that many
74
+ * times around the circle, which is how rays are drawn: two colours with a
75
+ * hard edge between them (the same `position` twice) and `repeat: 12` give
76
+ * twelve rays.
77
+ *
78
+ * @public
79
+ */
80
+ export interface ConicGradient {
81
+ type: 'conic';
82
+ stops: GradientStop[];
83
+ center: {
84
+ x: number;
85
+ y: number;
86
+ };
87
+ /** Degrees the sweep starts at; `0` points up. Defaults to `0`. */
88
+ angle?: number;
89
+ /** How many times the stops repeat around the circle. Defaults to `1`. */
90
+ repeat?: number;
91
+ }
92
+ /**
93
+ * Any gradient payload a node may carry: linear (painted by
94
+ * `expo-linear-gradient`), radial or conic (both painted with
95
+ * `react-native-svg`).
96
+ *
97
+ * @public
98
+ */
99
+ export type Gradient = LinearGradient | RadialGradient | ConicGradient;
60
100
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,GAAG,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapples/types",
3
- "version": "2.1.0-beta.20261118132629",
3
+ "version": "2.1.0-beta.20261118170634",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {