@prismicio/vue 4.2.3 → 5.0.0-alpha.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/README.md +4 -4
- package/dist/PrismicEmbed.vue.cjs +25 -0
- package/dist/PrismicEmbed.vue.cjs.map +1 -0
- package/dist/PrismicEmbed.vue.d.ts +19 -0
- package/dist/PrismicEmbed.vue.js +26 -0
- package/dist/PrismicEmbed.vue.js.map +1 -0
- package/dist/PrismicEmbed.vue2.cjs +4 -0
- package/dist/PrismicEmbed.vue2.cjs.map +1 -0
- package/dist/PrismicEmbed.vue2.js +5 -0
- package/dist/PrismicEmbed.vue2.js.map +1 -0
- package/dist/PrismicImage.vue.cjs +84 -0
- package/dist/PrismicImage.vue.cjs.map +1 -0
- package/dist/PrismicImage.vue.d.ts +224 -0
- package/dist/PrismicImage.vue.js +85 -0
- package/dist/PrismicImage.vue.js.map +1 -0
- package/dist/PrismicImage.vue2.cjs +4 -0
- package/dist/PrismicImage.vue2.cjs.map +1 -0
- package/dist/PrismicImage.vue2.js +5 -0
- package/dist/PrismicImage.vue2.js.map +1 -0
- package/dist/PrismicLink.vue.cjs +100 -0
- package/dist/PrismicLink.vue.cjs.map +1 -0
- package/dist/PrismicLink.vue.d.ts +278 -0
- package/dist/PrismicLink.vue.js +101 -0
- package/dist/PrismicLink.vue.js.map +1 -0
- package/dist/PrismicLink.vue2.cjs +4 -0
- package/dist/PrismicLink.vue2.cjs.map +1 -0
- package/dist/PrismicLink.vue2.js +5 -0
- package/dist/PrismicLink.vue2.js.map +1 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.cjs +90 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.cjs.map +1 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.d.ts +7 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js +91 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.js.map +1 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.cjs +4 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.cjs.map +1 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.js +5 -0
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue2.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue.cjs +85 -0
- package/dist/PrismicRichText/PrismicRichText.vue.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts +57 -0
- package/dist/PrismicRichText/PrismicRichText.vue.js +86 -0
- package/dist/PrismicRichText/PrismicRichText.vue.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue2.cjs +4 -0
- package/dist/PrismicRichText/PrismicRichText.vue2.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichText.vue2.js +5 -0
- package/dist/PrismicRichText/PrismicRichText.vue2.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.cjs +133 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.d.ts +37 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.js +134 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.cjs +4 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.js +5 -0
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue2.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.cjs +47 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.d.ts +10 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.js +48 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue.js.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.cjs +4 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.cjs.map +1 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.js +5 -0
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue2.js.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.cjs +10 -0
- package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -0
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts +49 -0
- package/dist/PrismicRichText/getRichTextComponentProps.js +10 -0
- package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -0
- package/dist/PrismicRichText/index.d.ts +2 -0
- package/dist/PrismicRichText/types.d.ts +22 -0
- package/dist/PrismicText.vue.cjs +43 -0
- package/dist/PrismicText.vue.cjs.map +1 -0
- package/dist/PrismicText.vue.d.ts +31 -0
- package/dist/PrismicText.vue.js +44 -0
- package/dist/PrismicText.vue.js.map +1 -0
- package/dist/PrismicText.vue2.cjs +4 -0
- package/dist/PrismicText.vue2.cjs.map +1 -0
- package/dist/PrismicText.vue2.js +5 -0
- package/dist/PrismicText.vue2.js.map +1 -0
- package/dist/SliceZone/SliceZone.vue.cjs +63 -0
- package/dist/SliceZone/SliceZone.vue.cjs.map +1 -0
- package/dist/SliceZone/SliceZone.vue.d.ts +40 -0
- package/dist/SliceZone/SliceZone.vue.js +64 -0
- package/dist/SliceZone/SliceZone.vue.js.map +1 -0
- package/dist/SliceZone/SliceZone.vue2.cjs +4 -0
- package/dist/SliceZone/SliceZone.vue2.cjs.map +1 -0
- package/dist/SliceZone/SliceZone.vue2.js +5 -0
- package/dist/SliceZone/SliceZone.vue2.js.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.cjs +29 -0
- package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -0
- package/dist/SliceZone/TODOSliceComponent.d.ts +9 -0
- package/dist/SliceZone/TODOSliceComponent.js +29 -0
- package/dist/SliceZone/TODOSliceComponent.js.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.cjs +14 -0
- package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -0
- package/dist/SliceZone/defineSliceZoneComponents.d.ts +36 -0
- package/dist/SliceZone/defineSliceZoneComponents.js +14 -0
- package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.cjs +22 -0
- package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -0
- package/dist/SliceZone/getSliceComponentProps.d.ts +66 -0
- package/dist/SliceZone/getSliceComponentProps.js +22 -0
- package/dist/SliceZone/getSliceComponentProps.js.map +1 -0
- package/dist/SliceZone/index.d.ts +4 -0
- package/dist/SliceZone/types.d.ts +97 -0
- package/dist/createPrismic.cjs +17 -50
- package/dist/createPrismic.cjs.map +1 -1
- package/dist/createPrismic.d.ts +10 -0
- package/dist/createPrismic.js +16 -27
- package/dist/createPrismic.js.map +1 -1
- package/dist/index.cjs +21 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -9
- package/dist/index.js +19 -38
- package/dist/index.js.map +1 -1
- package/dist/lib/Wrapper.vue.cjs +20 -0
- package/dist/lib/Wrapper.vue.cjs.map +1 -0
- package/dist/lib/Wrapper.vue.d.ts +34 -0
- package/dist/lib/Wrapper.vue.js +21 -0
- package/dist/lib/Wrapper.vue.js.map +1 -0
- package/dist/lib/Wrapper.vue2.cjs +4 -0
- package/dist/lib/Wrapper.vue2.cjs.map +1 -0
- package/dist/lib/Wrapper.vue2.js +5 -0
- package/dist/lib/Wrapper.vue2.js.map +1 -0
- package/dist/lib/devMsg.cjs +8 -0
- package/dist/lib/devMsg.cjs.map +1 -0
- package/dist/lib/devMsg.d.ts +16 -0
- package/dist/lib/devMsg.js +8 -0
- package/dist/lib/devMsg.js.map +1 -0
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/package.json.cjs +5 -0
- package/dist/package.json.cjs.map +1 -0
- package/dist/package.json.js +5 -0
- package/dist/package.json.js.map +1 -0
- package/dist/types.d.ts +42 -58
- package/dist/usePrismic.cjs +3 -2
- package/dist/usePrismic.cjs.map +1 -1
- package/dist/usePrismic.d.ts +13 -5
- package/dist/usePrismic.js +2 -1
- package/dist/usePrismic.js.map +1 -1
- package/package.json +33 -36
- package/src/PrismicEmbed.vue +42 -0
- package/src/PrismicImage.vue +160 -0
- package/src/PrismicLink.vue +191 -0
- package/src/PrismicRichText/DeprecatedPrismicRichText.vue +130 -0
- package/src/PrismicRichText/PrismicRichText.vue +157 -0
- package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +63 -0
- package/src/PrismicRichText/PrismicRichTextSerialize.vue +52 -0
- package/src/PrismicRichText/getRichTextComponentProps.ts +63 -0
- package/src/PrismicRichText/index.ts +3 -0
- package/src/PrismicRichText/types.ts +37 -0
- package/src/PrismicText.vue +63 -0
- package/src/SliceZone/SliceZone.vue +113 -0
- package/src/SliceZone/TODOSliceComponent.ts +49 -0
- package/src/SliceZone/defineSliceZoneComponents.ts +67 -0
- package/src/SliceZone/getSliceComponentProps.ts +98 -0
- package/src/SliceZone/index.ts +13 -0
- package/src/SliceZone/types.ts +163 -0
- package/src/createPrismic.ts +54 -53
- package/src/index.ts +33 -58
- package/src/lib/Wrapper.vue +22 -0
- package/src/lib/devMsg.ts +20 -0
- package/src/lib/isInternalURL.ts +4 -4
- package/src/types.ts +91 -109
- package/src/usePrismic.ts +16 -9
- package/dist/components/PrismicEmbed.cjs +0 -36
- package/dist/components/PrismicEmbed.cjs.map +0 -1
- package/dist/components/PrismicEmbed.d.ts +0 -59
- package/dist/components/PrismicEmbed.js +0 -36
- package/dist/components/PrismicEmbed.js.map +0 -1
- package/dist/components/PrismicImage.cjs +0 -122
- package/dist/components/PrismicImage.cjs.map +0 -1
- package/dist/components/PrismicImage.d.ts +0 -163
- package/dist/components/PrismicImage.js +0 -122
- package/dist/components/PrismicImage.js.map +0 -1
- package/dist/components/PrismicLink.cjs +0 -115
- package/dist/components/PrismicLink.cjs.map +0 -1
- package/dist/components/PrismicLink.d.ts +0 -192
- package/dist/components/PrismicLink.js +0 -115
- package/dist/components/PrismicLink.js.map +0 -1
- package/dist/components/PrismicRichText.cjs +0 -108
- package/dist/components/PrismicRichText.cjs.map +0 -1
- package/dist/components/PrismicRichText.d.ts +0 -161
- package/dist/components/PrismicRichText.js +0 -108
- package/dist/components/PrismicRichText.js.map +0 -1
- package/dist/components/PrismicText.cjs +0 -57
- package/dist/components/PrismicText.cjs.map +0 -1
- package/dist/components/PrismicText.d.ts +0 -119
- package/dist/components/PrismicText.js +0 -57
- package/dist/components/PrismicText.js.map +0 -1
- package/dist/components/SliceZone.cjs +0 -156
- package/dist/components/SliceZone.cjs.map +0 -1
- package/dist/components/SliceZone.d.ts +0 -375
- package/dist/components/SliceZone.js +0 -156
- package/dist/components/SliceZone.js.map +0 -1
- package/dist/components/index.d.ts +0 -12
- package/dist/composables.cjs +0 -40
- package/dist/composables.cjs.map +0 -1
- package/dist/composables.d.ts +0 -384
- package/dist/composables.js +0 -40
- package/dist/composables.js.map +0 -1
- package/dist/globalExtensions.d.ts +0 -11
- package/dist/injectionSymbols.cjs +0 -5
- package/dist/injectionSymbols.cjs.map +0 -1
- package/dist/injectionSymbols.d.ts +0 -9
- package/dist/injectionSymbols.js +0 -5
- package/dist/injectionSymbols.js.map +0 -1
- package/dist/lib/__PRODUCTION__.cjs +0 -8
- package/dist/lib/__PRODUCTION__.cjs.map +0 -1
- package/dist/lib/__PRODUCTION__.d.ts +0 -7
- package/dist/lib/__PRODUCTION__.js +0 -8
- package/dist/lib/__PRODUCTION__.js.map +0 -1
- package/dist/lib/getSlots.cjs +0 -19
- package/dist/lib/getSlots.cjs.map +0 -1
- package/dist/lib/getSlots.d.ts +0 -14
- package/dist/lib/getSlots.js +0 -19
- package/dist/lib/getSlots.js.map +0 -1
- package/dist/lib/simplyResolveComponent.cjs +0 -8
- package/dist/lib/simplyResolveComponent.cjs.map +0 -1
- package/dist/lib/simplyResolveComponent.d.ts +0 -12
- package/dist/lib/simplyResolveComponent.js +0 -8
- package/dist/lib/simplyResolveComponent.js.map +0 -1
- package/dist/useStatefulPrismicClientMethod.cjs +0 -39
- package/dist/useStatefulPrismicClientMethod.cjs.map +0 -1
- package/dist/useStatefulPrismicClientMethod.d.ts +0 -64
- package/dist/useStatefulPrismicClientMethod.js +0 -39
- package/dist/useStatefulPrismicClientMethod.js.map +0 -1
- package/src/components/PrismicEmbed.ts +0 -91
- package/src/components/PrismicImage.ts +0 -309
- package/src/components/PrismicLink.ts +0 -313
- package/src/components/PrismicRichText.ts +0 -282
- package/src/components/PrismicText.ts +0 -167
- package/src/components/SliceZone.ts +0 -619
- package/src/components/index.ts +0 -46
- package/src/composables.ts +0 -474
- package/src/globalExtensions.ts +0 -12
- package/src/injectionSymbols.ts +0 -17
- package/src/lib/__PRODUCTION__.ts +0 -12
- package/src/lib/getSlots.ts +0 -34
- package/src/lib/simplyResolveComponent.ts +0 -23
- package/src/useStatefulPrismicClientMethod.ts +0 -156
- package/vetur/attributes.json +0 -113
- package/vetur/tags.json +0 -60
package/dist/composables.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composables.cjs","sources":["../../src/composables.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n// Imports for @link references:\nimport type { Client } from \"@prismicio/client\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\nimport { PrismicDocument, Query } from \"@prismicio/client\";\n\nimport {\n\tClientComposableReturnType,\n\tClientMethodParameters,\n\tComposableOnlyParameters,\n\tuseStatefulPrismicClientMethod,\n} from \"./useStatefulPrismicClientMethod\";\n\n// Composables\n\n/**\n * A composable that queries content from the Prismic repository.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.get}\n */\nexport const usePrismicDocuments = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"get\", args);\n\n/**\n * A composable that queries content from the Prismic repository and returns\n * only the first result, if any.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getFirst}\n */\nexport const useFirstPrismicDocument = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"getFirst\">[0] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getFirst\", args);\n\n/**\n * A composable that queries a document from the Prismic repository with a\n * specific ID.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param id - ID of the document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByID}\n */\nexport const usePrismicDocumentByID = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tid: ClientMethodParameters<\"getByID\">[0],\n\t\tparams?: ClientMethodParameters<\"getByID\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getByID\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * IDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param ids - A list of document IDs\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByIDs}\n */\nexport const usePrismicDocumentsByIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tids: ClientMethodParameters<\"getByIDs\">[0],\n\t\tparams?: ClientMethodParameters<\"getByIDs\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByIDs\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific IDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param ids - A list of document IDs\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}\n */\nexport const useAllPrismicDocumentsByIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tids: ClientMethodParameters<\"getAllByIDs\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByIDs\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByIDs\", args);\n\n/**\n * A composable that queries a document from the Prismic repository with a\n * specific UID and Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uid - UID of the document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByUID}\n */\nexport const usePrismicDocumentByUID = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByUID\">[0],\n\t\tuid: ClientMethodParameters<\"getByUID\">[1],\n\t\tparams?: ClientMethodParameters<\"getByUID\">[2] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getByUID\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * UIDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uids - A list of document UIDs\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByIDs}\n */\nexport const usePrismicDocumentsByUIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByUIDs\">[0],\n\t\tuids: ClientMethodParameters<\"getByUIDs\">[1],\n\t\tparams?: ClientMethodParameters<\"getByUIDs\">[2] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByUIDs\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific UIDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uids - A list of document UIDs\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}\n */\nexport const useAllPrismicDocumentsByUIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getAllByUIDs\">[0],\n\t\tids: ClientMethodParameters<\"getAllByUIDs\">[1],\n\t\tparams?: ClientMethodParameters<\"getAllByUIDs\">[2] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByUIDs\", args);\n\n/**\n * A composable that queries a singleton document from the Prismic repository\n * for a specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param documentType - The API ID of the singleton Custom Type\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getSingle}\n */\nexport const useSinglePrismicDocument = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getSingle\">[0],\n\t\tparams?: ClientMethodParameters<\"getSingle\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getSingle\", args);\n\n/**\n * A composable that queries documents from the Prismic repository for a\n * specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the Custom Type\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByType}\n */\nexport const usePrismicDocumentsByType = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByType\">[0],\n\t\tparams?: ClientMethodParameters<\"getByType\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByType\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository for a\n * specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the Custom Type\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByType}\n */\nexport const useAllPrismicDocumentsByType = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getAllByType\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByType\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByType\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with a\n * specific tag.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tag - The tag that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTag}\n */\nexport const usePrismicDocumentsByTag = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\ttag: ClientMethodParameters<\"getByTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getByTag\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByTag\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with a\n * specific tag.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tag - The tag that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTag}\n */\nexport const useAllPrismicDocumentsByTag = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\ttag: ClientMethodParameters<\"getAllByTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByTag\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * tags. A document must be tagged with all of the queried tags to be included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTags}\n */\nexport const usePrismicDocumentsByEveryTag = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getByEveryTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getByEveryTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByEveryTag\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific tags. A document must be tagged with all of the queried tags to be\n * included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}\n */\nexport const useAllPrismicDocumentsByEveryTag = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getAllByEveryTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByEveryTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByEveryTag\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * tags. A document must be tagged with at least one of the queried tags to be\n * included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTags}\n */\nexport const usePrismicDocumentsBySomeTags = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getBySomeTags\">[0],\n\t\tparams?: ClientMethodParameters<\"getBySomeTags\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getBySomeTags\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific tags. A document must be tagged with at least one of the queried\n * tags to be included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}\n */\nexport const useAllPrismicDocumentsBySomeTags = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getAllBySomeTags\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllBySomeTags\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllBySomeTags\", args);\n\n/**\n * **IMPORTANT**: Avoid using `dangerouslyUseAllPrismicDocuments` as it may be\n * slower and require more resources than other composables. Prefer using other\n * composables that filter by predicates such as\n * `useAllPrismicDocumentsByType`.\n *\n * A composable that queries content from the Prismic repository and returns all\n * matching content. If no predicates are provided, all documents will be\n * fetched.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAll}\n */\nexport const dangerouslyUseAllPrismicDocuments = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"dangerouslyGetAll\">[0] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"dangerouslyGetAll\", args);\n"],"names":["useStatefulPrismicClientMethod"],"mappings":";;;AA8BO,MAAM,sBAAsB,IAC/B,SAIHA,+BAAAA,+BAA+B,OAAO,IAAI;AAiBpC,MAAM,0BAA0B,IACnC,SAIHA,+BAAAA,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,yBAAyB,IAClC,SAKHA,+BAAAA,+BAA+B,WAAW,IAAI;AAkBxC,MAAM,2BAA2B,IACpC,SAKHA,+BAAAA,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,8BAA8B,IACvC,SAMHA,+BAAAA,+BAA+B,eAAe,IAAI;AAmB5C,MAAM,0BAA0B,IACnC,SAMHA,+BAAAA,+BAA+B,YAAY,IAAI;AAmBzC,MAAM,4BAA4B,IACrC,SAMHA,+BAAAA,+BAA+B,aAAa,IAAI;AAmB1C,MAAM,+BAA+B,IACxC,SAOHA,+BAAAA,+BAA+B,gBAAgB,IAAI;AAkB7C,MAAM,2BAA2B,IACpC,SAKHA,+BAAAA,+BAA+B,aAAa,IAAI;AAkB1C,MAAM,4BAA4B,IACrC,SAKHA,+BAAAA,+BAA+B,aAAa,IAAI;AAkB1C,MAAM,+BAA+B,IACxC,SAMHA,+BAAAA,+BAA+B,gBAAgB,IAAI;AAkB7C,MAAM,2BAA2B,IACpC,SAKHA,+BAAAA,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,8BAA8B,IACvC,SAMHA,+BAAAA,+BAA+B,eAAe,IAAI;AAkB5C,MAAM,gCAAgC,IAGzC,SAMHA,+BAAAA,+BAA+B,iBAAiB,IAAI;AAmB9C,MAAM,mCAAmC,IAG5C,SAMHA,+BAAAA,+BAA+B,oBAAoB,IAAI;AAmBjD,MAAM,gCAAgC,IAGzC,SAMHA,+BAAAA,+BAA+B,iBAAiB,IAAI;AAmB9C,MAAM,mCAAmC,IAG5C,SAMHA,+BAAAA,+BAA+B,oBAAoB,IAAI;AAuBjD,MAAM,oCAAoC,IAG7C,SAKHA,+BAAA,+BAA+B,qBAAqB,IAAI;;;;;;;;;;;;;;;;;;;"}
|
package/dist/composables.d.ts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { PrismicDocument, Query } from "@prismicio/client";
|
|
2
|
-
import { ClientComposableReturnType, ComposableOnlyParameters } from "./useStatefulPrismicClientMethod";
|
|
3
|
-
/**
|
|
4
|
-
* A composable that queries content from the Prismic repository.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
8
|
-
* `params.client`.
|
|
9
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
10
|
-
*
|
|
11
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
12
|
-
*
|
|
13
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
14
|
-
*
|
|
15
|
-
* @see Underlying `@prismicio/client` method {@link Client.get}
|
|
16
|
-
*/
|
|
17
|
-
export declare const usePrismicDocuments: <TDocument extends PrismicDocument>(params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
18
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
19
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
20
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
21
|
-
/**
|
|
22
|
-
* A composable that queries content from the Prismic repository and returns
|
|
23
|
-
* only the first result, if any.
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
27
|
-
* `params.client`.
|
|
28
|
-
* @typeParam TDocument - Type of the Prismic document returned
|
|
29
|
-
*
|
|
30
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
31
|
-
*
|
|
32
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
33
|
-
*
|
|
34
|
-
* @see Underlying `@prismicio/client` method {@link Client.getFirst}
|
|
35
|
-
*/
|
|
36
|
-
export declare const useFirstPrismicDocument: <TDocument extends PrismicDocument>(params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
37
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
38
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
39
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
|
|
40
|
-
/**
|
|
41
|
-
* A composable that queries a document from the Prismic repository with a
|
|
42
|
-
* specific ID.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
46
|
-
* `params.client`.
|
|
47
|
-
* @typeParam TDocument - Type of the Prismic document returned
|
|
48
|
-
*
|
|
49
|
-
* @param id - ID of the document
|
|
50
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
51
|
-
*
|
|
52
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
53
|
-
*
|
|
54
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByID}
|
|
55
|
-
*/
|
|
56
|
-
export declare const usePrismicDocumentByID: <TDocument extends PrismicDocument>(id: string, params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
57
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
58
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
59
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
|
|
60
|
-
/**
|
|
61
|
-
* A composable that queries documents from the Prismic repository with specific
|
|
62
|
-
* IDs.
|
|
63
|
-
*
|
|
64
|
-
* @remarks
|
|
65
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
66
|
-
* `params.client`.
|
|
67
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
68
|
-
*
|
|
69
|
-
* @param ids - A list of document IDs
|
|
70
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
71
|
-
*
|
|
72
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
73
|
-
*
|
|
74
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByIDs}
|
|
75
|
-
*/
|
|
76
|
-
export declare const usePrismicDocumentsByIDs: <TDocument extends PrismicDocument>(ids: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
77
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
78
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
79
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
80
|
-
/**
|
|
81
|
-
* A composable that queries all documents from the Prismic repository with
|
|
82
|
-
* specific IDs.
|
|
83
|
-
*
|
|
84
|
-
* @remarks
|
|
85
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
86
|
-
* `params.client`.
|
|
87
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
88
|
-
*
|
|
89
|
-
* @param ids - A list of document IDs
|
|
90
|
-
* @param params - Parameters to filter and sort results
|
|
91
|
-
*
|
|
92
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
93
|
-
*
|
|
94
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
|
|
95
|
-
*/
|
|
96
|
-
export declare const useAllPrismicDocumentsByIDs: <TDocument extends PrismicDocument>(ids: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
97
|
-
limit?: number;
|
|
98
|
-
} & {
|
|
99
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
100
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
101
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
102
|
-
/**
|
|
103
|
-
* A composable that queries a document from the Prismic repository with a
|
|
104
|
-
* specific UID and Custom Type.
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
108
|
-
* `params.client`.
|
|
109
|
-
* @typeParam TDocument - Type of the Prismic document returned
|
|
110
|
-
*
|
|
111
|
-
* @param documentType - The API ID of the document's Custom Type
|
|
112
|
-
* @param uid - UID of the document
|
|
113
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
114
|
-
*
|
|
115
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
116
|
-
*
|
|
117
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByUID}
|
|
118
|
-
*/
|
|
119
|
-
export declare const usePrismicDocumentByUID: <TDocument extends PrismicDocument>(documentType: any, uid: string, params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
120
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
121
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
122
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
|
|
123
|
-
/**
|
|
124
|
-
* A composable that queries documents from the Prismic repository with specific
|
|
125
|
-
* UIDs.
|
|
126
|
-
*
|
|
127
|
-
* @remarks
|
|
128
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
129
|
-
* `params.client`.
|
|
130
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
131
|
-
*
|
|
132
|
-
* @param documentType - The API ID of the document's Custom Type
|
|
133
|
-
* @param uids - A list of document UIDs
|
|
134
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
135
|
-
*
|
|
136
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
137
|
-
*
|
|
138
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByIDs}
|
|
139
|
-
*/
|
|
140
|
-
export declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument>(documentType: any, uids: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
141
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
142
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
143
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
144
|
-
/**
|
|
145
|
-
* A composable that queries all documents from the Prismic repository with
|
|
146
|
-
* specific UIDs.
|
|
147
|
-
*
|
|
148
|
-
* @remarks
|
|
149
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
150
|
-
* `params.client`.
|
|
151
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
152
|
-
*
|
|
153
|
-
* @param documentType - The API ID of the document's Custom Type
|
|
154
|
-
* @param uids - A list of document UIDs
|
|
155
|
-
* @param params - Parameters to filter and sort results
|
|
156
|
-
*
|
|
157
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
158
|
-
*
|
|
159
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
|
|
160
|
-
*/
|
|
161
|
-
export declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument>(documentType: any, ids: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
162
|
-
limit?: number;
|
|
163
|
-
} & {
|
|
164
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
165
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
166
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
167
|
-
/**
|
|
168
|
-
* A composable that queries a singleton document from the Prismic repository
|
|
169
|
-
* for a specific Custom Type.
|
|
170
|
-
*
|
|
171
|
-
* @remarks
|
|
172
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
173
|
-
* `params.client`.
|
|
174
|
-
* @typeParam TDocument - Type of the Prismic document returned
|
|
175
|
-
*
|
|
176
|
-
* @param documentType - The API ID of the singleton Custom Type
|
|
177
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
178
|
-
*
|
|
179
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
180
|
-
*
|
|
181
|
-
* @see Underlying `@prismicio/client` method {@link Client.getSingle}
|
|
182
|
-
*/
|
|
183
|
-
export declare const useSinglePrismicDocument: <TDocument extends PrismicDocument>(documentType: any, params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
184
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
185
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
186
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
|
|
187
|
-
/**
|
|
188
|
-
* A composable that queries documents from the Prismic repository for a
|
|
189
|
-
* specific Custom Type.
|
|
190
|
-
*
|
|
191
|
-
* @remarks
|
|
192
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
193
|
-
* `params.client`.
|
|
194
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
195
|
-
*
|
|
196
|
-
* @param documentType - The API ID of the Custom Type
|
|
197
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
198
|
-
*
|
|
199
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
200
|
-
*
|
|
201
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByType}
|
|
202
|
-
*/
|
|
203
|
-
export declare const usePrismicDocumentsByType: <TDocument extends PrismicDocument>(documentType: any, params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
204
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
205
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
206
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
207
|
-
/**
|
|
208
|
-
* A composable that queries all documents from the Prismic repository for a
|
|
209
|
-
* specific Custom Type.
|
|
210
|
-
*
|
|
211
|
-
* @remarks
|
|
212
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
213
|
-
* `params.client`.
|
|
214
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
215
|
-
*
|
|
216
|
-
* @param documentType - The API ID of the Custom Type
|
|
217
|
-
* @param params - Parameters to filter and sort results
|
|
218
|
-
*
|
|
219
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
220
|
-
*
|
|
221
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByType}
|
|
222
|
-
*/
|
|
223
|
-
export declare const useAllPrismicDocumentsByType: <TDocument extends PrismicDocument>(documentType: any, params?: (Partial<Omit<import("@prismicio/client").BuildQueryURLArgs, "page">> & {
|
|
224
|
-
limit?: number;
|
|
225
|
-
} & {
|
|
226
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
227
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
228
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
229
|
-
/**
|
|
230
|
-
* A composable that queries documents from the Prismic repository with a
|
|
231
|
-
* specific tag.
|
|
232
|
-
*
|
|
233
|
-
* @remarks
|
|
234
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
235
|
-
* `params.client`.
|
|
236
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
237
|
-
*
|
|
238
|
-
* @param tag - The tag that must be included on a document
|
|
239
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
240
|
-
*
|
|
241
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
242
|
-
*
|
|
243
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByTag}
|
|
244
|
-
*/
|
|
245
|
-
export declare const usePrismicDocumentsByTag: <TDocument extends PrismicDocument>(tag: string, params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
246
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
247
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
248
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
249
|
-
/**
|
|
250
|
-
* A composable that queries all documents from the Prismic repository with a
|
|
251
|
-
* specific tag.
|
|
252
|
-
*
|
|
253
|
-
* @remarks
|
|
254
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
255
|
-
* `params.client`.
|
|
256
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
257
|
-
*
|
|
258
|
-
* @param tag - The tag that must be included on a document
|
|
259
|
-
* @param params - Parameters to filter and sort results
|
|
260
|
-
*
|
|
261
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
262
|
-
*
|
|
263
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByTag}
|
|
264
|
-
*/
|
|
265
|
-
export declare const useAllPrismicDocumentsByTag: <TDocument extends PrismicDocument>(tag: string, params?: (Partial<Omit<import("@prismicio/client").BuildQueryURLArgs, "page">> & {
|
|
266
|
-
limit?: number;
|
|
267
|
-
} & {
|
|
268
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
269
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
270
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
271
|
-
/**
|
|
272
|
-
* A composable that queries documents from the Prismic repository with specific
|
|
273
|
-
* tags. A document must be tagged with all of the queried tags to be included.
|
|
274
|
-
*
|
|
275
|
-
* @remarks
|
|
276
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
277
|
-
* `params.client`.
|
|
278
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
279
|
-
*
|
|
280
|
-
* @param tags - A list of tags that must be included on a document
|
|
281
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
282
|
-
*
|
|
283
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
284
|
-
*
|
|
285
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByTags}
|
|
286
|
-
*/
|
|
287
|
-
export declare const usePrismicDocumentsByEveryTag: <TDocument extends PrismicDocument>(tags: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
288
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
289
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
290
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
291
|
-
/**
|
|
292
|
-
* A composable that queries all documents from the Prismic repository with
|
|
293
|
-
* specific tags. A document must be tagged with all of the queried tags to be
|
|
294
|
-
* included.
|
|
295
|
-
*
|
|
296
|
-
* @remarks
|
|
297
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
298
|
-
* `params.client`.
|
|
299
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
300
|
-
*
|
|
301
|
-
* @param tags - A list of tags that must be included on a document
|
|
302
|
-
* @param params - Parameters to filter and sort results
|
|
303
|
-
*
|
|
304
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
305
|
-
*
|
|
306
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
|
|
307
|
-
*/
|
|
308
|
-
export declare const useAllPrismicDocumentsByEveryTag: <TDocument extends PrismicDocument>(tags: string[], params?: (Partial<Omit<import("@prismicio/client").BuildQueryURLArgs, "page">> & {
|
|
309
|
-
limit?: number;
|
|
310
|
-
} & {
|
|
311
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
312
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
313
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
314
|
-
/**
|
|
315
|
-
* A composable that queries documents from the Prismic repository with specific
|
|
316
|
-
* tags. A document must be tagged with at least one of the queried tags to be
|
|
317
|
-
* included.
|
|
318
|
-
*
|
|
319
|
-
* @remarks
|
|
320
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
321
|
-
* `params.client`.
|
|
322
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
323
|
-
*
|
|
324
|
-
* @param tags - A list of tags that must be included on a document
|
|
325
|
-
* @param params - Parameters to filter, sort, and paginate results
|
|
326
|
-
*
|
|
327
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
328
|
-
*
|
|
329
|
-
* @see Underlying `@prismicio/client` method {@link Client.getByTags}
|
|
330
|
-
*/
|
|
331
|
-
export declare const usePrismicDocumentsBySomeTags: <TDocument extends PrismicDocument>(tags: string[], params?: (Partial<import("@prismicio/client").BuildQueryURLArgs> & {
|
|
332
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
333
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
334
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
|
|
335
|
-
/**
|
|
336
|
-
* A composable that queries all documents from the Prismic repository with
|
|
337
|
-
* specific tags. A document must be tagged with at least one of the queried
|
|
338
|
-
* tags to be included.
|
|
339
|
-
*
|
|
340
|
-
* @remarks
|
|
341
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
342
|
-
* `params.client`.
|
|
343
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
344
|
-
*
|
|
345
|
-
* @param tags - A list of tags that must be included on a document
|
|
346
|
-
* @param params - Parameters to filter and sort results
|
|
347
|
-
*
|
|
348
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
349
|
-
*
|
|
350
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
|
|
351
|
-
*/
|
|
352
|
-
export declare const useAllPrismicDocumentsBySomeTags: <TDocument extends PrismicDocument>(tags: string[], params?: (Partial<Omit<import("@prismicio/client").BuildQueryURLArgs, "page">> & {
|
|
353
|
-
limit?: number;
|
|
354
|
-
} & {
|
|
355
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
356
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
357
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
|
358
|
-
/**
|
|
359
|
-
* **IMPORTANT**: Avoid using `dangerouslyUseAllPrismicDocuments` as it may be
|
|
360
|
-
* slower and require more resources than other composables. Prefer using other
|
|
361
|
-
* composables that filter by predicates such as
|
|
362
|
-
* `useAllPrismicDocumentsByType`.
|
|
363
|
-
*
|
|
364
|
-
* A composable that queries content from the Prismic repository and returns all
|
|
365
|
-
* matching content. If no predicates are provided, all documents will be
|
|
366
|
-
* fetched.
|
|
367
|
-
*
|
|
368
|
-
* @remarks
|
|
369
|
-
* An additional `@prismicio/client` instance can be provided at
|
|
370
|
-
* `params.client`.
|
|
371
|
-
* @typeParam TDocument - Type of Prismic documents returned
|
|
372
|
-
*
|
|
373
|
-
* @param params - Parameters to filter and sort results
|
|
374
|
-
*
|
|
375
|
-
* @returns The composable payload {@link ClientComposableReturnType}
|
|
376
|
-
*
|
|
377
|
-
* @see Underlying `@prismicio/client` method {@link Client.getAll}
|
|
378
|
-
*/
|
|
379
|
-
export declare const dangerouslyUseAllPrismicDocuments: <TDocument extends PrismicDocument>(params?: (Partial<Omit<import("@prismicio/client").BuildQueryURLArgs, "page">> & {
|
|
380
|
-
limit?: number;
|
|
381
|
-
} & {
|
|
382
|
-
fetchOptions?: import("@prismicio/client").RequestInitLike;
|
|
383
|
-
signal?: import("@prismicio/client").AbortSignalLike;
|
|
384
|
-
} & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
|
package/dist/composables.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { useStatefulPrismicClientMethod } from "./useStatefulPrismicClientMethod.js";
|
|
2
|
-
const usePrismicDocuments = (...args) => useStatefulPrismicClientMethod("get", args);
|
|
3
|
-
const useFirstPrismicDocument = (...args) => useStatefulPrismicClientMethod("getFirst", args);
|
|
4
|
-
const usePrismicDocumentByID = (...args) => useStatefulPrismicClientMethod("getByID", args);
|
|
5
|
-
const usePrismicDocumentsByIDs = (...args) => useStatefulPrismicClientMethod("getByIDs", args);
|
|
6
|
-
const useAllPrismicDocumentsByIDs = (...args) => useStatefulPrismicClientMethod("getAllByIDs", args);
|
|
7
|
-
const usePrismicDocumentByUID = (...args) => useStatefulPrismicClientMethod("getByUID", args);
|
|
8
|
-
const usePrismicDocumentsByUIDs = (...args) => useStatefulPrismicClientMethod("getByUIDs", args);
|
|
9
|
-
const useAllPrismicDocumentsByUIDs = (...args) => useStatefulPrismicClientMethod("getAllByUIDs", args);
|
|
10
|
-
const useSinglePrismicDocument = (...args) => useStatefulPrismicClientMethod("getSingle", args);
|
|
11
|
-
const usePrismicDocumentsByType = (...args) => useStatefulPrismicClientMethod("getByType", args);
|
|
12
|
-
const useAllPrismicDocumentsByType = (...args) => useStatefulPrismicClientMethod("getAllByType", args);
|
|
13
|
-
const usePrismicDocumentsByTag = (...args) => useStatefulPrismicClientMethod("getByTag", args);
|
|
14
|
-
const useAllPrismicDocumentsByTag = (...args) => useStatefulPrismicClientMethod("getAllByTag", args);
|
|
15
|
-
const usePrismicDocumentsByEveryTag = (...args) => useStatefulPrismicClientMethod("getByEveryTag", args);
|
|
16
|
-
const useAllPrismicDocumentsByEveryTag = (...args) => useStatefulPrismicClientMethod("getAllByEveryTag", args);
|
|
17
|
-
const usePrismicDocumentsBySomeTags = (...args) => useStatefulPrismicClientMethod("getBySomeTags", args);
|
|
18
|
-
const useAllPrismicDocumentsBySomeTags = (...args) => useStatefulPrismicClientMethod("getAllBySomeTags", args);
|
|
19
|
-
const dangerouslyUseAllPrismicDocuments = (...args) => useStatefulPrismicClientMethod("dangerouslyGetAll", args);
|
|
20
|
-
export {
|
|
21
|
-
dangerouslyUseAllPrismicDocuments,
|
|
22
|
-
useAllPrismicDocumentsByEveryTag,
|
|
23
|
-
useAllPrismicDocumentsByIDs,
|
|
24
|
-
useAllPrismicDocumentsBySomeTags,
|
|
25
|
-
useAllPrismicDocumentsByTag,
|
|
26
|
-
useAllPrismicDocumentsByType,
|
|
27
|
-
useAllPrismicDocumentsByUIDs,
|
|
28
|
-
useFirstPrismicDocument,
|
|
29
|
-
usePrismicDocumentByID,
|
|
30
|
-
usePrismicDocumentByUID,
|
|
31
|
-
usePrismicDocuments,
|
|
32
|
-
usePrismicDocumentsByEveryTag,
|
|
33
|
-
usePrismicDocumentsByIDs,
|
|
34
|
-
usePrismicDocumentsBySomeTags,
|
|
35
|
-
usePrismicDocumentsByTag,
|
|
36
|
-
usePrismicDocumentsByType,
|
|
37
|
-
usePrismicDocumentsByUIDs,
|
|
38
|
-
useSinglePrismicDocument
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=composables.js.map
|
package/dist/composables.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composables.js","sources":["../../src/composables.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n// Imports for @link references:\nimport type { Client } from \"@prismicio/client\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\nimport { PrismicDocument, Query } from \"@prismicio/client\";\n\nimport {\n\tClientComposableReturnType,\n\tClientMethodParameters,\n\tComposableOnlyParameters,\n\tuseStatefulPrismicClientMethod,\n} from \"./useStatefulPrismicClientMethod\";\n\n// Composables\n\n/**\n * A composable that queries content from the Prismic repository.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.get}\n */\nexport const usePrismicDocuments = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"get\", args);\n\n/**\n * A composable that queries content from the Prismic repository and returns\n * only the first result, if any.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getFirst}\n */\nexport const useFirstPrismicDocument = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"getFirst\">[0] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getFirst\", args);\n\n/**\n * A composable that queries a document from the Prismic repository with a\n * specific ID.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param id - ID of the document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByID}\n */\nexport const usePrismicDocumentByID = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tid: ClientMethodParameters<\"getByID\">[0],\n\t\tparams?: ClientMethodParameters<\"getByID\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getByID\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * IDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param ids - A list of document IDs\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByIDs}\n */\nexport const usePrismicDocumentsByIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tids: ClientMethodParameters<\"getByIDs\">[0],\n\t\tparams?: ClientMethodParameters<\"getByIDs\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByIDs\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific IDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param ids - A list of document IDs\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}\n */\nexport const useAllPrismicDocumentsByIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tids: ClientMethodParameters<\"getAllByIDs\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByIDs\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByIDs\", args);\n\n/**\n * A composable that queries a document from the Prismic repository with a\n * specific UID and Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uid - UID of the document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByUID}\n */\nexport const usePrismicDocumentByUID = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByUID\">[0],\n\t\tuid: ClientMethodParameters<\"getByUID\">[1],\n\t\tparams?: ClientMethodParameters<\"getByUID\">[2] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getByUID\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * UIDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uids - A list of document UIDs\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByIDs}\n */\nexport const usePrismicDocumentsByUIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByUIDs\">[0],\n\t\tuids: ClientMethodParameters<\"getByUIDs\">[1],\n\t\tparams?: ClientMethodParameters<\"getByUIDs\">[2] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByUIDs\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific UIDs.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the document's Custom Type\n * @param uids - A list of document UIDs\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}\n */\nexport const useAllPrismicDocumentsByUIDs = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getAllByUIDs\">[0],\n\t\tids: ClientMethodParameters<\"getAllByUIDs\">[1],\n\t\tparams?: ClientMethodParameters<\"getAllByUIDs\">[2] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByUIDs\", args);\n\n/**\n * A composable that queries a singleton document from the Prismic repository\n * for a specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of the Prismic document returned\n *\n * @param documentType - The API ID of the singleton Custom Type\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getSingle}\n */\nexport const useSinglePrismicDocument = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getSingle\">[0],\n\t\tparams?: ClientMethodParameters<\"getSingle\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument> =>\n\tuseStatefulPrismicClientMethod(\"getSingle\", args);\n\n/**\n * A composable that queries documents from the Prismic repository for a\n * specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the Custom Type\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByType}\n */\nexport const usePrismicDocumentsByType = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getByType\">[0],\n\t\tparams?: ClientMethodParameters<\"getByType\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByType\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository for a\n * specific Custom Type.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param documentType - The API ID of the Custom Type\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByType}\n */\nexport const useAllPrismicDocumentsByType = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\tdocumentType: ClientMethodParameters<\"getAllByType\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByType\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByType\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with a\n * specific tag.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tag - The tag that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTag}\n */\nexport const usePrismicDocumentsByTag = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\ttag: ClientMethodParameters<\"getByTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getByTag\">[1] & ComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByTag\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with a\n * specific tag.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tag - The tag that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTag}\n */\nexport const useAllPrismicDocumentsByTag = <TDocument extends PrismicDocument>(\n\t...args: [\n\t\ttag: ClientMethodParameters<\"getAllByTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByTag\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * tags. A document must be tagged with all of the queried tags to be included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTags}\n */\nexport const usePrismicDocumentsByEveryTag = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getByEveryTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getByEveryTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getByEveryTag\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific tags. A document must be tagged with all of the queried tags to be\n * included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}\n */\nexport const useAllPrismicDocumentsByEveryTag = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getAllByEveryTag\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllByEveryTag\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllByEveryTag\", args);\n\n/**\n * A composable that queries documents from the Prismic repository with specific\n * tags. A document must be tagged with at least one of the queried tags to be\n * included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter, sort, and paginate results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getByTags}\n */\nexport const usePrismicDocumentsBySomeTags = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getBySomeTags\">[0],\n\t\tparams?: ClientMethodParameters<\"getBySomeTags\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<Query<TDocument>> =>\n\tuseStatefulPrismicClientMethod(\"getBySomeTags\", args);\n\n/**\n * A composable that queries all documents from the Prismic repository with\n * specific tags. A document must be tagged with at least one of the queried\n * tags to be included.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param tags - A list of tags that must be included on a document\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}\n */\nexport const useAllPrismicDocumentsBySomeTags = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\ttags: ClientMethodParameters<\"getAllBySomeTags\">[0],\n\t\tparams?: ClientMethodParameters<\"getAllBySomeTags\">[1] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"getAllBySomeTags\", args);\n\n/**\n * **IMPORTANT**: Avoid using `dangerouslyUseAllPrismicDocuments` as it may be\n * slower and require more resources than other composables. Prefer using other\n * composables that filter by predicates such as\n * `useAllPrismicDocumentsByType`.\n *\n * A composable that queries content from the Prismic repository and returns all\n * matching content. If no predicates are provided, all documents will be\n * fetched.\n *\n * @remarks\n * An additional `@prismicio/client` instance can be provided at\n * `params.client`.\n * @typeParam TDocument - Type of Prismic documents returned\n *\n * @param params - Parameters to filter and sort results\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @see Underlying `@prismicio/client` method {@link Client.getAll}\n */\nexport const dangerouslyUseAllPrismicDocuments = <\n\tTDocument extends PrismicDocument,\n>(\n\t...args: [\n\t\tparams?: ClientMethodParameters<\"dangerouslyGetAll\">[0] &\n\t\t\tComposableOnlyParameters,\n\t]\n): ClientComposableReturnType<TDocument[]> =>\n\tuseStatefulPrismicClientMethod(\"dangerouslyGetAll\", args);\n"],"names":[],"mappings":";AA8BO,MAAM,sBAAsB,IAC/B,SAIH,+BAA+B,OAAO,IAAI;AAiBpC,MAAM,0BAA0B,IACnC,SAIH,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,yBAAyB,IAClC,SAKH,+BAA+B,WAAW,IAAI;AAkBxC,MAAM,2BAA2B,IACpC,SAKH,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,8BAA8B,IACvC,SAMH,+BAA+B,eAAe,IAAI;AAmB5C,MAAM,0BAA0B,IACnC,SAMH,+BAA+B,YAAY,IAAI;AAmBzC,MAAM,4BAA4B,IACrC,SAMH,+BAA+B,aAAa,IAAI;AAmB1C,MAAM,+BAA+B,IACxC,SAOH,+BAA+B,gBAAgB,IAAI;AAkB7C,MAAM,2BAA2B,IACpC,SAKH,+BAA+B,aAAa,IAAI;AAkB1C,MAAM,4BAA4B,IACrC,SAKH,+BAA+B,aAAa,IAAI;AAkB1C,MAAM,+BAA+B,IACxC,SAMH,+BAA+B,gBAAgB,IAAI;AAkB7C,MAAM,2BAA2B,IACpC,SAKH,+BAA+B,YAAY,IAAI;AAkBzC,MAAM,8BAA8B,IACvC,SAMH,+BAA+B,eAAe,IAAI;AAkB5C,MAAM,gCAAgC,IAGzC,SAMH,+BAA+B,iBAAiB,IAAI;AAmB9C,MAAM,mCAAmC,IAG5C,SAMH,+BAA+B,oBAAoB,IAAI;AAmBjD,MAAM,gCAAgC,IAGzC,SAMH,+BAA+B,iBAAiB,IAAI;AAmB9C,MAAM,mCAAmC,IAG5C,SAMH,+BAA+B,oBAAoB,IAAI;AAuBjD,MAAM,oCAAoC,IAG7C,SAKH,+BAA+B,qBAAqB,IAAI;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PrismicPlugin } from "./types";
|
|
2
|
-
declare module "vue" {
|
|
3
|
-
interface ComponentCustomProperties {
|
|
4
|
-
/**
|
|
5
|
-
* `@prismicio/vue` plugin interface exposed on `this`.
|
|
6
|
-
*
|
|
7
|
-
* @see `@prismicio/vue` plugin interface {@link PrismicPlugin}
|
|
8
|
-
*/
|
|
9
|
-
$prismic: PrismicPlugin;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injectionSymbols.cjs","sources":["../../src/injectionSymbols.ts"],"sourcesContent":["import type { InjectionKey } from \"vue\";\n\nimport type { PrismicPlugin } from \"./types\";\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// Imports for @link references:\nimport type { usePrismic } from \"./usePrismic\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * `@prismicio/vue` plugin interface interface location used for\n * {@link usePrismic}.\n *\n * @internal\n */\nexport const prismicKey = Symbol(\"prismic\") as InjectionKey<PrismicPlugin>;\n"],"names":[],"mappings":";;AAgBa,MAAA,aAAa,OAAO,SAAS;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { InjectionKey } from "vue";
|
|
2
|
-
import type { PrismicPlugin } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* `@prismicio/vue` plugin interface interface location used for
|
|
5
|
-
* {@link usePrismic}.
|
|
6
|
-
*
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare const prismicKey: InjectionKey<PrismicPlugin>;
|
package/dist/injectionSymbols.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injectionSymbols.js","sources":["../../src/injectionSymbols.ts"],"sourcesContent":["import type { InjectionKey } from \"vue\";\n\nimport type { PrismicPlugin } from \"./types\";\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n// Imports for @link references:\nimport type { usePrismic } from \"./usePrismic\";\n\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * `@prismicio/vue` plugin interface interface location used for\n * {@link usePrismic}.\n *\n * @internal\n */\nexport const prismicKey = Symbol(\"prismic\") as InjectionKey<PrismicPlugin>;\n"],"names":[],"mappings":"AAgBa,MAAA,aAAa,OAAO,SAAS;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
if (typeof process === "undefined") {
|
|
4
|
-
globalThis.process = { env: {} };
|
|
5
|
-
}
|
|
6
|
-
const __PRODUCTION__ = process.env.NODE_ENV === "production";
|
|
7
|
-
exports.__PRODUCTION__ = __PRODUCTION__;
|
|
8
|
-
//# sourceMappingURL=__PRODUCTION__.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"__PRODUCTION__.cjs","sources":["../../../src/lib/__PRODUCTION__.ts"],"sourcesContent":["// We need to polyfill process if it doesn't exist, such as in the browser.\nif (typeof process === \"undefined\") {\n\tglobalThis.process = { env: {} } as typeof process;\n}\n\n/**\n * `true` if in the production environment, `false` otherwise.\n *\n * This boolean can be used to perform actions only in development environments,\n * such as logging.\n */\nexport const __PRODUCTION__ = process.env.NODE_ENV === \"production\";\n"],"names":[],"mappings":";;AACA,IAAI,OAAO,YAAY,aAAa;AACnC,aAAW,UAAU,EAAE,KAAK;AAC7B;AAQa,MAAA,iBAAiB,QAAQ,IAAI,aAAa;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"__PRODUCTION__.js","sources":["../../../src/lib/__PRODUCTION__.ts"],"sourcesContent":["// We need to polyfill process if it doesn't exist, such as in the browser.\nif (typeof process === \"undefined\") {\n\tglobalThis.process = { env: {} } as typeof process;\n}\n\n/**\n * `true` if in the production environment, `false` otherwise.\n *\n * This boolean can be used to perform actions only in development environments,\n * such as logging.\n */\nexport const __PRODUCTION__ = process.env.NODE_ENV === \"production\";\n"],"names":[],"mappings":"AACA,IAAI,OAAO,YAAY,aAAa;AACnC,aAAW,UAAU,EAAE,KAAK;AAC7B;AAQa,MAAA,iBAAiB,QAAQ,IAAI,aAAa;"}
|
package/dist/lib/getSlots.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const getSlots = (parent, slots, defaultPayload) => {
|
|
4
|
-
if (typeof parent === "string") {
|
|
5
|
-
return slots.default && slots.default(defaultPayload);
|
|
6
|
-
} else {
|
|
7
|
-
if (slots.default) {
|
|
8
|
-
const content = slots.default(defaultPayload);
|
|
9
|
-
return {
|
|
10
|
-
...slots,
|
|
11
|
-
default: () => content
|
|
12
|
-
};
|
|
13
|
-
} else {
|
|
14
|
-
return slots;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.getSlots = getSlots;
|
|
19
|
-
//# sourceMappingURL=getSlots.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getSlots.cjs","sources":["../../../src/lib/getSlots.ts"],"sourcesContent":["import { ConcreteComponent, Slots, VNode } from \"vue\";\n\n/**\n * Get the appropriate `slots` object/array according to the provided parent,\n * fixing `Non-function value encountered for default slot.` warnings.\n *\n * @param parent - The parent inheriting slots\n * @param slots - The `slots` to transform for parent\n * @param defaultParams - The parameters to provide to the default slot\n *\n * @returns The appropriate slots object/array\n *\n * @internal\n */\nexport const getSlots = (\n\tparent: string | ConcreteComponent,\n\tslots: Slots,\n\tdefaultPayload?: unknown,\n): VNode[] | undefined | Slots => {\n\tif (typeof parent === \"string\") {\n\t\treturn slots.default && slots.default(defaultPayload);\n\t} else {\n\t\tif (slots.default) {\n\t\t\tconst content = slots.default(defaultPayload);\n\n\t\t\treturn {\n\t\t\t\t...slots,\n\t\t\t\tdefault: () => content,\n\t\t\t};\n\t\t} else {\n\t\t\treturn slots;\n\t\t}\n\t}\n};\n"],"names":[],"mappings":";;AAcO,MAAM,WAAW,CACvB,QACA,OACA,mBACgC;AAC5B,MAAA,OAAO,WAAW,UAAU;AAC/B,WAAO,MAAM,WAAW,MAAM,QAAQ,cAAc;AAAA,EAAA,OAC9C;AACN,QAAI,MAAM,SAAS;AACZ,YAAA,UAAU,MAAM,QAAQ,cAAc;AAErC,aAAA;AAAA,QACN,GAAG;AAAA,QACH,SAAS,MAAM;AAAA,MAAA;AAAA,WAEV;AACC,aAAA;AAAA,IACR;AAAA,EACD;AACD;;"}
|
package/dist/lib/getSlots.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ConcreteComponent, Slots, VNode } from "vue";
|
|
2
|
-
/**
|
|
3
|
-
* Get the appropriate `slots` object/array according to the provided parent,
|
|
4
|
-
* fixing `Non-function value encountered for default slot.` warnings.
|
|
5
|
-
*
|
|
6
|
-
* @param parent - The parent inheriting slots
|
|
7
|
-
* @param slots - The `slots` to transform for parent
|
|
8
|
-
* @param defaultParams - The parameters to provide to the default slot
|
|
9
|
-
*
|
|
10
|
-
* @returns The appropriate slots object/array
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const getSlots: (parent: string | ConcreteComponent, slots: Slots, defaultPayload?: unknown) => VNode[] | undefined | Slots;
|