@mapples/types 1.1.1 → 1.1.2
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/style.d.ts +60 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +13 -0
- package/dist/style.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|
package/dist/style.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Cross-cutting style value types shared by the runtime renderer
|
|
3
|
+
* and tooling that emits `RenderDom` (e.g. the Figma connector).
|
|
4
|
+
*
|
|
5
|
+
* These are *data* contracts — plain serializable shapes that travel inside a
|
|
6
|
+
* node's `props`. They intentionally live in `@mapples/types` (which has no
|
|
7
|
+
* React Native runtime dependency) so both the renderer and any producer can
|
|
8
|
+
* depend on the same definition without pulling in `expo-linear-gradient`.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A single stop in a {@link LinearGradient}.
|
|
15
|
+
*
|
|
16
|
+
* @property color - A CSS/RN color string (e.g. `rgba(…)`), already folded with
|
|
17
|
+
* the paint and per-stop opacity by the producer.
|
|
18
|
+
* @property position - Normalized offset along the gradient axis, `0`–`1`.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export interface GradientStop {
|
|
23
|
+
color: string;
|
|
24
|
+
position: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Structured linear-gradient payload carried on `RenderDomNode.props.gradient`.
|
|
28
|
+
*
|
|
29
|
+
* React Native has no native gradient style, so a gradient travels as data and
|
|
30
|
+
* is rendered by the container components in `@mapples/ui` (which wrap
|
|
31
|
+
* `expo-linear-gradient`). `start`/`end` are normalized object-space
|
|
32
|
+
* coordinates (`0`–`1`), matching Figma's `gradientHandlePositions`: `{x:0,y:0}`
|
|
33
|
+
* is the top-left of the node's box, `{x:1,y:1}` the bottom-right.
|
|
34
|
+
*
|
|
35
|
+
* This shape is the **runtime-owned contract**: producers such as the Figma
|
|
36
|
+
* connector emit exactly this. Keep it in sync with
|
|
37
|
+
* `@mapplesorg/figma-connector`'s `LinearGradient` type.
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export interface LinearGradient {
|
|
42
|
+
type: 'linear';
|
|
43
|
+
stops: GradientStop[];
|
|
44
|
+
start: {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
end: {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
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.
|
|
56
|
+
*
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export type Gradient = LinearGradient;
|
|
60
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +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"}
|
package/dist/style.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Cross-cutting style value types shared by the runtime renderer
|
|
3
|
+
* and tooling that emits `RenderDom` (e.g. the Figma connector).
|
|
4
|
+
*
|
|
5
|
+
* These are *data* contracts — plain serializable shapes that travel inside a
|
|
6
|
+
* node's `props`. They intentionally live in `@mapples/types` (which has no
|
|
7
|
+
* React Native runtime dependency) so both the renderer and any producer can
|
|
8
|
+
* depend on the same definition without pulling in `expo-linear-gradient`.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|