@xom11/whiteboard 0.6.1 → 0.6.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.
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import './chunk-BJTO5JO5.mjs';
2
3
  import { Excalidraw, MainMenu, Footer, WelcomeScreen } from '@excalidraw/excalidraw';
3
4
  import { jsxs, jsx } from 'react/jsx-runtime';
4
5
 
@@ -18,5 +19,5 @@ function ExcalidrawWithMenus(props) {
18
19
  }
19
20
 
20
21
  export { ExcalidrawWithMenus };
21
- //# sourceMappingURL=ExcalidrawWithMenus-KBLDWPM2.mjs.map
22
- //# sourceMappingURL=ExcalidrawWithMenus-KBLDWPM2.mjs.map
22
+ //# sourceMappingURL=ExcalidrawWithMenus-EAVPOPJZ.mjs.map
23
+ //# sourceMappingURL=ExcalidrawWithMenus-EAVPOPJZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ExcalidrawWithMenus.tsx"],"names":[],"mappings":";;;;AAiBO,SAAS,oBAAoB,KAAA,EAAwB;AAC1D,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,IAAA,EAAK,GAAI,KAAA;AAC9B,EAAA,uBACE,IAAA,CAAC,UAAA,EAAA,EAAY,GAAG,IAAA,EAEd,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,QAAA,CAAS,YAAA,CAAa,SAAA,EAAtB,EAAgC,CAAA;AAAA,sBACjC,GAAA,CAAC,QAAA,CAAS,YAAA,CAAa,WAAA,EAAtB,EAAkC,CAAA;AAAA,sBACnC,GAAA,CAAC,QAAA,CAAS,YAAA,CAAa,WAAA,EAAtB,EAAkC,CAAA;AAAA,sBACnC,GAAA,CAAC,QAAA,CAAS,YAAA,CAAa,WAAA,EAAtB,EAAkC;AAAA,KAAA,EACrC,CAAA;AAAA,oBAEA,GAAA,CAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EACR,CAAA;AAAA,oBAGA,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EACR,CAAA;AAAA,IACC;AAAA,GAAA,EACH,CAAA;AAEJ","file":"ExcalidrawWithMenus-EAVPOPJZ.mjs","sourcesContent":["'use client';\n\n// Client-only wrapper around Excalidraw that lets us reach for static helpers\n// like `MainMenu.DefaultItems.*`. Whiteboard dynamic-imports this\n// file so SSR never evaluates @excalidraw/excalidraw, while inside this file we\n// can use plain static imports (the entire module loads on the client).\n\nimport React from 'react';\nimport {\n Excalidraw,\n MainMenu,\n Footer,\n WelcomeScreen,\n} from '@excalidraw/excalidraw';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ExcalidrawProps = any;\n\nexport function ExcalidrawWithMenus(props: ExcalidrawProps) {\n const { children, ...rest } = props;\n return (\n <Excalidraw {...rest}>\n {/* Replace default menu with curated items — no socials/help/branding */}\n <MainMenu>\n <MainMenu.DefaultItems.LoadScene />\n <MainMenu.DefaultItems.SaveAsImage />\n <MainMenu.DefaultItems.ClearCanvas />\n <MainMenu.DefaultItems.ToggleTheme />\n </MainMenu>\n {/* Footer slot with no content suppresses default \"Made with Excalidraw\" link */}\n <Footer>\n <span />\n </Footer>\n {/* WelcomeScreen slot (empty) prevents the default Excalidraw welcome panel\n * (which includes the Excalidraw logo and social links) from appearing. */}\n <WelcomeScreen>\n <span />\n </WelcomeScreen>\n {children}\n </Excalidraw>\n );\n}\n"]}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
+ }) : x)(function(x) {
5
+ if (typeof require !== "undefined") return require.apply(this, arguments);
6
+ throw Error('Dynamic require of "' + x + '" is not supported');
7
+ });
8
+
9
+ export { __require };
10
+ //# sourceMappingURL=chunk-BJTO5JO5.mjs.map
11
+ //# sourceMappingURL=chunk-BJTO5JO5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-BJTO5JO5.mjs"}
package/dist/index.css CHANGED
@@ -99,4 +99,253 @@
99
99
  .theme--dark [data-stamp-area=true] .hover\:bg-emerald-700:hover {
100
100
  background-color: rgb(4 120 87);
101
101
  }
102
+ [data-stamp-area=true] button,
103
+ [data-stamp-area=true] [role=button],
104
+ [data-stamp-area=true] input[type=checkbox],
105
+ [data-stamp-area=true] .stamp-tappable {
106
+ touch-action: manipulation;
107
+ -webkit-tap-highlight-color: transparent;
108
+ }
109
+ .stamp-drawer-backdrop {
110
+ position: fixed;
111
+ inset: 0;
112
+ background-color: rgba(15, 23, 42, 0.45);
113
+ z-index: 39;
114
+ animation: stamp-fade-in 160ms ease-out;
115
+ }
116
+ @keyframes stamp-fade-in {
117
+ from {
118
+ opacity: 0;
119
+ }
120
+ to {
121
+ opacity: 1;
122
+ }
123
+ }
124
+ .stamp-drawer-mobile {
125
+ transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
126
+ will-change: transform;
127
+ }
128
+ .stamp-drawer-mobile[data-drawer-state=closed] {
129
+ transform: translateX(-100%);
130
+ }
131
+ .stamp-drawer-mobile[data-drawer-state=open] {
132
+ transform: translateX(0);
133
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
134
+ }
135
+ @media (hover: none) {
136
+ [data-stamp-area=true] [role=tooltip] {
137
+ display: none !important;
138
+ }
139
+ }
140
+ @media (max-width: 768px) {
141
+ [data-stamp-area=true][data-mobile-editor=true] {
142
+ position: fixed !important;
143
+ inset: 0 !important;
144
+ top: 0 !important;
145
+ left: 0 !important;
146
+ right: 0 !important;
147
+ bottom: 0 !important;
148
+ width: 100vw !important;
149
+ height: 100vh !important;
150
+ height: 100dvh !important;
151
+ max-width: 100vw !important;
152
+ max-height: 100dvh !important;
153
+ transform: none !important;
154
+ border-radius: 0 !important;
155
+ margin: 0 !important;
156
+ }
157
+ [data-stamp-area=true][data-mobile-drawer=true] {
158
+ position: fixed !important;
159
+ top: 0 !important;
160
+ left: 0 !important;
161
+ bottom: 0 !important;
162
+ height: 100vh !important;
163
+ height: 100dvh !important;
164
+ width: 84vw !important;
165
+ max-width: 320px !important;
166
+ z-index: 50 !important;
167
+ }
168
+ [data-stamp-area=true] [data-tool],
169
+ [data-stamp-area=true] [data-snippet],
170
+ [data-stamp-area=true] [data-pill-btn] {
171
+ min-height: 40px;
172
+ min-width: 40px;
173
+ }
174
+ [data-stamp-area=true][data-mobile-drawer=true][data-geo-mobile=true] {
175
+ width: 88vw !important;
176
+ max-width: 360px !important;
177
+ }
178
+ [data-stamp-area=true][data-geo-mobile=true] [data-tool] {
179
+ min-height: 72px;
180
+ min-width: 0;
181
+ }
182
+ }
183
+ .geo-mobile-tool-active {
184
+ background-image:
185
+ linear-gradient(
186
+ 135deg,
187
+ rgb(16 185 129),
188
+ rgb(5 150 105));
189
+ color: white;
190
+ box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.35);
191
+ }
192
+ .theme--dark .geo-mobile-tool-active {
193
+ background-image:
194
+ linear-gradient(
195
+ 135deg,
196
+ rgb(6 95 70),
197
+ rgb(6 78 59));
198
+ box-shadow: 0 4px 12px -2px rgba(6, 95, 70, 0.5);
199
+ }
200
+ .geo-mobile-chip {
201
+ display: inline-flex;
202
+ align-items: center;
203
+ gap: 0.375rem;
204
+ padding: 0.375rem 0.75rem;
205
+ border-radius: 9999px;
206
+ border: 1px solid rgb(203 213 225);
207
+ background-color: white;
208
+ color: rgb(71 85 105);
209
+ font-size: 12px;
210
+ font-weight: 500;
211
+ min-height: 36px;
212
+ transition:
213
+ background-color 160ms,
214
+ border-color 160ms,
215
+ color 160ms;
216
+ }
217
+ .geo-mobile-chip[aria-pressed=true] {
218
+ background-color: rgb(236 253 245);
219
+ border-color: rgb(16 185 129);
220
+ color: rgb(5 95 70);
221
+ }
222
+ .theme--dark .geo-mobile-chip {
223
+ background-color: rgb(30 41 59);
224
+ border-color: rgb(51 65 85);
225
+ color: rgb(203 213 225);
226
+ }
227
+ .theme--dark .geo-mobile-chip[aria-pressed=true] {
228
+ background-color: rgb(6 78 59);
229
+ border-color: rgb(16 185 129);
230
+ color: rgb(167 243 208);
231
+ }
232
+ .graph-algebra-view {
233
+ flex: 1;
234
+ overflow-y: auto;
235
+ padding: 8px;
236
+ }
237
+ .graph-algebra-section {
238
+ margin-bottom: 12px;
239
+ }
240
+ .graph-function-row {
241
+ display: flex;
242
+ align-items: center;
243
+ gap: 6px;
244
+ padding: 6px 4px;
245
+ border-bottom: 1px solid var(--color-border-light, #f3f4f6);
246
+ font-family:
247
+ ui-monospace,
248
+ Menlo,
249
+ monospace;
250
+ font-size: 12px;
251
+ position: relative;
252
+ }
253
+ .graph-function-row.is-error {
254
+ background: #fef2f2;
255
+ }
256
+ .graph-function-color {
257
+ width: 10px;
258
+ height: 10px;
259
+ border-radius: 50%;
260
+ flex-shrink: 0;
261
+ }
262
+ .graph-function-name {
263
+ white-space: nowrap;
264
+ }
265
+ .graph-function-input {
266
+ flex: 1;
267
+ min-width: 0;
268
+ background: white;
269
+ border: 1px solid var(--color-border, #d1d5db);
270
+ border-radius: 3px;
271
+ padding: 2px 4px;
272
+ font-family: ui-monospace, monospace;
273
+ font-size: 12px;
274
+ }
275
+ .graph-function-eye,
276
+ .graph-function-remove {
277
+ width: 22px;
278
+ height: 22px;
279
+ background: transparent;
280
+ border: none;
281
+ cursor: pointer;
282
+ opacity: 0.6;
283
+ }
284
+ .graph-function-eye.is-hidden {
285
+ opacity: 1;
286
+ color: #999;
287
+ }
288
+ .graph-function-error {
289
+ position: absolute;
290
+ left: 24px;
291
+ right: 24px;
292
+ bottom: -16px;
293
+ font-size: 10px;
294
+ color: #b91c1c;
295
+ }
296
+ .graph-algebra-add {
297
+ width: 100%;
298
+ padding: 6px;
299
+ background: white;
300
+ border: 1px dashed var(--color-border, #9ca3af);
301
+ border-radius: 4px;
302
+ font-size: 12px;
303
+ cursor: pointer;
304
+ margin-top: 8px;
305
+ }
306
+ .graph-algebra-add:disabled {
307
+ opacity: 0.4;
308
+ cursor: not-allowed;
309
+ }
310
+ .graph-slider-row {
311
+ padding: 6px 4px;
312
+ border-bottom: 1px solid var(--color-border-light, #f3f4f6);
313
+ }
314
+ .graph-slider-header {
315
+ display: flex;
316
+ align-items: center;
317
+ gap: 4px;
318
+ font-size: 12px;
319
+ font-family: ui-monospace, monospace;
320
+ }
321
+ .graph-slider-name {
322
+ font-weight: 600;
323
+ }
324
+ .graph-slider-value {
325
+ color: #6b7280;
326
+ }
327
+ .graph-slider-remove {
328
+ margin-left: auto;
329
+ width: 18px;
330
+ height: 18px;
331
+ background: transparent;
332
+ border: none;
333
+ cursor: pointer;
334
+ opacity: 0.5;
335
+ }
336
+ .graph-slider-input {
337
+ width: 100%;
338
+ margin-top: 4px;
339
+ }
340
+ .graph-slider-range {
341
+ display: flex;
342
+ justify-content: space-between;
343
+ font-size: 10px;
344
+ color: #9ca3af;
345
+ }
346
+ .graph-miniboard {
347
+ width: 100%;
348
+ height: 100%;
349
+ min-height: 0;
350
+ }
102
351
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/stamps/shared/stamp.css"],"sourcesContent":["/* Dark-mode overrides cho math-stamp panels.\n * Active khi outer wrapper có class `theme--dark` (mirrored từ Excalidraw appState).\n * Selector `[data-stamp-area=\"true\"]` đã có sẵn trên mọi panel để dùng cho click-outside detection. */\n\n.theme--dark [data-stamp-area=\"true\"] {\n color: rgb(226 232 240);\n}\n\n/* ---- Backgrounds ---- */\n.theme--dark [data-stamp-area=\"true\"].bg-white,\n.theme--dark [data-stamp-area=\"true\"] .bg-white {\n background-color: rgb(30 41 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-slate-50 {\n background-color: rgb(15 23 42);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-50 {\n background-color: rgb(6 78 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-rose-50 {\n background-color: rgb(127 29 29);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-slate-100:hover {\n background-color: rgb(51 65 85);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-slate-50:hover {\n background-color: rgb(15 23 42);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-emerald-50:hover {\n background-color: rgb(6 78 59);\n}\n\n/* Left-panel header có gradient sáng — đổi sang slate */\n.theme--dark [data-testid=\"stamp-left-panel\"] > header.bg-gradient-to-r {\n background-image: linear-gradient(to right, rgb(15 23 42), rgb(30 41 59));\n}\n\n/* ---- Borders ---- */\n.theme--dark [data-stamp-area=\"true\"] .border-slate-200,\n.theme--dark [data-stamp-area=\"true\"] .border-slate-300 {\n border-color: rgb(51 65 85);\n}\n\n/* ---- Text ---- */\n.theme--dark [data-stamp-area=\"true\"] .text-slate-400 {\n color: rgb(100 116 139);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-slate-500 {\n color: rgb(148 163 184);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-slate-600,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-700,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-800,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-900 {\n color: rgb(226 232 240);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:text-slate-800:hover,\n.theme--dark [data-stamp-area=\"true\"] .hover\\:text-slate-900:hover {\n color: rgb(241 245 249);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-emerald-700 {\n color: rgb(110 231 183);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-rose-700 {\n color: rgb(253 164 175);\n}\n\n/* ---- Inputs ---- */\n.theme--dark [data-stamp-area=\"true\"] input[type=\"text\"],\n.theme--dark [data-stamp-area=\"true\"] textarea {\n background-color: rgb(15 23 42);\n color: rgb(241 245 249);\n}\n.theme--dark [data-stamp-area=\"true\"] input::placeholder,\n.theme--dark [data-stamp-area=\"true\"] textarea::placeholder {\n color: rgb(100 116 139);\n}\n\n/* ---- Kbd badge ---- */\n.theme--dark [data-stamp-area=\"true\"] kbd {\n background-color: rgb(15 23 42);\n border-color: rgb(71 85 105);\n color: rgb(226 232 240);\n}\n\n/* --- Popover & swatch active states (Task 13) --- */\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-100 {\n background-color: rgb(6 78 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .border-emerald-500 {\n border-color: rgb(52 211 153);\n}\n.theme--dark [data-stamp-area=\"true\"] .ring-emerald-300 {\n --tw-ring-color: rgb(110 231 183);\n}\n.theme--dark [data-stamp-area=\"true\"] .border-rose-300 {\n border-color: rgb(190 18 60);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-rose-100:hover {\n background-color: rgb(127 29 29);\n}\n\n/* --- Geometry header dimmer trong dark --- */\n.theme--dark [data-stamp-area=\"true\"] .bg-gradient-to-r.from-emerald-600 {\n background-image: linear-gradient(to right, rgb(6 95 70), rgb(15 76 76));\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-600 {\n background-color: rgb(6 95 70);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-emerald-700:hover {\n background-color: rgb(4 120 87);\n}\n"],"mappings":";AAIA,CAAC,YAAY,CAAC;AACZ,SAAO,IAAI,IAAI,IAAI;AACrB;AAGA,CALC,YAKY,CAAC,qBAAuB,CAAC;AACtC,CANC,YAMY,CAAC,sBAAwB,CADA;AAEpC,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CATC,YASY,CAAC,sBAAwB,CAAC;AACrC,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CAZC,YAYY,CAAC,sBAAwB,CAAC;AACrC,oBAAkB,IAAI,EAAE,GAAG;AAC7B;AACA,CAfC,YAeY,CAAC,sBAAwB,C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rides cho math-stamp panels.\n * Active khi outer wrapper có class `theme--dark` (mirrored từ Excalidraw appState).\n * Selector `[data-stamp-area=\"true\"]` đã có sẵn trên mọi panel để dùng cho click-outside detection. */\n\n.theme--dark [data-stamp-area=\"true\"] {\n color: rgb(226 232 240);\n}\n\n/* ---- Backgrounds ---- */\n.theme--dark [data-stamp-area=\"true\"].bg-white,\n.theme--dark [data-stamp-area=\"true\"] .bg-white {\n background-color: rgb(30 41 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-slate-50 {\n background-color: rgb(15 23 42);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-50 {\n background-color: rgb(6 78 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-rose-50 {\n background-color: rgb(127 29 29);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-slate-100:hover {\n background-color: rgb(51 65 85);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-slate-50:hover {\n background-color: rgb(15 23 42);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-emerald-50:hover {\n background-color: rgb(6 78 59);\n}\n\n/* Left-panel header có gradient sáng — đổi sang slate */\n.theme--dark [data-testid=\"stamp-left-panel\"] > header.bg-gradient-to-r {\n background-image: linear-gradient(to right, rgb(15 23 42), rgb(30 41 59));\n}\n\n/* ---- Borders ---- */\n.theme--dark [data-stamp-area=\"true\"] .border-slate-200,\n.theme--dark [data-stamp-area=\"true\"] .border-slate-300 {\n border-color: rgb(51 65 85);\n}\n\n/* ---- Text ---- */\n.theme--dark [data-stamp-area=\"true\"] .text-slate-400 {\n color: rgb(100 116 139);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-slate-500 {\n color: rgb(148 163 184);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-slate-600,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-700,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-800,\n.theme--dark [data-stamp-area=\"true\"] .text-slate-900 {\n color: rgb(226 232 240);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:text-slate-800:hover,\n.theme--dark [data-stamp-area=\"true\"] .hover\\:text-slate-900:hover {\n color: rgb(241 245 249);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-emerald-700 {\n color: rgb(110 231 183);\n}\n.theme--dark [data-stamp-area=\"true\"] .text-rose-700 {\n color: rgb(253 164 175);\n}\n\n/* ---- Inputs ---- */\n.theme--dark [data-stamp-area=\"true\"] input[type=\"text\"],\n.theme--dark [data-stamp-area=\"true\"] textarea {\n background-color: rgb(15 23 42);\n color: rgb(241 245 249);\n}\n.theme--dark [data-stamp-area=\"true\"] input::placeholder,\n.theme--dark [data-stamp-area=\"true\"] textarea::placeholder {\n color: rgb(100 116 139);\n}\n\n/* ---- Kbd badge ---- */\n.theme--dark [data-stamp-area=\"true\"] kbd {\n background-color: rgb(15 23 42);\n border-color: rgb(71 85 105);\n color: rgb(226 232 240);\n}\n\n/* --- Popover & swatch active states (Task 13) --- */\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-100 {\n background-color: rgb(6 78 59);\n}\n.theme--dark [data-stamp-area=\"true\"] .border-emerald-500 {\n border-color: rgb(52 211 153);\n}\n.theme--dark [data-stamp-area=\"true\"] .ring-emerald-300 {\n --tw-ring-color: rgb(110 231 183);\n}\n.theme--dark [data-stamp-area=\"true\"] .border-rose-300 {\n border-color: rgb(190 18 60);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-rose-100:hover {\n background-color: rgb(127 29 29);\n}\n\n/* --- Geometry header dimmer trong dark --- */\n.theme--dark [data-stamp-area=\"true\"] .bg-gradient-to-r.from-emerald-600 {\n background-image: linear-gradient(to right, rgb(6 95 70), rgb(15 76 76));\n}\n.theme--dark [data-stamp-area=\"true\"] .bg-emerald-600 {\n background-color: rgb(6 95 70);\n}\n.theme--dark [data-stamp-area=\"true\"] .hover\\:bg-emerald-700:hover {\n background-color: rgb(4 120 87);\n}\n\n/* ============================================================\n * Mobile / Touch UX\n * ============================================================ */\n\n/* Bỏ 300ms tap delay + double-tap zoom trên iOS Safari. */\n[data-stamp-area=\"true\"] button,\n[data-stamp-area=\"true\"] [role=\"button\"],\n[data-stamp-area=\"true\"] input[type=\"checkbox\"],\n[data-stamp-area=\"true\"] .stamp-tappable {\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n}\n\n/* Mobile drawer backdrop (LeftPanel khi ≤ 768px). */\n.stamp-drawer-backdrop {\n position: fixed;\n inset: 0;\n background-color: rgba(15, 23, 42, 0.45);\n z-index: 39;\n animation: stamp-fade-in 160ms ease-out;\n}\n@keyframes stamp-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Drawer slide transform — LeftPanel áp class này khi ở mobile. */\n.stamp-drawer-mobile {\n transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);\n will-change: transform;\n}\n.stamp-drawer-mobile[data-drawer-state=\"closed\"] {\n transform: translateX(-100%);\n}\n.stamp-drawer-mobile[data-drawer-state=\"open\"] {\n transform: translateX(0);\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);\n}\n\n/* Ẩn hover-only tooltip trên device không có hover. */\n@media (hover: none) {\n [data-stamp-area=\"true\"] [role=\"tooltip\"] {\n display: none !important;\n }\n}\n\n/* Mobile responsive cho editor panels (≤ 768px). */\n@media (max-width: 768px) {\n /* Editor panel: full-screen, dùng dvh để né iOS URL bar collapse. */\n [data-stamp-area=\"true\"][data-mobile-editor=\"true\"] {\n position: fixed !important;\n inset: 0 !important;\n top: 0 !important;\n left: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n width: 100vw !important;\n height: 100vh !important;\n height: 100dvh !important;\n max-width: 100vw !important;\n max-height: 100dvh !important;\n transform: none !important;\n border-radius: 0 !important;\n margin: 0 !important;\n }\n\n /* LeftPanel mobile: full-height drawer, override absolute w-60 desktop. */\n [data-stamp-area=\"true\"][data-mobile-drawer=\"true\"] {\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n height: 100vh !important;\n height: 100dvh !important;\n width: 84vw !important;\n max-width: 320px !important;\n z-index: 50 !important;\n }\n\n /* Tool button mobile: 40px min, không bị Tailwind h-8 đè vì specificity. */\n [data-stamp-area=\"true\"] [data-tool],\n [data-stamp-area=\"true\"] [data-snippet],\n [data-stamp-area=\"true\"] [data-pill-btn] {\n min-height: 40px;\n min-width: 40px;\n }\n\n /* Mobile geometry redesign: rộng drawer hơn để chứa label dưới icon. */\n [data-stamp-area=\"true\"][data-mobile-drawer=\"true\"][data-geo-mobile=\"true\"] {\n width: 88vw !important;\n max-width: 360px !important;\n }\n\n /* Tool card trong geometry mobile drawer: 72px height tối thiểu, icon + 2-line label. */\n [data-stamp-area=\"true\"][data-geo-mobile=\"true\"] [data-tool] {\n min-height: 72px;\n min-width: 0;\n }\n}\n\n/* ============================================================\n * Geometry mobile drawer — tool grid + chips\n * ============================================================ */\n\n/* Tool card active state — gradient emerald với shadow nhẹ. */\n.geo-mobile-tool-active {\n background-image: linear-gradient(135deg, rgb(16 185 129), rgb(5 150 105));\n color: white;\n box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.35);\n}\n.theme--dark .geo-mobile-tool-active {\n background-image: linear-gradient(135deg, rgb(6 95 70), rgb(6 78 59));\n box-shadow: 0 4px 12px -2px rgba(6, 95, 70, 0.5);\n}\n\n/* Pill chip (Trục / Lưới) — outline + active emerald. */\n.geo-mobile-chip {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.375rem 0.75rem;\n border-radius: 9999px;\n border: 1px solid rgb(203 213 225);\n background-color: white;\n color: rgb(71 85 105);\n font-size: 12px;\n font-weight: 500;\n min-height: 36px;\n transition: background-color 160ms, border-color 160ms, color 160ms;\n}\n.geo-mobile-chip[aria-pressed='true'] {\n background-color: rgb(236 253 245);\n border-color: rgb(16 185 129);\n color: rgb(5 95 70);\n}\n.theme--dark .geo-mobile-chip {\n background-color: rgb(30 41 59);\n border-color: rgb(51 65 85);\n color: rgb(203 213 225);\n}\n.theme--dark .geo-mobile-chip[aria-pressed='true'] {\n background-color: rgb(6 78 59);\n border-color: rgb(16 185 129);\n color: rgb(167 243 208);\n}\n\n/* === graph-2d styles ===\n * Panel chrome (positioning, header, sections) handled by Tailwind in LeftPanel.tsx\n * and EditorPanel.tsx. CSS classes below cover AlgebraView/FunctionRow/SliderRow\n * internals and MiniBoard container.\n */\n.graph-algebra-view {\n flex: 1;\n overflow-y: auto;\n padding: 8px;\n}\n.graph-algebra-section { margin-bottom: 12px; }\n.graph-function-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 4px;\n border-bottom: 1px solid var(--color-border-light, #f3f4f6);\n font-family: ui-monospace, Menlo, monospace;\n font-size: 12px;\n position: relative;\n}\n.graph-function-row.is-error { background: #fef2f2; }\n.graph-function-color {\n width: 10px; height: 10px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n.graph-function-name { white-space: nowrap; }\n.graph-function-input {\n flex: 1; min-width: 0;\n background: white;\n border: 1px solid var(--color-border, #d1d5db);\n border-radius: 3px;\n padding: 2px 4px;\n font-family: ui-monospace, monospace;\n font-size: 12px;\n}\n.graph-function-eye, .graph-function-remove {\n width: 22px; height: 22px;\n background: transparent;\n border: none;\n cursor: pointer;\n opacity: 0.6;\n}\n.graph-function-eye.is-hidden { opacity: 1; color: #999; }\n.graph-function-error {\n position: absolute;\n left: 24px; right: 24px;\n bottom: -16px;\n font-size: 10px;\n color: #b91c1c;\n}\n.graph-algebra-add {\n width: 100%;\n padding: 6px;\n background: white;\n border: 1px dashed var(--color-border, #9ca3af);\n border-radius: 4px;\n font-size: 12px;\n cursor: pointer;\n margin-top: 8px;\n}\n.graph-algebra-add:disabled { opacity: 0.4; cursor: not-allowed; }\n.graph-slider-row {\n padding: 6px 4px;\n border-bottom: 1px solid var(--color-border-light, #f3f4f6);\n}\n.graph-slider-header {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-family: ui-monospace, monospace;\n}\n.graph-slider-name { font-weight: 600; }\n.graph-slider-value { color: #6b7280; }\n.graph-slider-remove {\n margin-left: auto;\n width: 18px; height: 18px;\n background: transparent;\n border: none;\n cursor: pointer;\n opacity: 0.5;\n}\n.graph-slider-input {\n width: 100%;\n margin-top: 4px;\n}\n.graph-slider-range {\n display: flex;\n justify-content: space-between;\n font-size: 10px;\n color: #9ca3af;\n}\n.graph-miniboard {\n width: 100%;\n height: 100%;\n min-height: 0;\n}\n\n"],"mappings":";AAIA,CAAC,YAAY,CAAC;AACZ,SAAO,IAAI,IAAI,IAAI;AACrB;AAGA,CALC,YAKY,CAAC,qBAAuB,CAAC;AACtC,CANC,YAMY,CAAC,sBAAwB,CADA;AAEpC,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CATC,YASY,CAAC,sBAAwB,CAAC;AACrC,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CAZC,YAYY,CAAC,sBAAwB,CAAC;AACrC,oBAAkB,IAAI,EAAE,GAAG;AAC7B;AACA,CAfC,YAeY,CAAC,sBAAwB,CAAC;AACrC,oBAAkB,IAAI,IAAI,GAAG;AAC/B;AACA,CAlBC,YAkBY,CAAC,sBAAwB,CAAC,mBAAmB;AACxD,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CArBC,YAqBY,CAAC,sBAAwB,CAAC,kBAAkB;AACvD,oBAAkB,IAAI,GAAG,GAAG;AAC9B;AACA,CAxBC,YAwBY,CAAC,sBAAwB,CAAC,oBAAoB;AACzD,oBAAkB,IAAI,EAAE,GAAG;AAC7B;AAGA,CA7BC,YA6BY,CAAC,8BAAgC,EAAE,MAAM,CAAC;AACrD;AAAA,IAAkB;AAAA,MAAgB,GAAG,KAAnB;AAAA,MAA0B,IAAI,GAAG,GAAG,GAApC;AAAA,MAAyC,IAAI,GAAG,GAAG;AACvE;AAGA,CAlCC,YAkCY,CAAC,sBAAwB,CAAC;AACvC,CAnCC,YAmCY,CAAC,sBAAwB,CAAC;A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AAS;AAAG,SAAO;AAAM;AACzD,CAAC;AACC,YAAU;AACV,QAAM;AAAM,SAAO;AACnB,UAAQ;AACR,aAAW;AACX,SAAO;AACT;AACA,CAAC;AACC,SAAO;AACP,WAAS;AACT,cAAY;AACZ,UAAQ,IAAI,OAAO,IAAI,cAAc,EAAE;AACvC,iBAAe;AACf,aAAW;AACX,UAAQ;AACR,cAAY;AACd;AACA,CAVC,iBAUiB;AAAY,WAAS;AAAK,UAAQ;AAAa;AACjE,CAAC;AACC,WAAS,IAAI;AACb,iBAAe,IAAI,MAAM,IAAI,oBAAoB,EAAE;AACrD;AACA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACL,aAAW;AACX,eAAa,YAAY,EAAE;AAC7B;AACA,CAAC;AAAoB,eAAa;AAAK;AACvC,CAAC;AAAqB,SAAO;AAAS;AACtC,CAAC;AACC,eAAa;AACb,SAAO;AAAM,UAAQ;AACrB,cAAY;AACZ,UAAQ;AACR,UAAQ;AACR,WAAS;AACX;AACA,CAAC;AACC,SAAO;AACP,cAAY;AACd;AACA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,aAAW;AACX,SAAO;AACT;AACA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,cAAY;AACd;","names":[]}
package/dist/index.d.mts CHANGED
@@ -145,6 +145,16 @@ declare function isGeometry3DCustomData(data: unknown): data is Geometry3DCustom
145
145
 
146
146
  declare const geometry3dStamp: StampType;
147
147
 
148
+ interface Graph2DCustomData extends BaseStampCustomData {
149
+ kind: 'graph2d';
150
+ version: 1;
151
+ jsonState: string;
152
+ svgWidth: number;
153
+ svgHeight: number;
154
+ }
155
+ declare function isGraph2DCustomData(data: unknown): data is Graph2DCustomData;
156
+ declare const graph2dStamp: StampType;
157
+
148
158
  /**
149
159
  * Set stamp mặc định dùng trong Whiteboard. Consumer có thể
150
160
  * truyền custom array để bật/tắt từng stamp hoặc đăng ký stamp mới.
@@ -213,6 +223,6 @@ interface ElementLike {
213
223
  */
214
224
  declare function restoreMissingStampFiles(api: any, elements: readonly ElementLike[], stamps?: ReadonlyArray<StampType>): Promise<void>;
215
225
 
216
- type StampCustomData = GeometryCustomData | LatexCustomData | Geometry3DCustomData;
226
+ type StampCustomData = GeometryCustomData | LatexCustomData | Geometry3DCustomData | Graph2DCustomData;
217
227
 
218
- export { type BaseStampCustomData, DEFAULT_STAMPS, type ExcalidrawSceneSnapshot, type Geometry3DCustomData, type GeometryCustomData, type LatexCustomData, type StampCustomData, type StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, findStampForCustomData, geometry3dStamp, geometryStamp, isGeometry3DCustomData, isGeometryCustomData, isLatexCustomData, isStampElement, latexStamp, pickSyncableAppState, restoreMissingStampFiles };
228
+ export { type BaseStampCustomData, DEFAULT_STAMPS, type ExcalidrawSceneSnapshot, type Geometry3DCustomData, type GeometryCustomData, type Graph2DCustomData, type LatexCustomData, type StampCustomData, type StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, findStampForCustomData, geometry3dStamp, geometryStamp, graph2dStamp, isGeometry3DCustomData, isGeometryCustomData, isGraph2DCustomData, isLatexCustomData, isStampElement, latexStamp, pickSyncableAppState, restoreMissingStampFiles };
package/dist/index.d.ts CHANGED
@@ -145,6 +145,16 @@ declare function isGeometry3DCustomData(data: unknown): data is Geometry3DCustom
145
145
 
146
146
  declare const geometry3dStamp: StampType;
147
147
 
148
+ interface Graph2DCustomData extends BaseStampCustomData {
149
+ kind: 'graph2d';
150
+ version: 1;
151
+ jsonState: string;
152
+ svgWidth: number;
153
+ svgHeight: number;
154
+ }
155
+ declare function isGraph2DCustomData(data: unknown): data is Graph2DCustomData;
156
+ declare const graph2dStamp: StampType;
157
+
148
158
  /**
149
159
  * Set stamp mặc định dùng trong Whiteboard. Consumer có thể
150
160
  * truyền custom array để bật/tắt từng stamp hoặc đăng ký stamp mới.
@@ -213,6 +223,6 @@ interface ElementLike {
213
223
  */
214
224
  declare function restoreMissingStampFiles(api: any, elements: readonly ElementLike[], stamps?: ReadonlyArray<StampType>): Promise<void>;
215
225
 
216
- type StampCustomData = GeometryCustomData | LatexCustomData | Geometry3DCustomData;
226
+ type StampCustomData = GeometryCustomData | LatexCustomData | Geometry3DCustomData | Graph2DCustomData;
217
227
 
218
- export { type BaseStampCustomData, DEFAULT_STAMPS, type ExcalidrawSceneSnapshot, type Geometry3DCustomData, type GeometryCustomData, type LatexCustomData, type StampCustomData, type StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, findStampForCustomData, geometry3dStamp, geometryStamp, isGeometry3DCustomData, isGeometryCustomData, isLatexCustomData, isStampElement, latexStamp, pickSyncableAppState, restoreMissingStampFiles };
228
+ export { type BaseStampCustomData, DEFAULT_STAMPS, type ExcalidrawSceneSnapshot, type Geometry3DCustomData, type GeometryCustomData, type Graph2DCustomData, type LatexCustomData, type StampCustomData, type StampType, type SyncableAppState, Whiteboard, type WhiteboardProps, findStampForCustomData, geometry3dStamp, geometryStamp, graph2dStamp, isGeometry3DCustomData, isGeometryCustomData, isGraph2DCustomData, isLatexCustomData, isStampElement, latexStamp, pickSyncableAppState, restoreMissingStampFiles };