@hattoriai/poney-react 0.2.0 → 0.3.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 +3 -3
- package/dist/index.d.ts +58 -804
- package/dist/index.js +65 -2291
- package/dist/index.js.map +1 -1
- package/package.json +8 -20
- package/dist/poney.css +0 -211
- package/dist/poney.min.css +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattoriai/poney-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Poney's drawings in React: every diagram type and walkthrough scene from @hattoriai/poney-diagrams, as React components.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -11,45 +11,33 @@
|
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/hattoriai/poney#readme",
|
|
13
13
|
"bugs": "https://github.com/hattoriai/poney/issues",
|
|
14
|
-
"sideEffects": [
|
|
15
|
-
"*.css"
|
|
16
|
-
],
|
|
17
14
|
"exports": {
|
|
18
15
|
".": {
|
|
19
|
-
"poney-source": "./src/index.
|
|
16
|
+
"poney-source": "./src/index.tsx",
|
|
20
17
|
"types": "./dist/index.d.ts",
|
|
21
18
|
"default": "./dist/index.js"
|
|
22
|
-
}
|
|
23
|
-
"./styles.css": {
|
|
24
|
-
"poney-source": "./src/styles/index.css",
|
|
25
|
-
"default": "./dist/poney.css"
|
|
26
|
-
},
|
|
27
|
-
"./styles.min.css": "./dist/poney.min.css"
|
|
19
|
+
}
|
|
28
20
|
},
|
|
29
21
|
"files": [
|
|
30
22
|
"dist"
|
|
31
23
|
],
|
|
32
24
|
"scripts": {
|
|
33
|
-
"build
|
|
34
|
-
"build": "tsup && node scripts/build-styles.mjs"
|
|
25
|
+
"build": "tsup"
|
|
35
26
|
},
|
|
36
27
|
"publishConfig": {
|
|
37
28
|
"access": "public",
|
|
38
29
|
"provenance": true
|
|
39
30
|
},
|
|
40
31
|
"dependencies": {
|
|
41
|
-
"@hattoriai/poney-core": "0.
|
|
42
|
-
"@hattoriai/poney-
|
|
32
|
+
"@hattoriai/poney-core": "0.3.0",
|
|
33
|
+
"@hattoriai/poney-diagrams": "0.3.0",
|
|
43
34
|
"lucide-react": "^1.75.0"
|
|
44
35
|
},
|
|
45
36
|
"peerDependencies": {
|
|
46
|
-
"react": "^18.3.1 || ^19.0.0"
|
|
47
|
-
"react-dom": "^18.3.1 || ^19.0.0"
|
|
37
|
+
"react": "^18.3.1 || ^19.0.0"
|
|
48
38
|
},
|
|
49
39
|
"devDependencies": {
|
|
50
|
-
"esbuild": "0.28.2",
|
|
51
40
|
"react": "^18.3.1",
|
|
52
|
-
"react-dom": "^18.3.1",
|
|
53
41
|
"tsup": "8.5.1"
|
|
54
42
|
}
|
|
55
43
|
}
|
package/dist/poney.css
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/* src/styles/tokens.css */
|
|
2
|
-
@layer poney {
|
|
3
|
-
:where(:root),
|
|
4
|
-
:where([data-poney-theme=light]) {
|
|
5
|
-
--poney-plaster: #eef0ec;
|
|
6
|
-
--poney-paper: #fbfbf9;
|
|
7
|
-
--poney-paper-raised: #ffffff;
|
|
8
|
-
--poney-sunken: #e5e8e3;
|
|
9
|
-
--poney-ink: #1d2230;
|
|
10
|
-
--poney-ink-2: #4e5566;
|
|
11
|
-
--poney-ink-3: #848a97;
|
|
12
|
-
--poney-ink-4: #b3b8c1;
|
|
13
|
-
--poney-rule: #dcdfd8;
|
|
14
|
-
--poney-rule-strong: #c8ccc4;
|
|
15
|
-
--poney-accent: #b24a32;
|
|
16
|
-
--poney-accent-wash: #f7ebe7;
|
|
17
|
-
--poney-accent-ring: #b24a3240;
|
|
18
|
-
--poney-lapis: #3a5a9e;
|
|
19
|
-
--poney-malachite: #2e7656;
|
|
20
|
-
--poney-ochre: #a8761c;
|
|
21
|
-
--poney-umber: #7d5a43;
|
|
22
|
-
--poney-tyrian: #7a4a88;
|
|
23
|
-
--poney-slate: #56627a;
|
|
24
|
-
--poney-verdigris: #26807f;
|
|
25
|
-
--poney-success: #2e7656;
|
|
26
|
-
--poney-failure: #9c3554;
|
|
27
|
-
--poney-new: #1d8a4e;
|
|
28
|
-
--poney-new-wash: #ecf8f0;
|
|
29
|
-
--poney-changed: #b86e0b;
|
|
30
|
-
--poney-changed-wash: #fdf5e6;
|
|
31
|
-
--poney-removed: #c03550;
|
|
32
|
-
--poney-removed-wash: #fcf0f2;
|
|
33
|
-
--poney-story-node: #ffffff;
|
|
34
|
-
--poney-story-line: #8c939e;
|
|
35
|
-
--poney-story-rule: #d7dade;
|
|
36
|
-
--poney-font-sans:
|
|
37
|
-
"Hanken Grotesk Variable",
|
|
38
|
-
"Hanken Grotesk",
|
|
39
|
-
ui-sans-serif,
|
|
40
|
-
system-ui,
|
|
41
|
-
sans-serif;
|
|
42
|
-
--poney-font-mono:
|
|
43
|
-
"JetBrains Mono Variable",
|
|
44
|
-
"JetBrains Mono",
|
|
45
|
-
ui-monospace,
|
|
46
|
-
monospace;
|
|
47
|
-
}
|
|
48
|
-
:where([data-poney-theme=dark]) {
|
|
49
|
-
--poney-plaster: #15181e;
|
|
50
|
-
--poney-paper: #1b1f27;
|
|
51
|
-
--poney-paper-raised: #212631;
|
|
52
|
-
--poney-sunken: #12151a;
|
|
53
|
-
--poney-ink: #e6e8ec;
|
|
54
|
-
--poney-ink-2: #aeb4c0;
|
|
55
|
-
--poney-ink-3: #7c8391;
|
|
56
|
-
--poney-ink-4: #535a67;
|
|
57
|
-
--poney-rule: #2a2f39;
|
|
58
|
-
--poney-rule-strong: #3a404c;
|
|
59
|
-
--poney-accent: #e2765b;
|
|
60
|
-
--poney-accent-wash: #3a2621;
|
|
61
|
-
--poney-accent-ring: #e2765b4d;
|
|
62
|
-
--poney-lapis: #7f9ce0;
|
|
63
|
-
--poney-malachite: #5fb68d;
|
|
64
|
-
--poney-ochre: #d6a64c;
|
|
65
|
-
--poney-umber: #c19a7f;
|
|
66
|
-
--poney-tyrian: #b98ac8;
|
|
67
|
-
--poney-slate: #98a3b9;
|
|
68
|
-
--poney-verdigris: #58bcba;
|
|
69
|
-
--poney-success: #5fb68d;
|
|
70
|
-
--poney-failure: #e07a98;
|
|
71
|
-
--poney-new: #4fc887;
|
|
72
|
-
--poney-new-wash: #15281f;
|
|
73
|
-
--poney-changed: #e3a54a;
|
|
74
|
-
--poney-changed-wash: #2b2416;
|
|
75
|
-
--poney-removed: #ef7f97;
|
|
76
|
-
--poney-removed-wash: #2e1a20;
|
|
77
|
-
--poney-story-node: #1f242d;
|
|
78
|
-
--poney-story-line: #7d8592;
|
|
79
|
-
--poney-story-rule: #363c48;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* src/styles/diagrams.css */
|
|
84
|
-
@layer poney {
|
|
85
|
-
:where(.poney-el) {
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
transition: opacity 180ms ease;
|
|
88
|
-
}
|
|
89
|
-
:where(.poney-fade) {
|
|
90
|
-
transition: opacity 180ms ease;
|
|
91
|
-
}
|
|
92
|
-
:where(.poney-dim) {
|
|
93
|
-
opacity: 0.3;
|
|
94
|
-
}
|
|
95
|
-
:where(.poney-control) {
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
}
|
|
98
|
-
:where(.poney-row:hover) {
|
|
99
|
-
fill: var(--poney-sunken);
|
|
100
|
-
}
|
|
101
|
-
:where(.poney-numbers) {
|
|
102
|
-
font-variant-numeric: tabular-nums;
|
|
103
|
-
}
|
|
104
|
-
:where(svg [data-ref]:focus-visible) {
|
|
105
|
-
outline: none;
|
|
106
|
-
}
|
|
107
|
-
:where(.poney-focus) {
|
|
108
|
-
opacity: 0;
|
|
109
|
-
pointer-events: none;
|
|
110
|
-
}
|
|
111
|
-
:where(svg [data-ref]:focus-visible .poney-focus) {
|
|
112
|
-
opacity: 1;
|
|
113
|
-
}
|
|
114
|
-
:where(svg [data-ref]:focus-visible:not(:has(.poney-focus))) {
|
|
115
|
-
filter: drop-shadow(0 0 0.6px var(--poney-accent)) drop-shadow(0 0 3px var(--poney-accent));
|
|
116
|
-
}
|
|
117
|
-
:where(.poney-edge) {
|
|
118
|
-
transition:
|
|
119
|
-
stroke 160ms ease,
|
|
120
|
-
stroke-width 160ms ease,
|
|
121
|
-
opacity 180ms ease;
|
|
122
|
-
}
|
|
123
|
-
:where(.poney-flowing) {
|
|
124
|
-
stroke-dasharray: 6 4;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/* src/styles/stories.css */
|
|
129
|
-
@layer poney {
|
|
130
|
-
:where(.poney-story-el) {
|
|
131
|
-
transition: opacity 420ms ease, transform 420ms ease;
|
|
132
|
-
}
|
|
133
|
-
:where(.poney-story-el *) {
|
|
134
|
-
transition:
|
|
135
|
-
fill 320ms ease,
|
|
136
|
-
stroke 320ms ease,
|
|
137
|
-
opacity 320ms ease;
|
|
138
|
-
}
|
|
139
|
-
:where(.poney-story-hidden) {
|
|
140
|
-
opacity: 0;
|
|
141
|
-
pointer-events: none;
|
|
142
|
-
}
|
|
143
|
-
:where(.poney-story-dim) {
|
|
144
|
-
opacity: 0.16;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/* src/styles/motion.css */
|
|
149
|
-
@layer poney {
|
|
150
|
-
:where(.poney-flowing) {
|
|
151
|
-
animation: poney-dash 0.9s linear infinite;
|
|
152
|
-
}
|
|
153
|
-
:where(.poney-flow) {
|
|
154
|
-
animation: poney-flow 1.1s linear infinite;
|
|
155
|
-
}
|
|
156
|
-
:where(.poney-pulse) {
|
|
157
|
-
animation: poney-pulse 1.8s ease-in-out infinite;
|
|
158
|
-
}
|
|
159
|
-
@keyframes poney-dash {
|
|
160
|
-
to {
|
|
161
|
-
stroke-dashoffset: -20;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
@keyframes poney-flow {
|
|
165
|
-
to {
|
|
166
|
-
stroke-dashoffset: -11.1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
@keyframes poney-pulse {
|
|
170
|
-
0%, 100% {
|
|
171
|
-
opacity: 1;
|
|
172
|
-
}
|
|
173
|
-
50% {
|
|
174
|
-
opacity: 0.35;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
@media (prefers-reduced-motion: reduce) {
|
|
178
|
-
:where(.poney-flowing, .poney-flow, .poney-pulse) {
|
|
179
|
-
animation: none;
|
|
180
|
-
}
|
|
181
|
-
:where(.poney-el, .poney-fade, .poney-edge, .poney-story-el, .poney-story-el *) {
|
|
182
|
-
transition: none;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/* src/styles/legend.css */
|
|
188
|
-
@layer poney {
|
|
189
|
-
:where(.poney-legend) {
|
|
190
|
-
display: grid;
|
|
191
|
-
gap: 6px;
|
|
192
|
-
}
|
|
193
|
-
:where(.poney-legend-row) {
|
|
194
|
-
display: flex;
|
|
195
|
-
align-items: center;
|
|
196
|
-
gap: 10px;
|
|
197
|
-
font-size: 12px;
|
|
198
|
-
color: var(--poney-ink-2);
|
|
199
|
-
}
|
|
200
|
-
:where(.poney-legend-mark) {
|
|
201
|
-
flex-shrink: 0;
|
|
202
|
-
}
|
|
203
|
-
:where(.poney-legend-note) {
|
|
204
|
-
margin: 0;
|
|
205
|
-
padding-top: 4px;
|
|
206
|
-
font-size: 12px;
|
|
207
|
-
color: var(--poney-ink-3);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/* src/styles/index.css */
|
package/dist/poney.min.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer poney{:where(:root),:where([data-poney-theme=light]){--poney-plaster: #eef0ec;--poney-paper: #fbfbf9;--poney-paper-raised: #ffffff;--poney-sunken: #e5e8e3;--poney-ink: #1d2230;--poney-ink-2: #4e5566;--poney-ink-3: #848a97;--poney-ink-4: #b3b8c1;--poney-rule: #dcdfd8;--poney-rule-strong: #c8ccc4;--poney-accent: #b24a32;--poney-accent-wash: #f7ebe7;--poney-accent-ring: #b24a3240;--poney-lapis: #3a5a9e;--poney-malachite: #2e7656;--poney-ochre: #a8761c;--poney-umber: #7d5a43;--poney-tyrian: #7a4a88;--poney-slate: #56627a;--poney-verdigris: #26807f;--poney-success: #2e7656;--poney-failure: #9c3554;--poney-new: #1d8a4e;--poney-new-wash: #ecf8f0;--poney-changed: #b86e0b;--poney-changed-wash: #fdf5e6;--poney-removed: #c03550;--poney-removed-wash: #fcf0f2;--poney-story-node: #ffffff;--poney-story-line: #8c939e;--poney-story-rule: #d7dade;--poney-font-sans: "Hanken Grotesk Variable", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;--poney-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace}:where([data-poney-theme=dark]){--poney-plaster: #15181e;--poney-paper: #1b1f27;--poney-paper-raised: #212631;--poney-sunken: #12151a;--poney-ink: #e6e8ec;--poney-ink-2: #aeb4c0;--poney-ink-3: #7c8391;--poney-ink-4: #535a67;--poney-rule: #2a2f39;--poney-rule-strong: #3a404c;--poney-accent: #e2765b;--poney-accent-wash: #3a2621;--poney-accent-ring: #e2765b4d;--poney-lapis: #7f9ce0;--poney-malachite: #5fb68d;--poney-ochre: #d6a64c;--poney-umber: #c19a7f;--poney-tyrian: #b98ac8;--poney-slate: #98a3b9;--poney-verdigris: #58bcba;--poney-success: #5fb68d;--poney-failure: #e07a98;--poney-new: #4fc887;--poney-new-wash: #15281f;--poney-changed: #e3a54a;--poney-changed-wash: #2b2416;--poney-removed: #ef7f97;--poney-removed-wash: #2e1a20;--poney-story-node: #1f242d;--poney-story-line: #7d8592;--poney-story-rule: #363c48}}@layer poney{:where(.poney-el){cursor:pointer;transition:opacity .18s ease}:where(.poney-fade){transition:opacity .18s ease}:where(.poney-dim){opacity:.3}:where(.poney-control){cursor:pointer}:where(.poney-row:hover){fill:var(--poney-sunken)}:where(.poney-numbers){font-variant-numeric:tabular-nums}:where(svg [data-ref]:focus-visible){outline:none}:where(.poney-focus){opacity:0;pointer-events:none}:where(svg [data-ref]:focus-visible .poney-focus){opacity:1}:where(svg [data-ref]:focus-visible:not(:has(.poney-focus))){filter:drop-shadow(0 0 .6px var(--poney-accent)) drop-shadow(0 0 3px var(--poney-accent))}:where(.poney-edge){transition:stroke .16s ease,stroke-width .16s ease,opacity .18s ease}:where(.poney-flowing){stroke-dasharray:6 4}}@layer poney{:where(.poney-story-el){transition:opacity .42s ease,transform .42s ease}:where(.poney-story-el *){transition:fill .32s ease,stroke .32s ease,opacity .32s ease}:where(.poney-story-hidden){opacity:0;pointer-events:none}:where(.poney-story-dim){opacity:.16}}@layer poney{:where(.poney-flowing){animation:poney-dash .9s linear infinite}:where(.poney-flow){animation:poney-flow 1.1s linear infinite}:where(.poney-pulse){animation:poney-pulse 1.8s ease-in-out infinite}@keyframes poney-dash{to{stroke-dashoffset:-20}}@keyframes poney-flow{to{stroke-dashoffset:-11.1}}@keyframes poney-pulse{0%,to{opacity:1}50%{opacity:.35}}@media(prefers-reduced-motion:reduce){:where(.poney-flowing,.poney-flow,.poney-pulse){animation:none}:where(.poney-el,.poney-fade,.poney-edge,.poney-story-el,.poney-story-el *){transition:none}}}@layer poney{:where(.poney-legend){display:grid;gap:6px}:where(.poney-legend-row){display:flex;align-items:center;gap:10px;font-size:12px;color:var(--poney-ink-2)}:where(.poney-legend-mark){flex-shrink:0}:where(.poney-legend-note){margin:0;padding-top:4px;font-size:12px;color:var(--poney-ink-3)}}
|