@storybook/preact-vite 7.2.0-alpha.0 → 7.2.0-canary-23572-1690275421-726e1551.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,40 +17,7 @@ type Primitive =
|
|
17
17
|
| symbol
|
18
18
|
| bigint;
|
19
19
|
|
20
|
-
/**
|
21
|
-
Matches a JSON object.
|
22
|
-
|
23
|
-
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
24
|
-
|
25
|
-
@category JSON
|
26
|
-
*/
|
27
|
-
type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
|
28
|
-
|
29
|
-
/**
|
30
|
-
Matches a JSON array.
|
31
|
-
|
32
|
-
@category JSON
|
33
|
-
*/
|
34
|
-
type JsonArray = JsonValue[] | readonly JsonValue[];
|
35
|
-
|
36
|
-
/**
|
37
|
-
Matches any valid JSON primitive value.
|
38
|
-
|
39
|
-
@category JSON
|
40
|
-
*/
|
41
|
-
type JsonPrimitive = string | number | boolean | null;
|
42
|
-
|
43
|
-
/**
|
44
|
-
Matches any valid JSON value.
|
45
|
-
|
46
|
-
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
47
|
-
|
48
|
-
@category JSON
|
49
|
-
*/
|
50
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
51
|
-
|
52
20
|
declare global {
|
53
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
54
21
|
interface SymbolConstructor {
|
55
22
|
readonly observable: symbol;
|
56
23
|
}
|
@@ -116,8 +83,8 @@ declare namespace PackageJson$1 {
|
|
116
83
|
email?: string;
|
117
84
|
};
|
118
85
|
|
119
|
-
export
|
120
|
-
[directoryType: string]:
|
86
|
+
export interface DirectoryLocations {
|
87
|
+
[directoryType: string]: unknown;
|
121
88
|
|
122
89
|
/**
|
123
90
|
Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
|
@@ -148,7 +115,7 @@ declare namespace PackageJson$1 {
|
|
148
115
|
Location for test files.
|
149
116
|
*/
|
150
117
|
test?: string;
|
151
|
-
}
|
118
|
+
}
|
152
119
|
|
153
120
|
export type Scripts = {
|
154
121
|
/**
|
@@ -298,11 +265,22 @@ declare namespace PackageJson$1 {
|
|
298
265
|
export type Dependency = Partial<Record<string, string>>;
|
299
266
|
|
300
267
|
/**
|
301
|
-
|
268
|
+
Conditions which provide a way to resolve a package entry point based on the environment.
|
302
269
|
*/
|
303
|
-
type
|
304
|
-
|
305
|
-
|
270
|
+
export type ExportCondition = LiteralUnion<
|
271
|
+
| 'import'
|
272
|
+
| 'require'
|
273
|
+
| 'node'
|
274
|
+
| 'node-addons'
|
275
|
+
| 'deno'
|
276
|
+
| 'browser'
|
277
|
+
| 'electron'
|
278
|
+
| 'react-native'
|
279
|
+
| 'default',
|
280
|
+
string
|
281
|
+
>;
|
282
|
+
|
283
|
+
type ExportConditions = {[condition in ExportCondition]: Exports};
|
306
284
|
|
307
285
|
/**
|
308
286
|
Entry points of a module, optionally with conditions and subpath exports.
|
@@ -311,16 +289,16 @@ declare namespace PackageJson$1 {
|
|
311
289
|
| null
|
312
290
|
| string
|
313
291
|
| Array<string | ExportConditions>
|
314
|
-
| ExportConditions
|
292
|
+
| ExportConditions
|
293
|
+
| {[path: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
315
294
|
|
316
295
|
/**
|
317
|
-
Import map entries of a module, optionally with conditions
|
296
|
+
Import map entries of a module, optionally with conditions.
|
318
297
|
*/
|
319
298
|
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
320
|
-
[key:
|
299
|
+
[key: string]: string | {[key in ExportCondition]: Exports};
|
321
300
|
};
|
322
301
|
|
323
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
324
302
|
export interface NonStandardEntryPoints {
|
325
303
|
/**
|
326
304
|
An ECMAScript module ID that is the primary entry point to the program.
|
@@ -353,7 +331,7 @@ declare namespace PackageJson$1 {
|
|
353
331
|
sideEffects?: boolean | string[];
|
354
332
|
}
|
355
333
|
|
356
|
-
export
|
334
|
+
export interface TypeScriptConfiguration {
|
357
335
|
/**
|
358
336
|
Location of the bundled TypeScript declaration file.
|
359
337
|
*/
|
@@ -368,12 +346,12 @@ declare namespace PackageJson$1 {
|
|
368
346
|
Location of the bundled TypeScript declaration file. Alias of `types`.
|
369
347
|
*/
|
370
348
|
typings?: string;
|
371
|
-
}
|
349
|
+
}
|
372
350
|
|
373
351
|
/**
|
374
|
-
An alternative configuration for workspaces.
|
352
|
+
An alternative configuration for Yarn workspaces.
|
375
353
|
*/
|
376
|
-
export
|
354
|
+
export interface WorkspaceConfig {
|
377
355
|
/**
|
378
356
|
An array of workspace pattern strings which contain the workspace packages.
|
379
357
|
*/
|
@@ -382,11 +360,10 @@ declare namespace PackageJson$1 {
|
|
382
360
|
/**
|
383
361
|
Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
|
384
362
|
|
385
|
-
[
|
386
|
-
[Not supported](https://github.com/npm/rfcs/issues/287) by npm.
|
363
|
+
[Read more](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/)
|
387
364
|
*/
|
388
365
|
nohoist?: WorkspacePattern[];
|
389
|
-
}
|
366
|
+
}
|
390
367
|
|
391
368
|
/**
|
392
369
|
A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
|
@@ -399,7 +376,16 @@ declare namespace PackageJson$1 {
|
|
399
376
|
*/
|
400
377
|
type WorkspacePattern = string;
|
401
378
|
|
402
|
-
export
|
379
|
+
export interface YarnConfiguration {
|
380
|
+
/**
|
381
|
+
Used to configure [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
382
|
+
|
383
|
+
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run `yarn install` once to install all of them in a single pass.
|
384
|
+
|
385
|
+
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
386
|
+
*/
|
387
|
+
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
388
|
+
|
403
389
|
/**
|
404
390
|
If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
|
405
391
|
|
@@ -411,19 +397,18 @@ declare namespace PackageJson$1 {
|
|
411
397
|
Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
|
412
398
|
*/
|
413
399
|
resolutions?: Dependency;
|
414
|
-
}
|
400
|
+
}
|
415
401
|
|
416
|
-
export
|
402
|
+
export interface JSPMConfiguration {
|
417
403
|
/**
|
418
404
|
JSPM configuration.
|
419
405
|
*/
|
420
406
|
jspm?: PackageJson$1;
|
421
|
-
}
|
407
|
+
}
|
422
408
|
|
423
409
|
/**
|
424
410
|
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
|
425
411
|
*/
|
426
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
427
412
|
export interface PackageJsonStandard {
|
428
413
|
/**
|
429
414
|
The name of the package.
|
@@ -553,7 +538,7 @@ declare namespace PackageJson$1 {
|
|
553
538
|
/**
|
554
539
|
Is used to set configuration parameters used in package scripts that persist across upgrades.
|
555
540
|
*/
|
556
|
-
config?:
|
541
|
+
config?: Record<string, unknown>;
|
557
542
|
|
558
543
|
/**
|
559
544
|
The dependencies of the package.
|
@@ -594,7 +579,7 @@ declare namespace PackageJson$1 {
|
|
594
579
|
Engines that this package runs on.
|
595
580
|
*/
|
596
581
|
engines?: {
|
597
|
-
[EngineName in 'npm' | 'node' | string]?: string;
|
582
|
+
[EngineName in 'npm' | 'node' | string]?: string;
|
598
583
|
};
|
599
584
|
|
600
585
|
/**
|
@@ -693,41 +678,13 @@ declare namespace PackageJson$1 {
|
|
693
678
|
*/
|
694
679
|
url: string;
|
695
680
|
};
|
696
|
-
|
697
|
-
/**
|
698
|
-
Used to configure [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) / [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
699
|
-
|
700
|
-
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
|
701
|
-
|
702
|
-
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
703
|
-
*/
|
704
|
-
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
705
681
|
}
|
706
682
|
|
707
|
-
|
708
|
-
Type for [`package.json` file used by the Node.js runtime](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).
|
709
|
-
*/
|
710
|
-
export type NodeJsStandard = {
|
711
|
-
/**
|
712
|
-
Defines which package manager is expected to be used when working on the current project. It can set to any of the [supported package managers](https://nodejs.org/api/corepack.html#supported-package-managers), and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
|
713
|
-
|
714
|
-
__This field is currently experimental and needs to be opted-in; check the [Corepack](https://nodejs.org/api/corepack.html) page for details about the procedure.__
|
715
|
-
|
716
|
-
@example
|
717
|
-
```json
|
718
|
-
{
|
719
|
-
"packageManager": "<package manager name>@<version>"
|
720
|
-
}
|
721
|
-
```
|
722
|
-
*/
|
723
|
-
packageManager?: string;
|
724
|
-
};
|
725
|
-
|
726
|
-
export type PublishConfig = {
|
683
|
+
export interface PublishConfig {
|
727
684
|
/**
|
728
685
|
Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
|
729
686
|
*/
|
730
|
-
[additionalProperties: string]:
|
687
|
+
[additionalProperties: string]: unknown;
|
731
688
|
|
732
689
|
/**
|
733
690
|
When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
|
@@ -747,7 +704,7 @@ declare namespace PackageJson$1 {
|
|
747
704
|
Default: `'latest'`
|
748
705
|
*/
|
749
706
|
tag?: string;
|
750
|
-
}
|
707
|
+
}
|
751
708
|
}
|
752
709
|
|
753
710
|
/**
|
@@ -756,8 +713,6 @@ Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-j
|
|
756
713
|
@category File
|
757
714
|
*/
|
758
715
|
type PackageJson$1 =
|
759
|
-
JsonObject &
|
760
|
-
PackageJson$1.NodeJsStandard &
|
761
716
|
PackageJson$1.PackageJsonStandard &
|
762
717
|
PackageJson$1.NonStandardEntryPoints &
|
763
718
|
PackageJson$1.TypeScriptConfiguration &
|
package/dist/index.d.ts
CHANGED
package/dist/preset.d.ts
CHANGED
package/dist/preset.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{core:()=>core,viteFinal:()=>viteFinal});module.exports=__toCommonJS(preset_exports);var import_builder_vite=require("@storybook/builder-vite"),import_preset_vite=__toESM(require("@preact/preset-vite")),core={builder:"@storybook/builder-vite",renderer:"@storybook/preact"},viteFinal=async config=>{let{plugins=[]}=config;return await(0,import_builder_vite.hasVitePlugins)(plugins,["vite:preact-jsx"])||plugins.push((0,import_preset_vite.default)()),config};0&&(module.exports={core,viteFinal});
|
1
|
+
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{core:()=>core,viteFinal:()=>viteFinal});module.exports=__toCommonJS(preset_exports);var import_builder_vite=require("@storybook/builder-vite"),import_preset_vite=__toESM(require("@preact/preset-vite")),import_path=require("path"),getAbsolutePath=input=>(0,import_path.dirname)(require.resolve((0,import_path.join)(input,"package.json"))),core={builder:getAbsolutePath("@storybook/builder-vite"),renderer:getAbsolutePath("@storybook/preact")},viteFinal=async config=>{let{plugins=[]}=config;return await(0,import_builder_vite.hasVitePlugins)(plugins,["vite:preact-jsx"])||plugins.push((0,import_preset_vite.default)()),config};0&&(module.exports={core,viteFinal});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/preact-vite",
|
3
|
-
"version": "7.2.0-
|
3
|
+
"version": "7.2.0-canary-23572-1690275421-726e1551.0",
|
4
4
|
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -47,8 +47,8 @@
|
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
49
|
"@preact/preset-vite": "^2.0.0",
|
50
|
-
"@storybook/builder-vite": "7.2.0-
|
51
|
-
"@storybook/preact": "7.2.0-
|
50
|
+
"@storybook/builder-vite": "7.2.0-canary-23572-1690275421-726e1551.0",
|
51
|
+
"@storybook/preact": "7.2.0-canary-23572-1690275421-726e1551.0"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@types/node": "^16.0.0",
|