@poveste/shared 0.11.0 → 0.12.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/dist/story.d.ts CHANGED
@@ -1 +1,10 @@
1
1
  export declare const omitInheritStoryProps: string[];
2
+ /**
3
+ * Auto-props bookkeeping, which is not story state.
4
+ *
5
+ * `_hPropState` is keyed by a component's index *within one variant*, so it only
6
+ * means anything next to the `_hPropDefs` it was recorded against. Sharing
7
+ * either across variants cannot be right, and doing so made one variant's
8
+ * control edit reach every other variant in the story (#473).
9
+ */
10
+ export declare const autoPropsStateKeys: string[];
package/dist/story.js CHANGED
@@ -8,3 +8,15 @@ export const omitInheritStoryProps = [
8
8
  'slots',
9
9
  'lastSelectedVariant',
10
10
  ];
11
+ /**
12
+ * Auto-props bookkeeping, which is not story state.
13
+ *
14
+ * `_hPropState` is keyed by a component's index *within one variant*, so it only
15
+ * means anything next to the `_hPropDefs` it was recorded against. Sharing
16
+ * either across variants cannot be right, and doing so made one variant's
17
+ * control edit reach every other variant in the story (#473).
18
+ */
19
+ export const autoPropsStateKeys = [
20
+ '_hPropDefs',
21
+ '_hPropState',
22
+ ];
@@ -142,6 +142,18 @@ export interface PovesteConfig {
142
142
  * Class added to the story preview when dark mode is enabled.
143
143
  */
144
144
  darkClass?: string;
145
+ /**
146
+ * Language of the book, emitted as `<html lang>` on the shell and the
147
+ * sandbox.
148
+ *
149
+ * `html-has-lang` is WCAG 3.1.1 Level A: without it a screen reader falls
150
+ * back to the user agent's locale and may read the page in the wrong
151
+ * language. Defaults to `'en'`, because leaving it unset would keep that
152
+ * failure for everyone who does not read a changelog.
153
+ *
154
+ * @default 'en'
155
+ */
156
+ lang?: string;
145
157
  };
146
158
  /**
147
159
  * Setup file exporting a default function executed when setting up each story preview.
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@poveste/shared",
3
3
  "type": "module",
4
- "version": "0.11.0",
4
+ "version": "0.12.0",
5
5
  "description": "Shared utilities for Poveste",
6
6
  "author": {
7
- "name": "Sorin Gitlan"
7
+ "name": "Sorin Gitlan",
8
+ "url": "https://x.com/50rayn"
8
9
  },
9
10
  "license": "MIT",
10
11
  "homepage": "https://poveste.dev",
@@ -38,13 +39,13 @@
38
39
  "vite": "^8.0.0"
39
40
  },
40
41
  "dependencies": {
42
+ "@poveste/vendors": "^0.12.0",
41
43
  "@types/fs-extra": "^11.0.4",
42
44
  "@types/markdown-it": "^14.1.2",
43
45
  "chokidar": "^4.0.1",
44
46
  "pathe": "^1.1.2",
45
47
  "picocolors": "^1.1.1",
46
- "unhead": "^3.1.0",
47
- "@poveste/vendors": "^0.11.0"
48
+ "unhead": "^3.1.0"
48
49
  },
49
50
  "devDependencies": {
50
51
  "typescript": "5.6.3",