@prismicio/vue 3.0.0-beta.7 → 3.0.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/index.d.ts CHANGED
@@ -85,7 +85,7 @@ declare type SliceComponentProps<TSlice extends SliceLike = any, TContext = unkn
85
85
  * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
86
86
  * available to all Slice components
87
87
  */
88
- declare type DefineComponentSliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
88
+ declare type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
89
89
  slice: {
90
90
  type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;
91
91
  required: true;
@@ -196,7 +196,7 @@ declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext
196
196
  *
197
197
  * @returns A new optimized record of {@link SliceZoneComponents}
198
198
  */
199
- declare const defineSliceZoneComponents: <TSlice extends SliceLike<string> = SliceLike<string>, TContext = unknown>(components: SliceZoneComponents<TSlice, TContext>) => SliceZoneComponents<TSlice, TContext>;
199
+ declare const defineSliceZoneComponents: <TSlice extends SliceLike<string> = any, TContext = unknown>(components: SliceZoneComponents<TSlice, TContext>) => SliceZoneComponents<TSlice, TContext>;
200
200
  /**
201
201
  * Arguments for a `<SliceZone>` `resolver` function.
202
202
  */
@@ -1175,7 +1175,7 @@ declare const useAllPrismicDocumentsByIDs: <TDocument extends PrismicDocument<Re
1175
1175
  *
1176
1176
  * @see Underlying `@prismicio/client` method {@link Client.getByUID}
1177
1177
  */
1178
- declare const usePrismicDocumentByUID: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1178
+ declare const usePrismicDocumentByUID: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1179
1179
  signal?: {
1180
1180
  aborted: any;
1181
1181
  addEventListener: any;
@@ -1202,7 +1202,7 @@ declare const usePrismicDocumentByUID: <TDocument extends PrismicDocument<Record
1202
1202
  *
1203
1203
  * @see Underlying `@prismicio/client` method {@link Client.getByIDs}
1204
1204
  */
1205
- declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1205
+ declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1206
1206
  signal?: {
1207
1207
  aborted: any;
1208
1208
  addEventListener: any;
@@ -1229,7 +1229,7 @@ declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Reco
1229
1229
  *
1230
1230
  * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
1231
1231
  */
1232
- declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, ids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1232
+ declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, ids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1233
1233
  limit?: number | undefined;
1234
1234
  } & {
1235
1235
  signal?: {
@@ -1258,7 +1258,7 @@ declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument<R
1258
1258
  *
1259
1259
  * @see Underlying `@prismicio/client` method {@link Client.getSingle}
1260
1260
  */
1261
- declare const useSinglePrismicDocument: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1261
+ declare const useSinglePrismicDocument: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1262
1262
  signal?: {
1263
1263
  aborted: any;
1264
1264
  addEventListener: any;
@@ -1285,7 +1285,7 @@ declare const useSinglePrismicDocument: <TDocument extends PrismicDocument<Recor
1285
1285
  *
1286
1286
  * @see Underlying `@prismicio/client` method {@link Client.getByType}
1287
1287
  */
1288
- declare const usePrismicDocumentsByType: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1288
+ declare const usePrismicDocumentsByType: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1289
1289
  signal?: {
1290
1290
  aborted: any;
1291
1291
  addEventListener: any;
@@ -1312,7 +1312,7 @@ declare const usePrismicDocumentsByType: <TDocument extends PrismicDocument<Reco
1312
1312
  *
1313
1313
  * @see Underlying `@prismicio/client` method {@link Client.getAllByType}
1314
1314
  */
1315
- declare const useAllPrismicDocumentsByType: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1315
+ declare const useAllPrismicDocumentsByType: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: any, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1316
1316
  limit?: number | undefined;
1317
1317
  } & {
1318
1318
  signal?: {
package/dist/index.js CHANGED
@@ -306,7 +306,8 @@ const PrismicTextImpl = /* @__PURE__ */ defineComponent({
306
306
  props: {
307
307
  field: {
308
308
  type: Array,
309
- required: true
309
+ default: void 0,
310
+ required: false
310
311
  },
311
312
  separator: {
312
313
  type: String,
@@ -358,7 +359,8 @@ const PrismicRichTextImpl = /* @__PURE__ */ defineComponent({
358
359
  props: {
359
360
  field: {
360
361
  type: Array,
361
- required: true
362
+ default: void 0,
363
+ required: false
362
364
  },
363
365
  linkResolver: {
364
366
  type: Function,
@@ -385,7 +387,7 @@ const PrismicRichTextImpl = /* @__PURE__ */ defineComponent({
385
387
  const { html } = usePrismicRichText(props);
386
388
  const root = ref(null);
387
389
  const maybeRouter = inject(routerKey, null);
388
- if (maybeRouter && html.value) {
390
+ if (maybeRouter) {
389
391
  let links = [];
390
392
  const navigate = function(event) {
391
393
  event.preventDefault();