@objectifthunes/whiteboard 0.2.6 → 0.2.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ObjectifThunes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -215,16 +215,17 @@ A portaled, accessible confirmation dialog. Closes on `Escape`, click outside, o
215
215
  />
216
216
  ```
217
217
 
218
- | Prop | Type | Default | Description |
219
- | -------------- | ------------------- | ----------- | -------------------------------------------- |
220
- | `open` | `boolean` | — | Controls visibility. |
221
- | `title` | `string` | — | Dialog title (also `aria-label`). |
222
- | `message` | `string` | — | Body text. |
223
- | `confirmLabel` | `string` | `'Confirm'` | Confirm button label. |
224
- | `loading` | `boolean` | `false` | Disables confirm and shows `Deleting…`. |
225
- | `error` | `string \| null` | | Inline error shown above the actions. |
226
- | `onConfirm` | `() => void` | — | Confirm handler. |
227
- | `onCancel` | `() => void` | — | Cancel handler (also fires on Escape / backdrop). |
218
+ | Prop | Type | Default | Description |
219
+ | -------------- | ------------------- | ------------------ | -------------------------------------------- |
220
+ | `open` | `boolean` | — | Controls visibility. |
221
+ | `title` | `string` | — | Dialog title (also `aria-label`). |
222
+ | `message` | `string` | — | Body text. |
223
+ | `confirmLabel` | `string` | `'Confirm'` | Confirm button label. |
224
+ | `loadingLabel` | `string` | `'<confirmLabel>…'` | Confirm button label while `loading`. |
225
+ | `loading` | `boolean` | `false` | Disables confirm and swaps to `loadingLabel`. |
226
+ | `error` | `string \| null` | — | Inline error shown above the actions. |
227
+ | `onConfirm` | `() => void` | — | Confirm handler. |
228
+ | `onCancel` | `() => void` | — | Cancel handler (also fires on Escape / backdrop). |
228
229
 
229
230
  ---
230
231
 
@@ -1157,19 +1158,23 @@ Theming uses CSS custom properties on `[data-theme]`. The built-in styles expose
1157
1158
 
1158
1159
  ```css
1159
1160
  :root {
1160
- --wb-bg: #ffffff;
1161
- --wb-fg: #0b0b0c;
1162
- --wb-muted: #6c6c70;
1163
- --wb-border: #e5e5e7;
1164
- --wb-accent: #2563eb;
1161
+ --wb-bg: #f3f4f6;
1162
+ --wb-surface: #ffffff;
1163
+ --wb-text: #111827;
1164
+ --wb-text-muted: #6b7280;
1165
+ --wb-border: #e5e7eb;
1166
+ --wb-primary: #1f2937;
1167
+ --wb-danger: #dc2626;
1165
1168
  /* …and more — inspect dist/whiteboard.css for the full set */
1166
1169
  }
1167
1170
 
1168
1171
  [data-theme='dark'] {
1169
- --wb-bg: #0b0b0c;
1170
- --wb-fg: #f5f5f7;
1171
- --wb-muted: #9a9a9f;
1172
- --wb-border: #2a2a2c;
1172
+ --wb-bg: #0f1117;
1173
+ --wb-surface: #1a1d27;
1174
+ --wb-text: #e5e7eb;
1175
+ --wb-text-muted: #6b7280;
1176
+ --wb-border: #2d3041;
1177
+ --wb-primary: #e5e7eb;
1173
1178
  }
1174
1179
  ```
1175
1180
 
package/dist/index.d.ts CHANGED
@@ -142,7 +142,7 @@ export declare function computeWhiteboardRectFocus(rect: PanelRect, viewportSize
142
142
  };
143
143
  };
144
144
 
145
- export declare function ConfirmDialog({ open, title, message, onConfirm, onCancel, confirmLabel, loading, error, }: Props_5): ReactPortal | null;
145
+ export declare function ConfirmDialog({ open, title, message, onConfirm, onCancel, confirmLabel, loadingLabel, loading, error, }: Props_5): ReactPortal | null;
146
146
 
147
147
  /**
148
148
  * A 2-column grid for coordinate inputs.
@@ -330,7 +330,7 @@ export declare type PanelRect = {
330
330
 
331
331
  export declare function PanelSection({ heading, description, actions, className, children, ...props }: PanelSectionProps): JSX_2.Element;
332
332
 
333
- declare interface PanelSectionProps extends HTMLAttributes<HTMLDivElement> {
333
+ declare interface PanelSectionProps extends HTMLAttributes<HTMLElement> {
334
334
  heading?: ReactNode;
335
335
  description?: ReactNode;
336
336
  actions?: ReactNode;
@@ -436,6 +436,8 @@ declare interface Props_5 {
436
436
  onConfirm: () => void;
437
437
  onCancel: () => void;
438
438
  confirmLabel?: string;
439
+ /** Label shown on the confirm button while `loading` is true. Defaults to `${confirmLabel}…`. */
440
+ loadingLabel?: string;
439
441
  loading?: boolean;
440
442
  error?: string | null;
441
443
  }