@slicemachine/adapter-next 0.0.13-dev-plugins-m3.8 → 0.1.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/constants.d.ts +4 -4
- package/dist/hooks/customType-asset-delete.d.ts +3 -3
- package/dist/hooks/customType-asset-read.d.ts +3 -3
- package/dist/hooks/customType-asset-update.d.ts +3 -3
- package/dist/hooks/customType-create.d.ts +3 -3
- package/dist/hooks/customType-delete.d.ts +3 -3
- package/dist/hooks/customType-read.d.ts +3 -3
- package/dist/hooks/customType-rename.d.ts +1 -1
- package/dist/hooks/customType-update.d.ts +1 -1
- package/dist/hooks/customTypeLibrary-read.d.ts +3 -3
- package/dist/hooks/project-init.d.ts +3 -3
- package/dist/hooks/slice-asset-delete.d.ts +3 -3
- package/dist/hooks/slice-asset-read.d.ts +3 -3
- package/dist/hooks/slice-asset-update.d.ts +3 -3
- package/dist/hooks/slice-create.d.ts +3 -3
- package/dist/hooks/slice-delete.d.ts +3 -3
- package/dist/hooks/slice-read.d.ts +3 -3
- package/dist/hooks/slice-rename.d.ts +3 -3
- package/dist/hooks/slice-update.d.ts +3 -3
- package/dist/hooks/sliceLibrary-read.d.ts +3 -3
- package/dist/hooks/sliceSimulator-setup-read.d.ts +3 -3
- package/dist/hooks/snippet-read.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/lib/buildCustomTypeAssetPath.d.ts +9 -9
- package/dist/lib/buildCustomTypeDirectoryPath.d.ts +8 -8
- package/dist/lib/buildCustomTypeLibraryDirectoryPath.d.ts +7 -7
- package/dist/lib/buildSliceAssetPath.d.ts +11 -11
- package/dist/lib/buildSliceDirectoryPath.d.ts +10 -10
- package/dist/lib/buildSliceLibraryDirectoryPath.d.ts +8 -8
- package/dist/lib/checkIsTypeScriptProject.d.ts +8 -8
- package/dist/lib/checkPathExists.d.ts +2 -2
- package/dist/lib/getJSOrTSXFileExtension.d.ts +8 -8
- package/dist/lib/isSharedSliceModel.d.ts +335 -335
- package/dist/lib/pascalCase.d.ts +8 -8
- package/dist/lib/readJSONFile.d.ts +1 -1
- package/dist/lib/rejectIfNecessary.d.ts +1 -1
- package/dist/lib/updateSliceModelFile.d.ts +9 -9
- package/dist/lib/upsertGlobalContentTypes.d.ts +12 -12
- package/dist/lib/upsertSliceLibraryIndexFile.d.ts +7 -7
- package/dist/plugin.d.ts +2 -2
- package/dist/simulator/SliceSimulator.d.ts +27 -27
- package/dist/simulator/index.d.ts +2 -2
- package/dist/types.d.ts +10 -10
- package/package.json +3 -3
package/dist/lib/pascalCase.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a string to a Pascal cased string.
|
|
3
|
-
*
|
|
4
|
-
* @param input - String to convert into a Pascal cased string.
|
|
5
|
-
*
|
|
6
|
-
* @returns Pascal cased string version of `input`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const pascalCase: (...input: (string | undefined)[]) => string;
|
|
1
|
+
/**
|
|
2
|
+
* Converts a string to a Pascal cased string.
|
|
3
|
+
*
|
|
4
|
+
* @param input - String to convert into a Pascal cased string.
|
|
5
|
+
*
|
|
6
|
+
* @returns Pascal cased string version of `input`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const pascalCase: (...input: (string | undefined)[]) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const readJSONFile: <T = unknown>(path: string) => Promise<T>;
|
|
1
|
+
export declare const readJSONFile: <T = unknown>(path: string) => Promise<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const rejectIfNecessary: <TPromiseSettledResults extends readonly PromiseSettledResult<any>[]>(promiseSettledResults: TPromiseSettledResults) => void;
|
|
1
|
+
export declare const rejectIfNecessary: <TPromiseSettledResults extends readonly PromiseSettledResult<any>[]>(promiseSettledResults: TPromiseSettledResults) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
3
|
-
import type { PluginOptions } from "../types";
|
|
4
|
-
type UpdateSliceModelFileArgs = {
|
|
5
|
-
libraryID: string;
|
|
6
|
-
model: SharedSlice;
|
|
7
|
-
} & SliceMachineContext<PluginOptions>;
|
|
8
|
-
export declare const updateSliceModelFile: ({ libraryID, model, helpers, options, }: UpdateSliceModelFileArgs) => Promise<void>;
|
|
9
|
-
export {};
|
|
1
|
+
import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
3
|
+
import type { PluginOptions } from "../types";
|
|
4
|
+
type UpdateSliceModelFileArgs = {
|
|
5
|
+
libraryID: string;
|
|
6
|
+
model: SharedSlice;
|
|
7
|
+
} & SliceMachineContext<PluginOptions>;
|
|
8
|
+
export declare const updateSliceModelFile: ({ libraryID, model, helpers, options, }: UpdateSliceModelFileArgs) => Promise<void>;
|
|
9
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
-
import type { PluginOptions } from "../types";
|
|
3
|
-
/**
|
|
4
|
-
* Arguments for `upsertGlobalContentTypes()`.
|
|
5
|
-
*/
|
|
6
|
-
type UpsertGlobalTypesArgs = Pick<SliceMachineContext<PluginOptions>, "actions" | "helpers" | "options">;
|
|
7
|
-
/**
|
|
8
|
-
* Creates a globally accessible TypeScript file containing types representing
|
|
9
|
-
* the Prismic repository's content.
|
|
10
|
-
*/
|
|
11
|
-
export declare const upsertGlobalContentTypes: ({ actions, helpers, options, }: UpsertGlobalTypesArgs) => Promise<void>;
|
|
12
|
-
export {};
|
|
1
|
+
import type { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import type { PluginOptions } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for `upsertGlobalContentTypes()`.
|
|
5
|
+
*/
|
|
6
|
+
type UpsertGlobalTypesArgs = Pick<SliceMachineContext<PluginOptions>, "actions" | "helpers" | "options">;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a globally accessible TypeScript file containing types representing
|
|
9
|
+
* the Prismic repository's content.
|
|
10
|
+
*/
|
|
11
|
+
export declare const upsertGlobalContentTypes: ({ actions, helpers, options, }: UpsertGlobalTypesArgs) => Promise<void>;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
-
import { PluginOptions } from "../types";
|
|
3
|
-
type UpsertSliceLibraryIndexFileArgs = {
|
|
4
|
-
libraryID: string;
|
|
5
|
-
} & SliceMachineContext<PluginOptions>;
|
|
6
|
-
export declare const upsertSliceLibraryIndexFile: (args: UpsertSliceLibraryIndexFileArgs) => Promise<void>;
|
|
7
|
-
export {};
|
|
1
|
+
import { SliceMachineContext } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PluginOptions } from "../types";
|
|
3
|
+
type UpsertSliceLibraryIndexFileArgs = {
|
|
4
|
+
libraryID: string;
|
|
5
|
+
} & SliceMachineContext<PluginOptions>;
|
|
6
|
+
export declare const upsertSliceLibraryIndexFile: (args: UpsertSliceLibraryIndexFileArgs) => Promise<void>;
|
|
7
|
+
export {};
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginOptions } from "./types";
|
|
2
|
-
export declare const plugin: import("@slicemachine/plugin-kit").SliceMachinePlugin<PluginOptions>;
|
|
1
|
+
import { PluginOptions } from "./types";
|
|
2
|
+
export declare const plugin: import("@slicemachine/plugin-kit").SliceMachinePlugin<PluginOptions>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { SliceSimulatorProps as BaseSliceSimulatorProps, SliceSimulatorState } from "@prismicio/slice-simulator-core";
|
|
2
|
-
export type SliceSimulatorSliceZoneProps = {
|
|
3
|
-
slices: SliceSimulatorState["slices"];
|
|
4
|
-
};
|
|
5
|
-
export type SliceSimulatorProps = {
|
|
6
|
-
/**
|
|
7
|
-
* React component to render simulated Slices.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
*
|
|
11
|
-
* ```tsx
|
|
12
|
-
* import { SliceSimulator } from "@slicemachine/adapter-next/simulator";
|
|
13
|
-
* import { SliceZone } from "@prismicio/react";
|
|
14
|
-
*
|
|
15
|
-
* import { components } from "../slices";
|
|
16
|
-
*
|
|
17
|
-
* <SliceSimulator
|
|
18
|
-
* sliceZone={({ slices }) => (
|
|
19
|
-
* <SliceZone slices={slices} components={components} />
|
|
20
|
-
* )}
|
|
21
|
-
* />;
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
sliceZone: (props: SliceSimulatorSliceZoneProps) => JSX.Element;
|
|
25
|
-
className?: string;
|
|
26
|
-
} & Omit<BaseSliceSimulatorProps, "state">;
|
|
27
|
-
export declare const SliceSimulator: ({ sliceZone: SliceZoneComp, background, zIndex, className, }: SliceSimulatorProps) => JSX.Element;
|
|
1
|
+
import { SliceSimulatorProps as BaseSliceSimulatorProps, SliceSimulatorState } from "@prismicio/slice-simulator-core";
|
|
2
|
+
export type SliceSimulatorSliceZoneProps = {
|
|
3
|
+
slices: SliceSimulatorState["slices"];
|
|
4
|
+
};
|
|
5
|
+
export type SliceSimulatorProps = {
|
|
6
|
+
/**
|
|
7
|
+
* React component to render simulated Slices.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { SliceSimulator } from "@slicemachine/adapter-next/simulator";
|
|
13
|
+
* import { SliceZone } from "@prismicio/react";
|
|
14
|
+
*
|
|
15
|
+
* import { components } from "../slices";
|
|
16
|
+
*
|
|
17
|
+
* <SliceSimulator
|
|
18
|
+
* sliceZone={({ slices }) => (
|
|
19
|
+
* <SliceZone slices={slices} components={components} />
|
|
20
|
+
* )}
|
|
21
|
+
* />;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
sliceZone: (props: SliceSimulatorSliceZoneProps) => JSX.Element;
|
|
25
|
+
className?: string;
|
|
26
|
+
} & Omit<BaseSliceSimulatorProps, "state">;
|
|
27
|
+
export declare const SliceSimulator: ({ sliceZone: SliceZoneComp, background, zIndex, className, }: SliceSimulatorProps) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SliceSimulator } from "./SliceSimulator";
|
|
2
|
-
export type { SliceSimulatorProps, SliceSimulatorSliceZoneProps, } from "./SliceSimulator";
|
|
1
|
+
export { SliceSimulator } from "./SliceSimulator";
|
|
2
|
+
export type { SliceSimulatorProps, SliceSimulatorSliceZoneProps, } from "./SliceSimulator";
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type PluginOptions = {
|
|
2
|
-
format?: boolean;
|
|
3
|
-
lazyLoadSlices?: boolean;
|
|
4
|
-
} & ({
|
|
5
|
-
typescript?: false;
|
|
6
|
-
jsxExtension?: boolean;
|
|
7
|
-
} | {
|
|
8
|
-
typescript: true;
|
|
9
|
-
jsxExtension?: never;
|
|
10
|
-
});
|
|
1
|
+
export type PluginOptions = {
|
|
2
|
+
format?: boolean;
|
|
3
|
+
lazyLoadSlices?: boolean;
|
|
4
|
+
} & ({
|
|
5
|
+
typescript?: false;
|
|
6
|
+
jsxExtension?: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
typescript: true;
|
|
9
|
+
jsxExtension?: never;
|
|
10
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slicemachine/adapter-next",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Slice Machine adapter for Next.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@prismicio/slice-simulator-core": "^0.2.7",
|
|
61
61
|
"@prismicio/types-internal": "2.0.0-alpha.9",
|
|
62
|
-
"@slicemachine/plugin-kit": "0.
|
|
62
|
+
"@slicemachine/plugin-kit": "0.2.0",
|
|
63
63
|
"common-tags": "^1.8.2",
|
|
64
64
|
"fs-extra": "^11.1.0",
|
|
65
65
|
"node-fetch": "^3.3.1",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "94819b03033580880acc7a3475a3dc9b4d466a0c"
|
|
108
108
|
}
|