@iyulab/components 2.2.1 → 2.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.2] - 2026-10-06
4
+
5
+ ### Documentation
6
+
7
+ - Examples that did not type-check against the API they teach: `Theme.init` persisted to localStorage with a `store.key` option that does not exist (the theme is stored under `theme`, with an optional `prefix`) in the theming guide and the skill reference; `Dialog.prompt` took `default` instead of `defaultValue`; the overlay-manager example read a field it never declared.
8
+
3
9
  ## [2.2.1] - 2026-10-06
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/components",
3
3
  "description": "web-components library based on lit-element made by iyulab",
4
- "version": "2.2.1",
4
+ "version": "2.2.2",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -45,7 +45,7 @@ await Theme.init({
45
45
  useBuiltIn: true, // load bundled CSS variables (default: true)
46
46
  store: { // persist theme preference in localStorage (optional)
47
47
  type: 'localStorage',
48
- key: 'app-theme'
48
+ prefix: 'my-app:' // stored under 'my-app:theme' (default key: 'theme')
49
49
  }
50
50
  });
51
51
  ```
@@ -290,7 +290,7 @@ await Dialog.alert('Operation completed.');
290
290
  const confirmed = await Dialog.confirm('Delete this item?');
291
291
 
292
292
  // Prompt
293
- const name = await Dialog.prompt('Enter your name:', { default: 'Alice' });
293
+ const name = await Dialog.prompt('Enter your name:', { defaultValue: 'Alice' });
294
294
 
295
295
  // Toast
296
296
  Toast.DefaultOptions = { position: 'bottom-center', duration: 3000 };
@@ -58,6 +58,7 @@ OverlayManager.closeLayer(panel); // when it closes, by any
58
58
  import { UOverlayElement } from '@iyulab/components';
59
59
 
60
60
  class MyOverlay extends UOverlayElement {
61
+ hasUnsavedChanges = false;
61
62
  // UOverlayElement already calls OverlayManager.add/remove internally
62
63
  // Override requestClose() if you need custom close logic
63
64
  override requestClose(source: string) {