@histoire/vendors 0.16.0 → 0.16.5

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 (86) hide show
  1. package/dist/client/b-floating-vue.js +2 -7
  2. package/dist/client/b-pinia.js +1970 -1953
  3. package/dist/client/b-vue-router.js +3574 -3550
  4. package/dist/client/b-vue-use.js +426 -360
  5. package/dist/client/b-vue.js +1 -1
  6. package/dist/client/node_modules/@babel/parser/package.json +6 -6
  7. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +4 -2
  8. package/dist/client/node_modules/{sourcemap-codec → @jridgewell/sourcemap-codec}/dist/types/sourcemap-codec.d.ts +1 -0
  9. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +74 -0
  10. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +992 -1202
  11. package/dist/client/node_modules/@vue/compiler-core/package.json +6 -6
  12. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +42 -66
  13. package/dist/client/node_modules/@vue/compiler-dom/package.json +4 -4
  14. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +473 -317
  15. package/dist/client/node_modules/@vue/compiler-sfc/package.json +16 -15
  16. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -6
  17. package/dist/client/node_modules/@vue/compiler-ssr/package.json +4 -4
  18. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +676 -351
  19. package/dist/client/node_modules/@vue/reactivity/package.json +3 -3
  20. package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +34 -44
  21. package/dist/client/node_modules/@vue/reactivity-transform/package.json +8 -8
  22. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1742 -2015
  23. package/dist/client/node_modules/@vue/runtime-core/package.json +4 -4
  24. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1168 -1427
  25. package/dist/client/node_modules/@vue/runtime-dom/package.json +5 -5
  26. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +71 -101
  27. package/dist/client/node_modules/@vue/server-renderer/package.json +5 -5
  28. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +308 -363
  29. package/dist/client/node_modules/@vue/shared/package.json +2 -2
  30. package/dist/client/node_modules/@vueuse/core/index.d.ts +28 -13
  31. package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +3 -3
  32. package/dist/client/node_modules/@vueuse/core/package.json +3 -3
  33. package/dist/client/node_modules/@vueuse/metadata/package.json +1 -1
  34. package/dist/client/node_modules/@vueuse/shared/index.d.ts +18 -5
  35. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +3 -3
  36. package/dist/client/node_modules/@vueuse/shared/package.json +1 -1
  37. package/dist/client/node_modules/csstype/index.d.ts +5009 -21819
  38. package/dist/client/node_modules/csstype/package.json +35 -25
  39. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +0 -7
  40. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +0 -7
  41. package/dist/client/node_modules/floating-vue/dist/index.d.ts +0 -7
  42. package/dist/client/node_modules/floating-vue/package.json +3 -2
  43. package/dist/client/node_modules/magic-string/{index.d.ts → dist/magic-string.cjs.d.ts} +50 -7
  44. package/dist/client/node_modules/magic-string/package.json +34 -22
  45. package/dist/client/node_modules/pinia/dist/pinia.d.ts +17 -5
  46. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +3 -3
  47. package/dist/client/node_modules/pinia/package.json +7 -7
  48. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +58 -49
  49. package/dist/client/node_modules/postcss/lib/comment.d.ts +43 -32
  50. package/dist/client/node_modules/postcss/lib/container.d.ts +224 -214
  51. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +111 -102
  52. package/dist/client/node_modules/postcss/lib/declaration.d.ts +85 -61
  53. package/dist/client/node_modules/postcss/lib/document.d.ts +27 -16
  54. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +6 -2
  55. package/dist/client/node_modules/postcss/lib/input.d.ts +99 -90
  56. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +69 -55
  57. package/dist/client/node_modules/postcss/lib/list.d.ts +53 -47
  58. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +24 -15
  59. package/dist/client/node_modules/postcss/lib/node.d.ts +339 -281
  60. package/dist/client/node_modules/postcss/lib/parse.d.ts +6 -2
  61. package/dist/client/node_modules/postcss/lib/postcss.d.ts +288 -320
  62. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +23 -14
  63. package/dist/client/node_modules/postcss/lib/processor.d.ts +52 -39
  64. package/dist/client/node_modules/postcss/lib/result.d.ts +77 -67
  65. package/dist/client/node_modules/postcss/lib/root.d.ts +49 -36
  66. package/dist/client/node_modules/postcss/lib/rule.d.ts +54 -45
  67. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +31 -22
  68. package/dist/client/node_modules/postcss/lib/stringify.d.ts +6 -2
  69. package/dist/client/node_modules/postcss/lib/warning.d.ts +72 -63
  70. package/dist/client/node_modules/postcss/package.json +7 -4
  71. package/dist/client/node_modules/vue/compiler-sfc/package.json +2 -3
  72. package/dist/client/node_modules/vue/dist/vue.d.ts +11 -9
  73. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +29 -0
  74. package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
  75. package/dist/client/node_modules/vue/jsx.d.ts +26 -0
  76. package/dist/client/node_modules/vue/package.json +41 -15
  77. package/dist/client/node_modules/vue/ref-macros.d.ts +1 -1
  78. package/dist/client/node_modules/vue/server-renderer/package.json +2 -3
  79. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +2 -1
  80. package/dist/client/node_modules/vue-router/package.json +38 -36
  81. package/dist/client/vue.runtime.esm-bundler.js +10048 -10684
  82. package/package.json +13 -13
  83. package/tsconfig.json +1 -2
  84. package/dist/client/node_modules/source-map/package.json +0 -73
  85. package/dist/client/node_modules/source-map/source-map.d.ts +0 -98
  86. package/dist/client/node_modules/sourcemap-codec/package.json +0 -53
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "csstype",
3
- "version": "2.6.21",
3
+ "version": "3.1.2",
4
4
  "main": "",
5
5
  "types": "index.d.ts",
6
6
  "description": "Strict TypeScript and Flow types for style based on MDN data",
@@ -9,36 +9,46 @@
9
9
  "license": "MIT",
10
10
  "devDependencies": {
11
11
  "@types/chokidar": "^2.1.3",
12
- "@types/jest": "^24.0.21",
13
- "@types/jsdom": "^12.2.4",
14
- "@types/node": "^12.12.3",
15
- "@types/prettier": "^1.18.3",
16
- "chalk": "^2.4.2",
17
- "chokidar": "^3.2.3",
18
- "fast-glob": "^3.1.0",
19
- "flow-bin": "^0.110.1",
20
- "jest": "^24.9.0",
21
- "jsdom": "^15.2.0",
22
- "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1e8eedcf98a3c282cc745d274050091fa7602490",
23
- "mdn-data": "git+https://github.com/mdn/data.git#fea9f55167435f34fb39912151e1cc4288e7afb7",
24
- "prettier": "^1.18.2",
25
- "sync-request": "^6.1.0",
26
- "ts-node": "^8.4.1",
27
- "tslint": "^5.20.0",
28
- "tslint-config-prettier": "^1.18.0",
29
- "turndown": "^5.0.3",
30
- "typescript": "~3.6.4"
12
+ "@types/css-tree": "^2.3.1",
13
+ "@types/jest": "^29.5.0",
14
+ "@types/jsdom": "^21.1.1",
15
+ "@types/node": "^16.18.23",
16
+ "@types/prettier": "^2.7.2",
17
+ "@types/request": "^2.48.8",
18
+ "@types/turndown": "^5.0.1",
19
+ "@typescript-eslint/eslint-plugin": "^5.57.0",
20
+ "@typescript-eslint/parser": "^5.57.0",
21
+ "chalk": "^4.1.2",
22
+ "chokidar": "^3.5.3",
23
+ "eslint": "^8.37.0",
24
+ "css-tree": "^2.3.1",
25
+ "eslint-config-prettier": "^8.8.0",
26
+ "eslint-plugin-prettier": "^4.2.1",
27
+ "fast-glob": "^3.2.12",
28
+ "flow-bin": "^0.203.1",
29
+ "jest": "^29.5.0",
30
+ "jsdom": "^21.1.1",
31
+ "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#22e0f5f1707f29f0c646ea89f5ba5ea7734fa48a",
32
+ "mdn-data": "git+https://github.com/mdn/data.git#d0e0fce2abd53e5c918a2f6a38e8c4607027768a",
33
+ "prettier": "^2.8.7",
34
+ "request": "^2.88.2",
35
+ "ts-jest": "^29.0.5",
36
+ "ts-node": "^10.9.1",
37
+ "turndown": "^7.1.2",
38
+ "typescript": "~5.0.3"
31
39
  },
32
40
  "scripts": {
41
+ "prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__",
42
+ "prepublishOnly": "tsc && npm run test:src && npm run build && ts-node --files prepublish.ts",
33
43
  "update": "ts-node --files update.ts",
34
44
  "build": "ts-node --files build.ts --start",
35
45
  "watch": "ts-node --files build.ts --watch",
36
- "lint": "tslint --exclude node_modules/**/* --exclude **/*.d.ts --fix **/*.ts",
46
+ "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
37
47
  "pretty": "prettier --write build.ts **/*.{ts,js,json,md}",
38
- "lazy": "tsc && npm run lint && npm run pretty",
39
- "test": "jest --no-cache",
40
- "typecheck": "tsc typecheck.ts --noEmit --pretty & flow check typecheck.js",
41
- "prepublish": "tsc && npm run test && npm run build && npm run typecheck"
48
+ "lazy": "tsc && npm run lint",
49
+ "test": "jest --runInBand",
50
+ "test:src": "jest src.*.ts",
51
+ "test:dist": "jest dist.*.ts --runInBand"
42
52
  },
43
53
  "files": [
44
54
  "index.d.ts",
@@ -165,10 +165,6 @@ declare const _default: () => import("vue").DefineComponent<{
165
165
  type: BooleanConstructor;
166
166
  default: (props: any) => any;
167
167
  };
168
- noAutoFocus: {
169
- type: BooleanConstructor;
170
- default: (props: any) => any;
171
- };
172
168
  }, unknown, {
173
169
  isShown: boolean;
174
170
  isMounted: boolean;
@@ -285,7 +281,6 @@ declare const _default: () => import("vue").DefineComponent<{
285
281
  flip?: unknown;
286
282
  shift?: unknown;
287
283
  shiftCrossAxis?: unknown;
288
- noAutoFocus?: unknown;
289
284
  } & {
290
285
  shift: boolean;
291
286
  disabled: boolean;
@@ -319,7 +314,6 @@ declare const _default: () => import("vue").DefineComponent<{
319
314
  arrowPadding: string | number;
320
315
  arrowOverflow: boolean;
321
316
  shiftCrossAxis: boolean;
322
- noAutoFocus: boolean;
323
317
  shown: boolean;
324
318
  theme: string;
325
319
  targetNodes: Function;
@@ -372,7 +366,6 @@ declare const _default: () => import("vue").DefineComponent<{
372
366
  arrowPadding: string | number;
373
367
  arrowOverflow: boolean;
374
368
  shiftCrossAxis: boolean;
375
- noAutoFocus: boolean;
376
369
  shown: boolean;
377
370
  referenceNode: Function;
378
371
  showGroup: string;
@@ -157,10 +157,6 @@ declare const _default: {
157
157
  type: BooleanConstructor;
158
158
  default: (props: any) => any;
159
159
  };
160
- noAutoFocus: {
161
- type: BooleanConstructor;
162
- default: (props: any) => any;
163
- };
164
160
  }, unknown, {
165
161
  isShown: boolean;
166
162
  isMounted: boolean;
@@ -277,7 +273,6 @@ declare const _default: {
277
273
  flip?: unknown;
278
274
  shift?: unknown;
279
275
  shiftCrossAxis?: unknown;
280
- noAutoFocus?: unknown;
281
276
  } & {
282
277
  shift: boolean;
283
278
  disabled: boolean;
@@ -311,7 +306,6 @@ declare const _default: {
311
306
  arrowPadding: string | number;
312
307
  arrowOverflow: boolean;
313
308
  shiftCrossAxis: boolean;
314
- noAutoFocus: boolean;
315
309
  shown: boolean;
316
310
  theme: string;
317
311
  targetNodes: Function;
@@ -364,7 +358,6 @@ declare const _default: {
364
358
  arrowPadding: string | number;
365
359
  arrowOverflow: boolean;
366
360
  shiftCrossAxis: boolean;
367
- noAutoFocus: boolean;
368
361
  shown: boolean;
369
362
  referenceNode: Function;
370
363
  showGroup: string;
@@ -179,10 +179,6 @@ export declare const Popper: () => import("vue").DefineComponent<{
179
179
  type: BooleanConstructor;
180
180
  default: (props: any) => any;
181
181
  };
182
- noAutoFocus: {
183
- type: BooleanConstructor;
184
- default: (props: any) => any;
185
- };
186
182
  }, unknown, {
187
183
  isShown: boolean;
188
184
  isMounted: boolean;
@@ -299,7 +295,6 @@ export declare const Popper: () => import("vue").DefineComponent<{
299
295
  flip?: unknown;
300
296
  shift?: unknown;
301
297
  shiftCrossAxis?: unknown;
302
- noAutoFocus?: unknown;
303
298
  } & {
304
299
  placement: string;
305
300
  strategy: string;
@@ -333,7 +328,6 @@ export declare const Popper: () => import("vue").DefineComponent<{
333
328
  flip: boolean;
334
329
  shift: boolean;
335
330
  shiftCrossAxis: boolean;
336
- noAutoFocus: boolean;
337
331
  shown: boolean;
338
332
  theme: string;
339
333
  targetNodes: Function;
@@ -386,7 +380,6 @@ export declare const Popper: () => import("vue").DefineComponent<{
386
380
  flip: boolean;
387
381
  shift: boolean;
388
382
  shiftCrossAxis: boolean;
389
- noAutoFocus: boolean;
390
383
  shown: boolean;
391
384
  referenceNode: Function;
392
385
  showGroup: string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floating-vue",
3
- "version": "2.0.0-beta.20",
3
+ "version": "2.0.0-beta.19",
4
4
  "description": "Easy Vue tooltips, dropdowns, menus & popovers using floating-ui",
5
5
  "author": "Guillaume Chau <guillaume.b.chau@gmail.com>",
6
6
  "scripts": {
@@ -66,5 +66,6 @@
66
66
  "type": "git",
67
67
  "url": "git+https://github.com/Akryum/floating-vue.git",
68
68
  "directory": "packages/floating-vue"
69
- }
69
+ },
70
+ "gitHead": "051eaac250083db4d1715ee3a9b5a71c5ab63e0b"
70
71
  }
@@ -10,9 +10,11 @@ export interface SourceMapOptions {
10
10
  * be able to pinpoint the exact location of function calls and so on.
11
11
  * With lo-res mappings, devtools may only be able to identify the correct
12
12
  * line - but they're quicker to generate and less bulky.
13
+ * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
14
+ * instead of per character, suitable for string semantics that are separated by words.
13
15
  * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
14
16
  */
15
- hires?: boolean;
17
+ hires?: boolean | 'boundary';
16
18
  /**
17
19
  * The filename where you plan to write the sourcemap.
18
20
  */
@@ -35,9 +37,10 @@ export type SourceMapSegment =
35
37
  export interface DecodedSourceMap {
36
38
  file: string;
37
39
  sources: string[];
38
- sourcesContent: string[];
40
+ sourcesContent: (string | null)[];
39
41
  names: string[];
40
42
  mappings: SourceMapSegment[][];
43
+ x_google_ignoreList?: number[];
41
44
  }
42
45
 
43
46
  export class SourceMap {
@@ -46,9 +49,10 @@ export class SourceMap {
46
49
  version: number;
47
50
  file: string;
48
51
  sources: string[];
49
- sourcesContent: string[];
52
+ sourcesContent: (string | null)[];
50
53
  names: string[];
51
54
  mappings: string;
55
+ x_google_ignoreList?: number[];
52
56
 
53
57
  /**
54
58
  * Returns the equivalent of `JSON.stringify(map)`
@@ -63,7 +67,17 @@ export class SourceMap {
63
67
 
64
68
  export class Bundle {
65
69
  constructor(options?: BundleOptions);
66
- addSource(source: MagicString | { filename?: string, content: MagicString }): Bundle;
70
+ /**
71
+ * Adds the specified source to the bundle, which can either be a `MagicString` object directly,
72
+ * or an options object that holds a magic string `content` property and optionally provides
73
+ * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint
74
+ * (which defaults to `false`). The `filename` is used when constructing the source map for the
75
+ * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint
76
+ * is used to populate the `x_google_ignoreList` extension field in the source map, which is a
77
+ * mechanism for tools to signal to debuggers that certain sources should be ignored by default
78
+ * (depending on user preferences).
79
+ */
80
+ addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle;
67
81
  append(str: string, options?: BundleOptions): Bundle;
68
82
  clone(): Bundle;
69
83
  generateMap(options?: SourceMapOptions): SourceMap;
@@ -98,6 +112,11 @@ export interface OverwriteOptions {
98
112
  contentOnly?: boolean;
99
113
  }
100
114
 
115
+ export interface UpdateOptions {
116
+ storeName?: boolean;
117
+ overwrite?: boolean;
118
+ }
119
+
101
120
  export default class MagicString {
102
121
  constructor(str: string, options?: MagicStringOptions);
103
122
  /**
@@ -110,7 +129,7 @@ export default class MagicString {
110
129
  append(content: string): MagicString;
111
130
  /**
112
131
  * Appends the specified content at the index in the original string.
113
- * If a range *ending* with index is subsequently moved, the insert will be moved with it.
132
+ * If a range *ending* with index is subsequently moved, the insert will be moved with it.
114
133
  * See also `s.prependLeft(...)`.
115
134
  */
116
135
  appendLeft(index: number, content: string): MagicString;
@@ -155,15 +174,26 @@ export default class MagicString {
155
174
  */
156
175
  move(start: number, end: number, index: number): MagicString;
157
176
  /**
158
- * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
177
+ * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
178
+ * that range. The same restrictions as `s.remove()` apply.
159
179
  *
160
180
  * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
161
181
  * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
162
182
  * the content is overwritten, or anything that was appended/prepended to the range as well.
183
+ *
184
+ * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
163
185
  */
164
186
  overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
165
187
  /**
166
- * Prepends the string with the specified content.
188
+ * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
189
+ *
190
+ * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
191
+ * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
192
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
193
+ */
194
+ update(start: number, end: number, content: string, options?: boolean | UpdateOptions): MagicString;
195
+ /**
196
+ * Prepends the string with the specified content.
167
197
  */
168
198
  prepend(content: string): MagicString;
169
199
  /**
@@ -204,6 +234,14 @@ export default class MagicString {
204
234
  * Removes empty lines from the start and end.
205
235
  */
206
236
  trimLines(): MagicString;
237
+ /**
238
+ * String replacement with RegExp or string.
239
+ */
240
+ replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
241
+ /**
242
+ * Same as `s.replace`, but replace all matched strings instead of just one.
243
+ */
244
+ replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
207
245
 
208
246
  lastChar(): string;
209
247
  lastLine(): string;
@@ -213,6 +251,11 @@ export default class MagicString {
213
251
  isEmpty(): boolean;
214
252
  length(): number;
215
253
 
254
+ /**
255
+ * Indicates if the string has been changed.
256
+ */
257
+ hasChanged(): boolean;
258
+
216
259
  original: string;
217
260
  /**
218
261
  * Returns the generated string.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-string",
3
- "version": "0.25.9",
3
+ "version": "0.30.2",
4
4
  "description": "Modify strings, generate sourcemaps",
5
5
  "keywords": [
6
6
  "string",
@@ -12,41 +12,53 @@
12
12
  "repository": "https://github.com/rich-harris/magic-string",
13
13
  "license": "MIT",
14
14
  "author": "Rich Harris",
15
- "main": "dist/magic-string.cjs.js",
16
- "module": "dist/magic-string.es.js",
17
- "jsnext:main": "dist/magic-string.es.js",
18
- "typings": "index.d.ts",
15
+ "main": "./dist/magic-string.cjs.js",
16
+ "module": "./dist/magic-string.es.mjs",
17
+ "jsnext:main": "./dist/magic-string.es.mjs",
18
+ "types": "./dist/magic-string.cjs.d.ts",
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ ".": {
22
+ "import": "./dist/magic-string.es.mjs",
23
+ "require": "./dist/magic-string.cjs.js"
24
+ }
25
+ },
19
26
  "files": [
20
27
  "dist/*",
21
28
  "index.d.ts",
22
29
  "README.md"
23
30
  ],
24
31
  "scripts": {
25
- "build": "rollup -c",
32
+ "build": "rollup -c && cp ./src/index.d.ts ./dist/magic-string.es.d.mts && cp ./src/index.d.ts ./dist/magic-string.cjs.d.ts",
26
33
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
27
34
  "format": "prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js",
28
- "lint": "eslint src test",
35
+ "lint": "eslint src test && publint",
29
36
  "prepare": "npm run build",
30
- "prepublishOnly": "rm -rf dist && npm test",
37
+ "prepublishOnly": "npm run lint && rm -rf dist && npm test",
31
38
  "release": "bumpp -x \"npm run changelog\" --all --commit --tag --push && npm publish",
32
- "pretest": "npm run lint && npm run build",
39
+ "pretest": "npm run build",
33
40
  "test": "mocha",
41
+ "bench": "npm run build && node benchmark/index.mjs",
34
42
  "watch": "rollup -cw"
35
43
  },
36
- "dependencies": {
37
- "sourcemap-codec": "^1.4.8"
38
- },
39
44
  "devDependencies": {
40
- "@rollup/plugin-buble": "^0.21.3",
41
- "@rollup/plugin-node-resolve": "^13.1.3",
42
- "@rollup/plugin-replace": "^4.0.0",
43
- "bumpp": "^7.1.1",
44
- "conventional-changelog-cli": "^2.2.2",
45
- "eslint": "^7.32.0",
46
- "mocha": "^9.2.1",
47
- "prettier": "^2.5.1",
48
- "rollup": "^2.69.0",
49
- "source-map": "^0.6.1",
45
+ "@rollup/plugin-node-resolve": "^15.1.0",
46
+ "@rollup/plugin-replace": "^5.0.2",
47
+ "benchmark": "^2.1.4",
48
+ "bumpp": "^9.1.1",
49
+ "conventional-changelog-cli": "^3.0.0",
50
+ "eslint": "^8.45.0",
51
+ "mocha": "^10.2.0",
52
+ "prettier": "^3.0.0",
53
+ "publint": "^0.2.0",
54
+ "rollup": "^3.26.3",
55
+ "source-map-js": "^1.0.2",
50
56
  "source-map-support": "^0.5.21"
57
+ },
58
+ "engines": {
59
+ "node": ">=12"
60
+ },
61
+ "dependencies": {
62
+ "@jridgewell/sourcemap-codec": "^1.4.15"
51
63
  }
52
64
  }
@@ -23,7 +23,7 @@ import type { WatchOptions } from 'vue-demi';
23
23
  * @param initialUseStore - return of the defineStore to hot update
24
24
  * @param hot - `import.meta.hot`
25
25
  */
26
- export declare function acceptHMRUpdate(initialUseStore: StoreDefinition, hot: any): (newModule: any) => any;
26
+ export declare function acceptHMRUpdate<Id extends string = string, S extends StateTree = StateTree, G extends _GettersTree<S> = _GettersTree<S>, A = _ActionsTree>(initialUseStore: StoreDefinition<Id, S, G, A>, hot: any): (newModule: any) => any;
27
27
 
28
28
  /**
29
29
  * Type of an object of Actions. For internal usage only.
@@ -405,7 +405,12 @@ export declare function mapWritableState<Id extends string, S extends StateTree,
405
405
  * @param useStore - store to map from
406
406
  * @param keys - array of state properties
407
407
  */
408
- export declare function mapWritableState<Id extends string, S extends StateTree, G extends _GettersTree<S>, A>(useStore: StoreDefinition<Id, S, G, A>, keys: Array<keyof S>): _MapWritableStateReturn<S>;
408
+ export declare function mapWritableState<Id extends string, S extends StateTree, G extends _GettersTree<S>, A, Keys extends keyof S>(useStore: StoreDefinition<Id, S, G, A>, keys: readonly Keys[]): {
409
+ [K in Keys]: {
410
+ get: () => S[K];
411
+ set: (value: S[K]) => any;
412
+ };
413
+ };
409
414
 
410
415
  /**
411
416
  * For internal use **only**
@@ -559,13 +564,19 @@ export declare type PiniaStorePlugin = PiniaPlugin;
559
564
  */
560
565
  export declare const PiniaVuePlugin: Plugin_2;
561
566
 
567
+ declare interface _SetActivePinia {
568
+ (pinia: Pinia): Pinia;
569
+ (pinia: undefined): undefined;
570
+ (pinia: Pinia | undefined): Pinia | undefined;
571
+ }
572
+
562
573
  /**
563
574
  * Sets or unsets the active pinia. Used in SSR and internally when calling
564
575
  * actions and getters
565
576
  *
566
577
  * @param pinia - Pinia instance
567
578
  */
568
- export declare const setActivePinia: (pinia: Pinia | undefined) => Pinia | undefined;
579
+ export declare const setActivePinia: _SetActivePinia;
569
580
 
570
581
  /**
571
582
  * Changes the suffix added by `mapStores()`. Can be set to an empty string.
@@ -752,7 +763,7 @@ export declare type _StoreWithGetters<G> = {
752
763
  */
753
764
  export declare interface _StoreWithState<Id extends string, S extends StateTree, G, A> extends StoreProperties<Id> {
754
765
  /**
755
- * State of the Store. Setting it will replace the whole state.
766
+ * State of the Store. Setting it will internally call `$patch()` to update the state.
756
767
  */
757
768
  $state: UnwrapRef<S> & PiniaCustomStateProperties<S>;
758
769
  /**
@@ -766,7 +777,7 @@ export declare interface _StoreWithState<Id extends string, S extends StateTree,
766
777
  * Sets or arrays and applying an object patch isn't practical, e.g. appending
767
778
  * to an array. The function passed to `$patch()` **must be synchronous**.
768
779
  *
769
- * @param stateMutator - function that mutates `state`, cannot be async
780
+ * @param stateMutator - function that mutates `state`, cannot be asynchronous
770
781
  */
771
782
  $patch<F extends (state: UnwrapRef<S>) => any>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void;
772
783
  /**
@@ -955,6 +966,7 @@ declare module 'vue/types/options' {
955
966
  }
956
967
  }
957
968
 
969
+ // TODO: figure out why it cannot be 'vue'
958
970
  // @ts-ignore: works on Vue 3, fails in Vue 2
959
971
  declare module '@vue/runtime-core' {
960
972
  export interface ComponentCustomProperties {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-demi",
3
- "version": "0.13.11",
3
+ "version": "0.14.5",
4
4
  "engines": {
5
5
  "node": ">=12"
6
6
  },
@@ -15,10 +15,10 @@
15
15
  "types": "lib/index.d.ts",
16
16
  "exports": {
17
17
  ".": {
18
+ "types": "./lib/index.d.ts",
18
19
  "require": "./lib/index.cjs",
19
20
  "import": "./lib/index.mjs",
20
- "browser": "./lib/index.mjs",
21
- "types": "./lib/index.d.ts"
21
+ "browser": "./lib/index.mjs"
22
22
  },
23
23
  "./*": "./*"
24
24
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia",
3
- "version": "2.0.30",
3
+ "version": "2.1.6",
4
4
  "description": "Intuitive, type safe and flexible Store for Vue",
5
5
  "main": "index.js",
6
6
  "module": "dist/pinia.mjs",
@@ -62,17 +62,17 @@
62
62
  ],
63
63
  "license": "MIT",
64
64
  "devDependencies": {
65
- "@microsoft/api-extractor": "7.33.6",
66
- "@vue/test-utils": "^2.2.6"
65
+ "@microsoft/api-extractor": "7.34.4",
66
+ "@vue/test-utils": "^2.4.0"
67
67
  },
68
68
  "dependencies": {
69
- "@vue/devtools-api": "^6.4.5",
70
- "vue-demi": "*"
69
+ "@vue/devtools-api": "^6.5.0",
70
+ "vue-demi": ">=0.14.5"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@vue/composition-api": "^1.4.0",
74
74
  "typescript": ">=4.4.4",
75
- "vue": "^2.6.14 || ^3.2.0"
75
+ "vue": "^2.6.14 || ^3.3.0"
76
76
  },
77
77
  "peerDependenciesMeta": {
78
78
  "typescript": {
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "homepage": "https://github.com/vuejs/pinia#readme",
93
93
  "scripts": {
94
- "build": "rimraf dist && rollup -c ../../rollup.config.js --environment TARGET:pinia",
94
+ "build": "rimraf dist && rollup -c ../../rollup.config.mjs --environment TARGET:pinia",
95
95
  "build:dts": "api-extractor run --local --verbose && tail -n +3 ./src/globalExtensions.ts >> dist/pinia.d.ts",
96
96
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l pinia -r 1",
97
97
  "test:dts": "tsc -p ./test-dts/tsconfig.json",