@prismicio/editor-fields 0.4.39 → 0.4.40

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.es.js CHANGED
@@ -5,7 +5,7 @@ import { createRouteParams as kz, toURL as ho, getUrlTitle as ML } from "@prismi
5
5
  import * as we from "react";
6
6
  import Ot, { useState as ie, createContext as Fu, useRef as jn, useMemo as bn, useCallback as kL, useEffect as _n, useContext as Sa, useTransition as Ks, Fragment as Lz, useLayoutEffect as ov, Suspense as In, forwardRef as av, startTransition as LL, useImperativeHandle as jz, createElement as Pm, useId as jL } from "react";
7
7
  import { keys as UL, mapValues as Uz, removeKey as WL, isEmpty as Wz } from "@prismicio/editor-support/Object";
8
- import { Box as N, Icon as dr, Text as be, Button as Mt, BlankSlate as mf, BlankSlateIcon as ac, BlankSlateTitle as gf, BlankSlateDescription as iA, useAlert as uc, Tooltip as Ln, FileUploadButton as tg, FormSearchInput as oA, Portal as Kz, FileDropZone as Pz, DefaultErrorMessage as KL, dialogErrorImage as PL, useMediaQuery as Bz, MediaCard as BL, ScrollArea as aA, Skeleton as An, Toast as uA, Checkbox as DL, ErrorBoundary as Zn, Badge as wo, DropdownMenu as sA, DropdownMenuTrigger as cA, DropdownMenuContent as lA, ComboBox as NL, ComboBoxInput as qL, ComboBoxContent as VL, ComboboxAction as Dz, ComboBoxItem as bC, IconButton as Tl, Dialog as sc, DialogHeader as fA, DialogContent as cc, DialogActions as uv, DialogCancelButton as sv, DialogActionButton as cv, CheckerBoard as Nz, Image as QS, MediaCardPlaceholder as QL, MediaProgress as qz, Tab as MF, FormInput as hp, FormField as CC, ContentEditable as SC, AnimatedList as Vz, useToast as Qz, BlankSlateActions as zL, Field as vr, FieldIcon as di, FieldLabel as yr, FieldControl as br, Switch as zz, ColorInput as Hz, DateInput as HL, TextInput as Yz, PreviewCard as zS, PreviewImage as YL, PreviewContent as HS, handleEditorFlushSyncError as GL, FieldFooter as _C, CardHeaderTitle as Gz, CardHeader as Jz, CardContent as IC, Card as YS, DialogOptions as JL, DialogOptionsItem as TC, Separator as ZL, Cropper as Zz, Slider as Xz, CardHeaderActions as eH, Dot as tH, CardFooter as nH, TextOverflow as rH, FilterField as $C, theme as hu, Select as XL, SelectItem as rp, Popover as iH, LinkDescriptionCard as Ps, LinkImageCard as ej, Carousel as oH, CarouselItem as aH, TextArea as uH, NumberInput as sH, ToolbarSeparator as dA, ToolbarToggleButton as cH, DropdownMenuItem as Es, ToolbarButtonGroup as lH, ToolbarButton as wC, CheckboxLabel as fH, ToolbarToggleButtonGroup as dH, ToolbarToggleButtonGroupItem as pH, Toolbar as AH, useEditor as hH, contentEditableClass as mH, contentEditableMultilinePlaceholderClass as gH, SelectGhostTrigger as vH, Group as yH, LazyRender as tj, GroupItem as bH, AnimatedElement as nj, Line as CH, FieldSet as lv } from "@prismicio/editor-ui";
8
+ import { Box as N, Icon as dr, Text as be, Button as Mt, BlankSlate as mf, BlankSlateIcon as ac, BlankSlateTitle as gf, BlankSlateDescription as iA, useAlert as uc, Tooltip as Ln, FileUploadButton as tg, FormSearchInput as oA, Portal as Kz, FileDropZone as Pz, DefaultErrorMessage as KL, dialogErrorImage as PL, useMediaQuery as Bz, MediaCard as BL, ScrollArea as aA, Skeleton as An, Toast as uA, Checkbox as DL, ErrorBoundary as Zn, Badge as wo, DropdownMenu as sA, DropdownMenuTrigger as cA, DropdownMenuContent as lA, ComboBox as NL, ComboBoxInput as qL, ComboBoxContent as VL, ComboboxAction as Dz, ComboBoxItem as bC, IconButton as Tl, Dialog as sc, DialogHeader as fA, DialogContent as cc, DialogActions as uv, DialogCancelButton as sv, DialogActionButton as cv, CheckerBoard as Nz, Image as QS, MediaCardPlaceholder as QL, MediaProgress as qz, Tab as MF, FormInput as hp, FormInputField as CC, ContentEditable as SC, AnimatedList as Vz, useToast as Qz, BlankSlateActions as zL, Field as vr, FieldIcon as di, FieldLabel as yr, FieldControl as br, Switch as zz, ColorInput as Hz, DateInput as HL, TextInput as Yz, PreviewCard as zS, PreviewImage as YL, PreviewContent as HS, handleEditorFlushSyncError as GL, FieldFooter as _C, CardHeaderTitle as Gz, CardHeader as Jz, CardContent as IC, Card as YS, DialogOptions as JL, DialogOptionsItem as TC, Separator as ZL, Cropper as Zz, Slider as Xz, CardHeaderActions as eH, Dot as tH, CardFooter as nH, TextOverflow as rH, FilterField as $C, theme as hu, Select as XL, SelectItem as rp, Popover as iH, LinkDescriptionCard as Ps, LinkImageCard as ej, Carousel as oH, CarouselItem as aH, TextArea as uH, NumberInput as sH, ToolbarSeparator as dA, ToolbarToggleButton as cH, DropdownMenuItem as Es, ToolbarButtonGroup as lH, ToolbarButton as wC, CheckboxLabel as fH, ToolbarToggleButtonGroup as dH, ToolbarToggleButtonGroupItem as pH, Toolbar as AH, useEditor as hH, contentEditableClass as mH, contentEditableMultilinePlaceholderClass as gH, SelectGhostTrigger as vH, Group as yH, LazyRender as tj, GroupItem as bH, AnimatedElement as nj, Line as CH, FieldSet as lv } from "@prismicio/editor-ui";
9
9
  import { useStableCallback as ai, useOnChange as lc, useDebounce as rj, useForceUpdate as SH, useDebounceState as vf, refContainsTarget as _H } from "@prismicio/editor-support/React";
10
10
  import { prettyPrintDate as IH, dateFromISOString as ij } from "@prismicio/editor-support/Date";
11
11
  import { isDefined as mo } from "@prismicio/editor-support/Type";
@@ -27189,15 +27189,15 @@ function kO(e, t, n, r, i) {
27189
27189
  }
27190
27190
  function Xxe(e, t, n, r) {
27191
27191
  const i = new URL(e);
27192
- return i.search = r, bt(i, {
27193
- headers: { repository: n },
27192
+ return i.search = n, bt(i, {
27194
27193
  credentials: Lt(t),
27195
- okType: Zxe
27194
+ okType: Zxe,
27195
+ ...r
27196
27196
  });
27197
27197
  }
27198
27198
  function eEe(e) {
27199
- const { searchTerm: t, tags: n, localeId: r, customTypesIds: i } = e, o = new URLSearchParams();
27200
- return t && o.append("searchTerm", t), n != null && n.length && o.append("tags", n.toString()), r && o.append("localeId", r), i != null && i.length && o.append("customTypesIds", i.toString()), o.toString();
27199
+ const { repository: t, searchTerm: n, tags: r, localeId: i, customTypesIds: o } = e, a = new URLSearchParams();
27200
+ return a.append("repository", t), n && a.append("searchTerm", n), r != null && r.length && a.append("tags", r.toString()), i && a.append("localeId", i), o != null && o.length && a.append("customTypesIds", o.toString()), a.toString();
27201
27201
  }
27202
27202
  function Z8(e) {
27203
27203
  return e.reduce((t, n) => {
@@ -28946,6 +28946,7 @@ function Dm(e, t) {
28946
28946
  t
28947
28947
  ), o = !!(t != null && t.width || t != null && t.height);
28948
28948
  return {
28949
+ provider: "imgix",
28949
28950
  url: XEe(e.url, i, n, r, o),
28950
28951
  alt: e.alt,
28951
28952
  ...rRe(e) ? { credits: e.credits } : {},
@@ -31413,6 +31414,7 @@ function EOe(e) {
31413
31414
  language: [...vs(i, (v) => v.id)],
31414
31415
  term: [t]
31415
31416
  }) : eEe({
31417
+ repository: f,
31416
31418
  searchTerm: t,
31417
31419
  customTypesIds: [...vs(r, (v) => v.id)],
31418
31420
  tags: [...vs(n, (v) => v.id)],
@@ -31423,7 +31425,6 @@ function EOe(e) {
31423
31425
  a,
31424
31426
  u,
31425
31427
  s,
31426
- f,
31427
31428
  _,
31428
31429
  c,
31429
31430
  p
@@ -31437,28 +31438,27 @@ pv.registerFetcherConfig(Oq, {
31437
31438
  cacheCapacity: 500,
31438
31439
  revalidationStrategy: { type: "never" }
31439
31440
  });
31440
- async function Oq(e, t, n, r, i, o, a) {
31441
- const u = Kwe[o];
31442
- if (a) {
31443
- const f = await kO(
31441
+ async function Oq(e, t, n, r, i, o) {
31442
+ const a = Kwe[i];
31443
+ if (o) {
31444
+ const l = await kO(
31444
31445
  e,
31445
31446
  n,
31446
- i,
31447
+ r,
31447
31448
  200
31448
31449
  );
31449
- return JM(f, u);
31450
+ return JM(l, a);
31450
31451
  }
31451
- const s = await Xxe(
31452
+ const u = await Xxe(
31452
31453
  t,
31453
31454
  n,
31454
- r,
31455
- i
31456
- ), c = await nEe(
31455
+ r
31456
+ ), s = await nEe(
31457
31457
  e,
31458
31458
  n,
31459
- s.results.map(({ id: l }) => l)
31459
+ u.results.map(({ id: c }) => c)
31460
31460
  );
31461
- return JM(c, u);
31461
+ return JM(s, a);
31462
31462
  }
31463
31463
  function JM(e, t) {
31464
31464
  return { results: e.results.flatMap((r) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@floating-ui/react-dom-interactions": "0.9.3",
4
- "@prismicio/editor-support": "0.4.39",
4
+ "@prismicio/editor-support": "0.4.40",
5
5
  "@prismicio/richtext": "2.1.1",
6
6
  "@prismicio/types-internal": "2.6.0",
7
7
  "@tiptap/core": "2.3.0",
@@ -67,7 +67,7 @@
67
67
  "module": "./dist/index.es.js",
68
68
  "name": "@prismicio/editor-fields",
69
69
  "peerDependencies": {
70
- "@prismicio/editor-ui": "^0.4.39",
70
+ "@prismicio/editor-ui": "^0.4.40",
71
71
  "react": "18",
72
72
  "react-dom": "18"
73
73
  },
@@ -84,5 +84,5 @@
84
84
  "sideEffects": false,
85
85
  "stableVersion": "0.0.0",
86
86
  "types": "./dist/index.d.ts",
87
- "version": "0.4.39"
87
+ "version": "0.4.40"
88
88
  }