@updog/data-editor-wc 0.1.64 → 0.1.66

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.
Files changed (5) hide show
  1. package/README.md +20 -2
  2. package/index.css +1 -1
  3. package/index.d.ts +16 -2
  4. package/index.js +4838 -4425
  5. package/package.json +1 -1
package/README.md CHANGED
@@ -120,6 +120,20 @@ Use for primitive values. The element observes these and re-renders on change.
120
120
 
121
121
  Everything else — objects, functions, arrays — must be set as a JS property or via `configure()`.
122
122
 
123
+ **Never put a callback in a template.** Set `onComplete`, `onError`, `onColumnMatch` and `onValueMatch`
124
+ through `configure()` or a property assignment. Written as a template binding they silently do nothing in
125
+ Vue and Svelte, and break the build in Angular.
126
+
127
+ ```html
128
+ <!-- wrong -->
129
+ <updog-editor :onComplete="save" />
130
+ ```
131
+
132
+ ```js
133
+ // right
134
+ editor.configure({ onComplete: save });
135
+ ```
136
+
123
137
  ```js
124
138
  const editor = document.querySelector("updog-editor");
125
139
  editor.columns = [...];
@@ -484,9 +498,13 @@ See the [Styling reference](https://docs.updog.tech/styling/) for the full varia
484
498
  Internal elements use BEM-style class names prefixed with `updog__`. Target them for deep customization:
485
499
 
486
500
  ```css
487
- updog-editor .updog__button--primary { background: purple; }
501
+ updog-editor .updog-button--primary { background: purple; }
488
502
  ```
489
503
 
504
+ There are two prefixes, and they are not interchangeable. Editor-level structure uses `updog__`
505
+ (`updog__data-editor`, `updog__layout`); the controls inside it come from the UI kit and use
506
+ `updog-` (`updog-button`, `updog-button--primary`, `updog-text--md`).
507
+
490
508
  ### Global CSS interaction
491
509
 
492
510
  Because there is no Shadow DOM, your page's global CSS applies inside the editor. If you have aggressive resets (e.g., `button { all: unset }`), scope them away from `updog-editor` descendants:
@@ -497,7 +515,7 @@ body *:not(updog-editor *) { /* your global rules */ }
497
515
 
498
516
  ## Notes
499
517
 
500
- - Fonts are inherited from your page. The editor uses `var(--updog-font-family)` which defaults to system fonts.
518
+ - Fonts are inherited from your page. If your app sets no `font-family`, the editor renders in the browser default, which is usually a serif. Set one on your app or on `updog-editor`. (`--updog-font-family` exists and defaults to system fonts, but only the grid's cell-editor input reads it.)
501
519
  - In modal mode, the editor portals to `document.body` as a full-screen overlay. In inline mode, it renders in place with no overlay.
502
520
  - Multiple `<updog-editor>` instances on the same page are fully independent.
503
521