@sanity/cross-dataset-duplicator 1.2.4 → 1.3.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
@@ -50,482 +50,7 @@ export declare const DuplicateToAction: {
50
50
  | null
51
51
  onHandle: () => void
52
52
  icon: ForwardRefExoticComponent<
53
- Pick<
54
- SVGProps<SVGSVGElement>,
55
- | 'string'
56
- | 'filter'
57
- | 'fill'
58
- | 'values'
59
- | 'height'
60
- | 'crossOrigin'
61
- | 'href'
62
- | 'max'
63
- | 'media'
64
- | 'method'
65
- | 'min'
66
- | 'name'
67
- | 'target'
68
- | 'type'
69
- | 'width'
70
- | 'className'
71
- | 'id'
72
- | 'lang'
73
- | 'style'
74
- | 'tabIndex'
75
- | 'role'
76
- | 'color'
77
- | 'aria-activedescendant'
78
- | 'aria-atomic'
79
- | 'aria-autocomplete'
80
- | 'aria-busy'
81
- | 'aria-checked'
82
- | 'aria-colcount'
83
- | 'aria-colindex'
84
- | 'aria-colspan'
85
- | 'aria-controls'
86
- | 'aria-current'
87
- | 'aria-describedby'
88
- | 'aria-details'
89
- | 'aria-disabled'
90
- | 'aria-dropeffect'
91
- | 'aria-errormessage'
92
- | 'aria-expanded'
93
- | 'aria-flowto'
94
- | 'aria-grabbed'
95
- | 'aria-haspopup'
96
- | 'aria-hidden'
97
- | 'aria-invalid'
98
- | 'aria-keyshortcuts'
99
- | 'aria-label'
100
- | 'aria-labelledby'
101
- | 'aria-level'
102
- | 'aria-live'
103
- | 'aria-modal'
104
- | 'aria-multiline'
105
- | 'aria-multiselectable'
106
- | 'aria-orientation'
107
- | 'aria-owns'
108
- | 'aria-placeholder'
109
- | 'aria-posinset'
110
- | 'aria-pressed'
111
- | 'aria-readonly'
112
- | 'aria-relevant'
113
- | 'aria-required'
114
- | 'aria-roledescription'
115
- | 'aria-rowcount'
116
- | 'aria-rowindex'
117
- | 'aria-rowspan'
118
- | 'aria-selected'
119
- | 'aria-setsize'
120
- | 'aria-sort'
121
- | 'aria-valuemax'
122
- | 'aria-valuemin'
123
- | 'aria-valuenow'
124
- | 'aria-valuetext'
125
- | 'children'
126
- | 'dangerouslySetInnerHTML'
127
- | 'onCopy'
128
- | 'onCopyCapture'
129
- | 'onCut'
130
- | 'onCutCapture'
131
- | 'onPaste'
132
- | 'onPasteCapture'
133
- | 'onCompositionEnd'
134
- | 'onCompositionEndCapture'
135
- | 'onCompositionStart'
136
- | 'onCompositionStartCapture'
137
- | 'onCompositionUpdate'
138
- | 'onCompositionUpdateCapture'
139
- | 'onFocus'
140
- | 'onFocusCapture'
141
- | 'onBlur'
142
- | 'onBlurCapture'
143
- | 'onChange'
144
- | 'onChangeCapture'
145
- | 'onBeforeInput'
146
- | 'onBeforeInputCapture'
147
- | 'onInput'
148
- | 'onInputCapture'
149
- | 'onReset'
150
- | 'onResetCapture'
151
- | 'onSubmit'
152
- | 'onSubmitCapture'
153
- | 'onInvalid'
154
- | 'onInvalidCapture'
155
- | 'onLoad'
156
- | 'onLoadCapture'
157
- | 'onError'
158
- | 'onErrorCapture'
159
- | 'onKeyDown'
160
- | 'onKeyDownCapture'
161
- | 'onKeyPress'
162
- | 'onKeyPressCapture'
163
- | 'onKeyUp'
164
- | 'onKeyUpCapture'
165
- | 'onAbort'
166
- | 'onAbortCapture'
167
- | 'onCanPlay'
168
- | 'onCanPlayCapture'
169
- | 'onCanPlayThrough'
170
- | 'onCanPlayThroughCapture'
171
- | 'onDurationChange'
172
- | 'onDurationChangeCapture'
173
- | 'onEmptied'
174
- | 'onEmptiedCapture'
175
- | 'onEncrypted'
176
- | 'onEncryptedCapture'
177
- | 'onEnded'
178
- | 'onEndedCapture'
179
- | 'onLoadedData'
180
- | 'onLoadedDataCapture'
181
- | 'onLoadedMetadata'
182
- | 'onLoadedMetadataCapture'
183
- | 'onLoadStart'
184
- | 'onLoadStartCapture'
185
- | 'onPause'
186
- | 'onPauseCapture'
187
- | 'onPlay'
188
- | 'onPlayCapture'
189
- | 'onPlaying'
190
- | 'onPlayingCapture'
191
- | 'onProgress'
192
- | 'onProgressCapture'
193
- | 'onRateChange'
194
- | 'onRateChangeCapture'
195
- | 'onResize'
196
- | 'onResizeCapture'
197
- | 'onSeeked'
198
- | 'onSeekedCapture'
199
- | 'onSeeking'
200
- | 'onSeekingCapture'
201
- | 'onStalled'
202
- | 'onStalledCapture'
203
- | 'onSuspend'
204
- | 'onSuspendCapture'
205
- | 'onTimeUpdate'
206
- | 'onTimeUpdateCapture'
207
- | 'onVolumeChange'
208
- | 'onVolumeChangeCapture'
209
- | 'onWaiting'
210
- | 'onWaitingCapture'
211
- | 'onAuxClick'
212
- | 'onAuxClickCapture'
213
- | 'onClick'
214
- | 'onClickCapture'
215
- | 'onContextMenu'
216
- | 'onContextMenuCapture'
217
- | 'onDoubleClick'
218
- | 'onDoubleClickCapture'
219
- | 'onDrag'
220
- | 'onDragCapture'
221
- | 'onDragEnd'
222
- | 'onDragEndCapture'
223
- | 'onDragEnter'
224
- | 'onDragEnterCapture'
225
- | 'onDragExit'
226
- | 'onDragExitCapture'
227
- | 'onDragLeave'
228
- | 'onDragLeaveCapture'
229
- | 'onDragOver'
230
- | 'onDragOverCapture'
231
- | 'onDragStart'
232
- | 'onDragStartCapture'
233
- | 'onDrop'
234
- | 'onDropCapture'
235
- | 'onMouseDown'
236
- | 'onMouseDownCapture'
237
- | 'onMouseEnter'
238
- | 'onMouseLeave'
239
- | 'onMouseMove'
240
- | 'onMouseMoveCapture'
241
- | 'onMouseOut'
242
- | 'onMouseOutCapture'
243
- | 'onMouseOver'
244
- | 'onMouseOverCapture'
245
- | 'onMouseUp'
246
- | 'onMouseUpCapture'
247
- | 'onSelect'
248
- | 'onSelectCapture'
249
- | 'onTouchCancel'
250
- | 'onTouchCancelCapture'
251
- | 'onTouchEnd'
252
- | 'onTouchEndCapture'
253
- | 'onTouchMove'
254
- | 'onTouchMoveCapture'
255
- | 'onTouchStart'
256
- | 'onTouchStartCapture'
257
- | 'onPointerDown'
258
- | 'onPointerDownCapture'
259
- | 'onPointerMove'
260
- | 'onPointerMoveCapture'
261
- | 'onPointerUp'
262
- | 'onPointerUpCapture'
263
- | 'onPointerCancel'
264
- | 'onPointerCancelCapture'
265
- | 'onPointerEnter'
266
- | 'onPointerEnterCapture'
267
- | 'onPointerLeave'
268
- | 'onPointerLeaveCapture'
269
- | 'onPointerOver'
270
- | 'onPointerOverCapture'
271
- | 'onPointerOut'
272
- | 'onPointerOutCapture'
273
- | 'onGotPointerCapture'
274
- | 'onGotPointerCaptureCapture'
275
- | 'onLostPointerCapture'
276
- | 'onLostPointerCaptureCapture'
277
- | 'onScroll'
278
- | 'onScrollCapture'
279
- | 'onWheel'
280
- | 'onWheelCapture'
281
- | 'onAnimationStart'
282
- | 'onAnimationStartCapture'
283
- | 'onAnimationEnd'
284
- | 'onAnimationEndCapture'
285
- | 'onAnimationIteration'
286
- | 'onAnimationIterationCapture'
287
- | 'onTransitionEnd'
288
- | 'onTransitionEndCapture'
289
- | 'key'
290
- | 'display'
291
- | 'overflow'
292
- | 'radius'
293
- | 'clipPath'
294
- | 'mask'
295
- | 'path'
296
- | 'direction'
297
- | 'fontSize'
298
- | 'mode'
299
- | 'to'
300
- | 'accentHeight'
301
- | 'accumulate'
302
- | 'additive'
303
- | 'alignmentBaseline'
304
- | 'allowReorder'
305
- | 'alphabetic'
306
- | 'amplitude'
307
- | 'arabicForm'
308
- | 'ascent'
309
- | 'attributeName'
310
- | 'attributeType'
311
- | 'autoReverse'
312
- | 'azimuth'
313
- | 'baseFrequency'
314
- | 'baselineShift'
315
- | 'baseProfile'
316
- | 'bbox'
317
- | 'begin'
318
- | 'bias'
319
- | 'by'
320
- | 'calcMode'
321
- | 'capHeight'
322
- | 'clip'
323
- | 'clipPathUnits'
324
- | 'clipRule'
325
- | 'colorInterpolation'
326
- | 'colorInterpolationFilters'
327
- | 'colorProfile'
328
- | 'colorRendering'
329
- | 'contentScriptType'
330
- | 'contentStyleType'
331
- | 'cursor'
332
- | 'cx'
333
- | 'cy'
334
- | 'd'
335
- | 'decelerate'
336
- | 'descent'
337
- | 'diffuseConstant'
338
- | 'divisor'
339
- | 'dominantBaseline'
340
- | 'dur'
341
- | 'dx'
342
- | 'dy'
343
- | 'edgeMode'
344
- | 'elevation'
345
- | 'enableBackground'
346
- | 'end'
347
- | 'exponent'
348
- | 'externalResourcesRequired'
349
- | 'fillOpacity'
350
- | 'fillRule'
351
- | 'filterRes'
352
- | 'filterUnits'
353
- | 'floodColor'
354
- | 'floodOpacity'
355
- | 'focusable'
356
- | 'fontFamily'
357
- | 'fontSizeAdjust'
358
- | 'fontStretch'
359
- | 'fontStyle'
360
- | 'fontVariant'
361
- | 'fontWeight'
362
- | 'format'
363
- | 'fr'
364
- | 'from'
365
- | 'fx'
366
- | 'fy'
367
- | 'g1'
368
- | 'g2'
369
- | 'glyphName'
370
- | 'glyphOrientationHorizontal'
371
- | 'glyphOrientationVertical'
372
- | 'glyphRef'
373
- | 'gradientTransform'
374
- | 'gradientUnits'
375
- | 'hanging'
376
- | 'horizAdvX'
377
- | 'horizOriginX'
378
- | 'ideographic'
379
- | 'imageRendering'
380
- | 'in2'
381
- | 'in'
382
- | 'intercept'
383
- | 'k1'
384
- | 'k2'
385
- | 'k3'
386
- | 'k4'
387
- | 'k'
388
- | 'kernelMatrix'
389
- | 'kernelUnitLength'
390
- | 'kerning'
391
- | 'keyPoints'
392
- | 'keySplines'
393
- | 'keyTimes'
394
- | 'lengthAdjust'
395
- | 'letterSpacing'
396
- | 'lightingColor'
397
- | 'limitingConeAngle'
398
- | 'local'
399
- | 'markerEnd'
400
- | 'markerHeight'
401
- | 'markerMid'
402
- | 'markerStart'
403
- | 'markerUnits'
404
- | 'markerWidth'
405
- | 'maskContentUnits'
406
- | 'maskUnits'
407
- | 'mathematical'
408
- | 'numOctaves'
409
- | 'offset'
410
- | 'opacity'
411
- | 'operator'
412
- | 'order'
413
- | 'orient'
414
- | 'orientation'
415
- | 'origin'
416
- | 'overlinePosition'
417
- | 'overlineThickness'
418
- | 'paintOrder'
419
- | 'panose1'
420
- | 'pathLength'
421
- | 'patternContentUnits'
422
- | 'patternTransform'
423
- | 'patternUnits'
424
- | 'pointerEvents'
425
- | 'points'
426
- | 'pointsAtX'
427
- | 'pointsAtY'
428
- | 'pointsAtZ'
429
- | 'preserveAlpha'
430
- | 'preserveAspectRatio'
431
- | 'primitiveUnits'
432
- | 'r'
433
- | 'refX'
434
- | 'refY'
435
- | 'renderingIntent'
436
- | 'repeatCount'
437
- | 'repeatDur'
438
- | 'requiredExtensions'
439
- | 'requiredFeatures'
440
- | 'restart'
441
- | 'result'
442
- | 'rotate'
443
- | 'rx'
444
- | 'ry'
445
- | 'scale'
446
- | 'seed'
447
- | 'shapeRendering'
448
- | 'slope'
449
- | 'spacing'
450
- | 'specularConstant'
451
- | 'specularExponent'
452
- | 'speed'
453
- | 'spreadMethod'
454
- | 'startOffset'
455
- | 'stdDeviation'
456
- | 'stemh'
457
- | 'stemv'
458
- | 'stitchTiles'
459
- | 'stopColor'
460
- | 'stopOpacity'
461
- | 'strikethroughPosition'
462
- | 'strikethroughThickness'
463
- | 'stroke'
464
- | 'strokeDasharray'
465
- | 'strokeDashoffset'
466
- | 'strokeLinecap'
467
- | 'strokeLinejoin'
468
- | 'strokeMiterlimit'
469
- | 'strokeOpacity'
470
- | 'strokeWidth'
471
- | 'surfaceScale'
472
- | 'systemLanguage'
473
- | 'tableValues'
474
- | 'targetX'
475
- | 'targetY'
476
- | 'textAnchor'
477
- | 'textDecoration'
478
- | 'textLength'
479
- | 'textRendering'
480
- | 'transform'
481
- | 'u1'
482
- | 'u2'
483
- | 'underlinePosition'
484
- | 'underlineThickness'
485
- | 'unicode'
486
- | 'unicodeBidi'
487
- | 'unicodeRange'
488
- | 'unitsPerEm'
489
- | 'vAlphabetic'
490
- | 'vectorEffect'
491
- | 'version'
492
- | 'vertAdvY'
493
- | 'vertOriginX'
494
- | 'vertOriginY'
495
- | 'vHanging'
496
- | 'vIdeographic'
497
- | 'viewBox'
498
- | 'viewTarget'
499
- | 'visibility'
500
- | 'vMathematical'
501
- | 'widths'
502
- | 'wordSpacing'
503
- | 'writingMode'
504
- | 'x1'
505
- | 'x2'
506
- | 'x'
507
- | 'xChannelSelector'
508
- | 'xHeight'
509
- | 'xlinkActuate'
510
- | 'xlinkArcrole'
511
- | 'xlinkHref'
512
- | 'xlinkRole'
513
- | 'xlinkShow'
514
- | 'xlinkTitle'
515
- | 'xlinkType'
516
- | 'xmlBase'
517
- | 'xmlLang'
518
- | 'xmlns'
519
- | 'xmlnsXlink'
520
- | 'xmlSpace'
521
- | 'y1'
522
- | 'y2'
523
- | 'y'
524
- | 'yChannelSelector'
525
- | 'z'
526
- | 'zoomAndPan'
527
- > &
528
- RefAttributes<SVGSVGElement>
53
+ Omit<SVGProps<SVGSVGElement>, 'ref'> & RefAttributes<SVGSVGElement>
529
54
  >
530
55
  }
531
56
  action: string
package/dist/index.esm.js CHANGED
@@ -120,6 +120,7 @@ function SelectButtons(props) {
120
120
  shadow: 1,
121
121
  children: /* @__PURE__ */jsx(Flex, {
122
122
  gap: 2,
123
+ wrap: "wrap",
123
124
  children: buttons.map((action, actionIndex) => action ? /* @__PURE__ */jsx(Button, {
124
125
  fontSize: 1,
125
126
  mode: "bleed",
@@ -747,67 +748,68 @@ function DuplicatorQuery(props) {
747
748
  handleSubmit();
748
749
  }
749
750
  }, []);
750
- return /* @__PURE__ */jsx(Container, {
751
- width: [1, 1, 1, 3],
751
+ return /* @__PURE__ */jsx(Card, {
752
752
  padding: [0, 0, 0, 5],
753
- children: /* @__PURE__ */jsxs(Grid, {
754
- columns: [1, 1, 1, 2],
755
- gap: [1, 1, 1, 4],
756
- children: [/* @__PURE__ */jsx(Box, {
757
- padding: [2, 2, 2, 0],
758
- children: /* @__PURE__ */jsx(Card, {
759
- padding: 4,
760
- radius: 3,
761
- border: true,
762
- children: /* @__PURE__ */jsxs(Stack, {
763
- space: 4,
764
- children: [/* @__PURE__ */jsx(Box, {
765
- children: /* @__PURE__ */jsx(Label, {
766
- children: "Initial Documents Query"
767
- })
768
- }), /* @__PURE__ */jsx(Box, {
769
- children: /* @__PURE__ */jsx(Text, {
770
- children: "Start with a valid GROQ query to load initial documents. The query will need to return an Array of Objects. Drafts will be removed from the results."
771
- })
772
- }), /* @__PURE__ */jsx("form", {
773
- onSubmit: handleSubmit,
774
- children: /* @__PURE__ */jsxs(Flex, {
775
- children: [/* @__PURE__ */jsx(Box, {
776
- flex: 1,
777
- paddingRight: 2,
778
- children: /* @__PURE__ */jsx(TextInput, {
779
- style: {
780
- fontFamily: "monospace"
781
- },
782
- fontSize: 2,
783
- onChange: event => setValue(event.currentTarget.value),
784
- padding: 4,
785
- placeholder: "*[_type == \"article\"]",
786
- value: value != null ? value : ""
787
- })
788
- }), /* @__PURE__ */jsx(Button, {
789
- padding: 2,
790
- paddingX: 4,
791
- tone: "primary",
792
- onClick: handleSubmit,
793
- text: "Query",
794
- disabled: !value
795
- })]
796
- })
797
- })]
753
+ children: /* @__PURE__ */jsx(Container, {
754
+ children: /* @__PURE__ */jsxs(Grid, {
755
+ columns: [1, 1, 1, 2],
756
+ gap: [1, 1, 1, 4],
757
+ children: [/* @__PURE__ */jsx(Box, {
758
+ padding: [2, 2, 2, 0],
759
+ children: /* @__PURE__ */jsx(Card, {
760
+ padding: 4,
761
+ radius: 3,
762
+ border: true,
763
+ children: /* @__PURE__ */jsxs(Stack, {
764
+ space: 4,
765
+ children: [/* @__PURE__ */jsx(Box, {
766
+ children: /* @__PURE__ */jsx(Label, {
767
+ children: "Initial Documents Query"
768
+ })
769
+ }), /* @__PURE__ */jsx(Box, {
770
+ children: /* @__PURE__ */jsx(Text, {
771
+ children: "Start with a valid GROQ query to load initial documents. The query will need to return an Array of Objects. Drafts will be removed from the results."
772
+ })
773
+ }), /* @__PURE__ */jsx("form", {
774
+ onSubmit: handleSubmit,
775
+ children: /* @__PURE__ */jsxs(Flex, {
776
+ children: [/* @__PURE__ */jsx(Box, {
777
+ flex: 1,
778
+ paddingRight: 2,
779
+ children: /* @__PURE__ */jsx(TextInput, {
780
+ style: {
781
+ fontFamily: "monospace"
782
+ },
783
+ fontSize: 2,
784
+ onChange: event => setValue(event.currentTarget.value),
785
+ padding: 4,
786
+ placeholder: "*[_type == \"article\"]",
787
+ value: value != null ? value : ""
788
+ })
789
+ }), /* @__PURE__ */jsx(Button, {
790
+ padding: 2,
791
+ paddingX: 4,
792
+ tone: "primary",
793
+ onClick: handleSubmit,
794
+ text: "Query",
795
+ disabled: !value
796
+ })]
797
+ })
798
+ })]
799
+ })
798
800
  })
799
- })
800
- }), !((_a = initialData.docs) == null ? void 0 : _a.length) || initialData.docs.length < 1 && /* @__PURE__ */jsx(Container, {
801
- width: 1,
802
- children: /* @__PURE__ */jsx(Card, {
803
- padding: 5,
804
- children: value ? "No Documents registered to the Schema match this query" : "Start with a valid GROQ query"
805
- })
806
- }), ((_b = initialData.docs) == null ? void 0 : _b.length) > 0 && /* @__PURE__ */jsx(Duplicator, {
807
- docs: initialData.docs,
808
- token,
809
- pluginConfig
810
- })]
801
+ }), !((_a = initialData.docs) == null ? void 0 : _a.length) || initialData.docs.length < 1 && /* @__PURE__ */jsx(Container, {
802
+ width: 1,
803
+ children: /* @__PURE__ */jsx(Card, {
804
+ padding: 5,
805
+ children: value ? "No Documents registered to the Schema match this query" : "Start with a valid GROQ query"
806
+ })
807
+ }), ((_b = initialData.docs) == null ? void 0 : _b.length) > 0 && /* @__PURE__ */jsx(Duplicator, {
808
+ docs: initialData.docs,
809
+ token,
810
+ pluginConfig
811
+ })]
812
+ })
811
813
  })
812
814
  });
813
815
  }