@picked/vite-plugin-picked 0.0.72-next.1 → 0.0.72-next.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/client.d.ts +26 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +22 -11
- package/dist/esm/index.js +243 -173
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/prefetch.d.ts.map +1 -1
- package/dist/types/virtual-module/api.d.ts +17 -0
- package/dist/types/virtual-module/api.d.ts.map +1 -0
- package/dist/types/virtual-module/build.d.ts.map +1 -1
- package/dist/types/virtual-module/dev.d.ts +15 -4
- package/dist/types/virtual-module/dev.d.ts.map +1 -1
- package/package.json +6 -2
package/client.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Ambient declaration for `virtual:picked/data`, the module this plugin registers.
|
|
3
|
+
*
|
|
4
|
+
* Reference it from a consuming project to type an import of the module:
|
|
5
|
+
*
|
|
6
|
+
* ```jsonc
|
|
7
|
+
* // tsconfig.json
|
|
8
|
+
* { "compilerOptions": { "types": ["@picked/vite-plugin-picked/client"] } }
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* /// <reference types="@picked/vite-plugin-picked/client" />
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* A project imports the module to hand it to the SDK — `createPickedDataProvider({ bundle })`
|
|
16
|
+
* or `dynamicExperiencesPlugin({ bundle })` — which skips the SDK's dynamic import and places
|
|
17
|
+
* the module in the importer's chunk, since a module that is both statically and dynamically
|
|
18
|
+
* imported is placed in the static chunk.
|
|
19
|
+
*/
|
|
20
|
+
declare module 'virtual:picked/data' {
|
|
21
|
+
import type { VirtualPickedData } from '@picked/client/plugins/dynamic-experiences'
|
|
22
|
+
|
|
23
|
+
export const projectConfig: VirtualPickedData['projectConfig']
|
|
24
|
+
export const experienceContent: VirtualPickedData['experienceContent']
|
|
25
|
+
export const manifestMetadata: VirtualPickedData['manifestMetadata']
|
|
26
|
+
}
|