@flopay/ui 1.14.2 → 1.14.4
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 +5 -2
- package/dist/annotations/index.d.cts +174 -174
- package/dist/annotations/index.d.ts +174 -174
- package/dist/email/index.d.cts +38 -40
- package/dist/email/index.d.ts +38 -40
- package/dist/index.d.cts +206 -190
- package/dist/index.d.ts +206 -190
- package/dist/marketing/index.d.cts +76 -74
- package/dist/marketing/index.d.ts +76 -74
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -523,7 +523,7 @@ starting point.
|
|
|
523
523
|
```bash
|
|
524
524
|
pnpm install
|
|
525
525
|
pnpm dev # tsup --watch
|
|
526
|
-
pnpm build # emits dist
|
|
526
|
+
pnpm build # emits dist/: esm + cjs (tsup), then d.ts + d.cts (tsc, bundled); CSS ships as-is
|
|
527
527
|
pnpm gen:design-tokens # regenerate styles/tokens.css from design-tokens.json
|
|
528
528
|
pnpm gen:design-tokens:check # fail without writing if generated CSS is stale
|
|
529
529
|
pnpm typecheck
|
|
@@ -552,4 +552,7 @@ mirror, so `.github/workflows/publish.yml` never runs:
|
|
|
552
552
|
|
|
553
553
|
Gitea's secrets and variables are listed in `.gitea/README.md`.
|
|
554
554
|
|
|
555
|
-
CSS files ship raw (no build step); only the JS
|
|
555
|
+
CSS files ship raw (no build step); only the JS is bundled by tsup. TypeScript 7 ships no compiler
|
|
556
|
+
API for tsup's own declaration step, so the TypeScript 7 compiler emits the declarations
|
|
557
|
+
(`tsc -p tsconfig.build.json`, into `dist/.types`) and `scripts/build-dts.mjs` bundles each entry
|
|
558
|
+
point's into `dist/<entry>.d.ts` and `.d.cts` with rolldown-plugin-dts.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
//#region dist/.types/annotations/arrow-paths.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Arrow outlines for {@link AnnotationLayer} — GENERATED, do not hand-edit.
|
|
6
5
|
*
|
|
@@ -16,178 +15,179 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
16
15
|
* updates its mirror on the next run.
|
|
17
16
|
*/
|
|
18
17
|
declare const GENERATED_ARROWS: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
box: string;
|
|
46
|
-
shaft: string;
|
|
47
|
-
head: string;
|
|
48
|
-
};
|
|
49
|
-
'loop-right': {
|
|
50
|
-
box: string;
|
|
51
|
-
shaft: string;
|
|
52
|
-
head: string;
|
|
53
|
-
};
|
|
54
|
-
'squiggle-right': {
|
|
55
|
-
box: string;
|
|
56
|
-
shaft: string;
|
|
57
|
-
head: string;
|
|
58
|
-
};
|
|
59
|
-
's-curve-down': {
|
|
60
|
-
box: string;
|
|
61
|
-
shaft: string;
|
|
62
|
-
head: string;
|
|
63
|
-
};
|
|
64
|
-
'hook-left': {
|
|
65
|
-
box: string;
|
|
66
|
-
shaft: string;
|
|
67
|
-
head: string;
|
|
68
|
-
};
|
|
69
|
-
'swoop-down-right': {
|
|
70
|
-
box: string;
|
|
71
|
-
shaft: string;
|
|
72
|
-
head: string;
|
|
73
|
-
};
|
|
74
|
-
'zigzag-right': {
|
|
75
|
-
box: string;
|
|
76
|
-
shaft: string;
|
|
77
|
-
head: string;
|
|
78
|
-
};
|
|
79
|
-
'curl-down': {
|
|
80
|
-
box: string;
|
|
81
|
-
shaft: string;
|
|
82
|
-
head: string;
|
|
83
|
-
};
|
|
84
|
-
'arc-over-right': {
|
|
85
|
-
box: string;
|
|
86
|
-
shaft: string;
|
|
87
|
-
head: string;
|
|
88
|
-
};
|
|
89
|
-
'jab-down-right': {
|
|
90
|
-
box: string;
|
|
91
|
-
shaft: string;
|
|
92
|
-
head: string;
|
|
93
|
-
};
|
|
94
|
-
'loop-left': {
|
|
95
|
-
box: string;
|
|
96
|
-
shaft: string;
|
|
97
|
-
head: string;
|
|
98
|
-
};
|
|
99
|
-
'squiggle-left': {
|
|
100
|
-
box: string;
|
|
101
|
-
shaft: string;
|
|
102
|
-
head: string;
|
|
103
|
-
};
|
|
104
|
-
'hook-right': {
|
|
105
|
-
box: string;
|
|
106
|
-
shaft: string;
|
|
107
|
-
head: string;
|
|
108
|
-
};
|
|
109
|
-
'swoop-down-left': {
|
|
110
|
-
box: string;
|
|
111
|
-
shaft: string;
|
|
112
|
-
head: string;
|
|
113
|
-
};
|
|
114
|
-
'zigzag-left': {
|
|
115
|
-
box: string;
|
|
116
|
-
shaft: string;
|
|
117
|
-
head: string;
|
|
118
|
-
};
|
|
119
|
-
'arc-over-left': {
|
|
120
|
-
box: string;
|
|
121
|
-
shaft: string;
|
|
122
|
-
head: string;
|
|
123
|
-
};
|
|
124
|
-
'jab-down-left': {
|
|
125
|
-
box: string;
|
|
126
|
-
shaft: string;
|
|
127
|
-
head: string;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
type ArrowVariant = keyof typeof GENERATED_ARROWS;
|
|
131
|
-
declare const ARROWS: Record<ArrowVariant, {
|
|
18
|
+
'down-right': {
|
|
19
|
+
box: string;
|
|
20
|
+
shaft: string;
|
|
21
|
+
head: string;
|
|
22
|
+
};
|
|
23
|
+
'down-left': {
|
|
24
|
+
box: string;
|
|
25
|
+
shaft: string;
|
|
26
|
+
head: string;
|
|
27
|
+
};
|
|
28
|
+
'up-right': {
|
|
29
|
+
box: string;
|
|
30
|
+
shaft: string;
|
|
31
|
+
head: string;
|
|
32
|
+
};
|
|
33
|
+
'up-left': {
|
|
34
|
+
box: string;
|
|
35
|
+
shaft: string;
|
|
36
|
+
head: string;
|
|
37
|
+
};
|
|
38
|
+
right: {
|
|
39
|
+
box: string;
|
|
40
|
+
shaft: string;
|
|
41
|
+
head: string;
|
|
42
|
+
};
|
|
43
|
+
left: {
|
|
132
44
|
box: string;
|
|
133
45
|
shaft: string;
|
|
134
46
|
head: string;
|
|
47
|
+
};
|
|
48
|
+
'loop-right': {
|
|
49
|
+
box: string;
|
|
50
|
+
shaft: string;
|
|
51
|
+
head: string;
|
|
52
|
+
};
|
|
53
|
+
'squiggle-right': {
|
|
54
|
+
box: string;
|
|
55
|
+
shaft: string;
|
|
56
|
+
head: string;
|
|
57
|
+
};
|
|
58
|
+
's-curve-down': {
|
|
59
|
+
box: string;
|
|
60
|
+
shaft: string;
|
|
61
|
+
head: string;
|
|
62
|
+
};
|
|
63
|
+
'hook-left': {
|
|
64
|
+
box: string;
|
|
65
|
+
shaft: string;
|
|
66
|
+
head: string;
|
|
67
|
+
};
|
|
68
|
+
'swoop-down-right': {
|
|
69
|
+
box: string;
|
|
70
|
+
shaft: string;
|
|
71
|
+
head: string;
|
|
72
|
+
};
|
|
73
|
+
'zigzag-right': {
|
|
74
|
+
box: string;
|
|
75
|
+
shaft: string;
|
|
76
|
+
head: string;
|
|
77
|
+
};
|
|
78
|
+
'curl-down': {
|
|
79
|
+
box: string;
|
|
80
|
+
shaft: string;
|
|
81
|
+
head: string;
|
|
82
|
+
};
|
|
83
|
+
'arc-over-right': {
|
|
84
|
+
box: string;
|
|
85
|
+
shaft: string;
|
|
86
|
+
head: string;
|
|
87
|
+
};
|
|
88
|
+
'jab-down-right': {
|
|
89
|
+
box: string;
|
|
90
|
+
shaft: string;
|
|
91
|
+
head: string;
|
|
92
|
+
};
|
|
93
|
+
'loop-left': {
|
|
94
|
+
box: string;
|
|
95
|
+
shaft: string;
|
|
96
|
+
head: string;
|
|
97
|
+
};
|
|
98
|
+
'squiggle-left': {
|
|
99
|
+
box: string;
|
|
100
|
+
shaft: string;
|
|
101
|
+
head: string;
|
|
102
|
+
};
|
|
103
|
+
'hook-right': {
|
|
104
|
+
box: string;
|
|
105
|
+
shaft: string;
|
|
106
|
+
head: string;
|
|
107
|
+
};
|
|
108
|
+
'swoop-down-left': {
|
|
109
|
+
box: string;
|
|
110
|
+
shaft: string;
|
|
111
|
+
head: string;
|
|
112
|
+
};
|
|
113
|
+
'zigzag-left': {
|
|
114
|
+
box: string;
|
|
115
|
+
shaft: string;
|
|
116
|
+
head: string;
|
|
117
|
+
};
|
|
118
|
+
'arc-over-left': {
|
|
119
|
+
box: string;
|
|
120
|
+
shaft: string;
|
|
121
|
+
head: string;
|
|
122
|
+
};
|
|
123
|
+
'jab-down-left': {
|
|
124
|
+
box: string;
|
|
125
|
+
shaft: string;
|
|
126
|
+
head: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
type ArrowVariant = keyof typeof GENERATED_ARROWS;
|
|
130
|
+
export declare const ARROWS: Record<ArrowVariant, {
|
|
131
|
+
box: string;
|
|
132
|
+
shaft: string;
|
|
133
|
+
head: string;
|
|
135
134
|
}>;
|
|
136
|
-
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region dist/.types/annotations/annotation-layer.d.ts
|
|
137
137
|
/** CSS edge offsets. Any length or percentage the property accepts. */
|
|
138
138
|
interface AnnotationOffsets {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
top?: string;
|
|
140
|
+
left?: string;
|
|
141
|
+
right?: string;
|
|
142
|
+
bottom?: string;
|
|
143
143
|
}
|
|
144
144
|
interface Annotation {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
145
|
+
/** Stable key. Also what a consumer matches on when tuning placement. */
|
|
146
|
+
id: string;
|
|
147
|
+
/** The note itself. Kept short — this is marker on a screenshot, not prose. */
|
|
148
|
+
text: string;
|
|
149
|
+
arrow: ArrowVariant;
|
|
150
|
+
/**
|
|
151
|
+
* Placement of the note within the stage. Percentages resolve against the
|
|
152
|
+
* stage, so vertical offsets track content of varying height while
|
|
153
|
+
* horizontal ones usually want pixels.
|
|
154
|
+
*/
|
|
155
|
+
pos: AnnotationOffsets;
|
|
156
|
+
/**
|
|
157
|
+
* Nudge the arrow on its own, from wherever `pos` put the note — so you can
|
|
158
|
+
* stretch the gap between text and arrow, or push the tip onto its target,
|
|
159
|
+
* without dragging the copy along too. Added to `pos` rather than replacing
|
|
160
|
+
* it, and it doesn't move the text.
|
|
161
|
+
*
|
|
162
|
+
* Percentages resolve against the note, not the stage, because these are
|
|
163
|
+
* offsets on the child rather than on the positioned note itself. Setting
|
|
164
|
+
* both `top` and `bottom` (or `left` and `right`) resolves the usual CSS way
|
|
165
|
+
* — the first of each pair wins.
|
|
166
|
+
*/
|
|
167
|
+
posArrow?: AnnotationOffsets;
|
|
168
|
+
/** The same, for the text. Leaves the arrow where it is. */
|
|
169
|
+
posText?: AnnotationOffsets;
|
|
170
|
+
/** Degrees of rotation on the note as a whole, for a placed-by-hand feel. */
|
|
171
|
+
tilt?: number;
|
|
172
|
+
/** Multiplier on the arrow's length when one needs to reach further. */
|
|
173
|
+
arrowScale?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Degrees of rotation on the arrow alone, leaving the text upright.
|
|
176
|
+
*
|
|
177
|
+
* Re-aims an existing curve instead of drawing a new one: `down-left` at 90°
|
|
178
|
+
* comes in from the top and points right. Rotation is visual only — the
|
|
179
|
+
* element's layout box doesn't rotate with it, so a re-aimed arrow will
|
|
180
|
+
* overhang its box and you'll want to re-check `pos`. Composes on top of
|
|
181
|
+
* `tilt`, which rotates the note and arrow together.
|
|
182
|
+
*/
|
|
183
|
+
rotate?: number;
|
|
184
|
+
/** Mirror the arrow left-to-right. Text is untouched. */
|
|
185
|
+
flipH?: boolean;
|
|
186
|
+
/** Mirror the arrow top-to-bottom. Text is untouched. */
|
|
187
|
+
flipV?: boolean;
|
|
188
188
|
}
|
|
189
189
|
interface AnnotationLayerProps extends HTMLAttributes<HTMLDivElement> {
|
|
190
|
-
|
|
190
|
+
annotations: readonly Annotation[];
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
193
|
* The floating notes, absolutely positioned over a stage.
|
|
@@ -197,19 +197,19 @@ interface AnnotationLayerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
197
197
|
* {@link AnnotationList} carries the same copy instead. This layer is
|
|
198
198
|
* `aria-hidden`, so the list is what assistive tech reads.
|
|
199
199
|
*/
|
|
200
|
-
declare function AnnotationLayer({ annotations, className, ...props }: AnnotationLayerProps): react.JSX.Element;
|
|
200
|
+
export declare function AnnotationLayer({ annotations, className, ...props }: AnnotationLayerProps): import("react").JSX.Element;
|
|
201
201
|
interface AnnotationListProps extends HTMLAttributes<HTMLUListElement> {
|
|
202
|
-
|
|
202
|
+
annotations: readonly Annotation[];
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
205
|
* Narrow-viewport fallback, and the accessible copy of the annotations — the
|
|
206
206
|
* floating layer is `aria-hidden`, so this is what gets announced.
|
|
207
207
|
*/
|
|
208
|
-
declare function AnnotationList({ annotations, className, ...props }: AnnotationListProps): react.JSX.Element | null;
|
|
208
|
+
export declare function AnnotationList({ annotations, className, ...props }: AnnotationListProps): import("react").JSX.Element | null;
|
|
209
209
|
interface AnnotationStageProps extends HTMLAttributes<HTMLDivElement> {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
annotations: readonly Annotation[];
|
|
211
|
+
/** The thing being annotated. */
|
|
212
|
+
children: ReactNode;
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* Wraps annotated content and hosts both renderings of the notes.
|
|
@@ -223,6 +223,6 @@ interface AnnotationStageProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
223
223
|
* is a viewport question, not a stage-width one — see the media query in
|
|
224
224
|
* annotations.css, and re-declare it if your layout is constrained.
|
|
225
225
|
*/
|
|
226
|
-
declare function AnnotationStage({ annotations, children, className, ...props }: AnnotationStageProps): react.JSX.Element;
|
|
227
|
-
|
|
228
|
-
export {
|
|
226
|
+
export declare function AnnotationStage({ annotations, children, className, ...props }: AnnotationStageProps): import("react").JSX.Element;
|
|
227
|
+
//#endregion
|
|
228
|
+
export type { Annotation, AnnotationLayerProps, AnnotationListProps, AnnotationOffsets, AnnotationStageProps, ArrowVariant };
|