sanity 5.22.0-next.21 → 5.22.0-next.23

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.
@@ -15113,11 +15113,13 @@ interface GroupableActionDescription<GroupType = unknown> extends BaseActionDesc
15113
15113
  }
15114
15114
  /**
15115
15115
  * Symbol for configuring decision parameters schema
15116
+ * @hidden
15116
15117
  * @beta
15117
15118
  */
15118
15119
  declare const DECISION_PARAMETERS_SCHEMA: unique symbol;
15119
15120
  /**
15120
15121
  * Configuration for decision parameters
15122
+ * @hidden
15121
15123
  * @beta
15122
15124
  */
15123
15125
  interface DecisionParametersConfig {
@@ -15281,7 +15283,10 @@ interface ConfigContext$1 {
15281
15283
  * Localization resources
15282
15284
  */
15283
15285
  i18n: LocaleSource;
15284
- /** @beta */
15286
+ /**
15287
+ * @hidden
15288
+ * @beta
15289
+ */
15285
15290
  [DECISION_PARAMETERS_SCHEMA]?: DecisionParametersConfig;
15286
15291
  }
15287
15292
  /** @public */
@@ -15492,7 +15497,10 @@ interface PluginOptions {
15492
15497
  __internal_serverDocumentActions?: WorkspaceOptions['__internal_serverDocumentActions'];
15493
15498
  /** Configuration for Scheduled drafts */
15494
15499
  scheduledDrafts?: DefaultPluginsWorkspaceOptions['scheduledDrafts'];
15495
- /** @beta */
15500
+ /**
15501
+ * @hidden
15502
+ * @beta
15503
+ */
15496
15504
  [DECISION_PARAMETERS_SCHEMA]?: DecisionParametersConfig;
15497
15505
  /** Configuration for Content Releases */
15498
15506
  releases?: DefaultPluginsWorkspaceOptions['releases'];
@@ -15636,6 +15644,7 @@ interface WorkspaceOptions extends SourceOptions {
15636
15644
  };
15637
15645
  scheduledDrafts?: DefaultPluginsWorkspaceOptions['scheduledDrafts'];
15638
15646
  /**
15647
+ * @hidden
15639
15648
  * @beta
15640
15649
  */
15641
15650
  [DECISION_PARAMETERS_SCHEMA]?: DecisionParametersConfig;
@@ -1,4 +1,4 @@
1
- var version = "5.22.0-next.21+9060f82806";
1
+ var version = "5.22.0-next.23+cf9ce7dca6";
2
2
  let buildVersion;
3
3
  try {
4
4
  buildVersion = process.env.PKG_BUILD_VERSION;
@@ -7,7 +7,7 @@ try {
7
7
  try {
8
8
  buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
9
9
  // and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
10
- "5.22.0-next.21+9060f82806";
10
+ "5.22.0-next.23+cf9ce7dca6";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.js CHANGED
@@ -35119,7 +35119,7 @@ const ROOT_PATH = [{
35119
35119
  componentId: "sc-13yzieu-3"
35120
35120
  })`${responsiveInputPaddingStyle}`;
35121
35121
  function StringInputPortableText(props2) {
35122
- const $ = c(50), {
35122
+ const $ = c(53), {
35123
35123
  elementProps,
35124
35124
  onChange,
35125
35125
  value: definitiveValue,
@@ -35127,7 +35127,8 @@ function StringInputPortableText(props2) {
35127
35127
  } = props2, {
35128
35128
  onFocus,
35129
35129
  onBlur,
35130
- style
35130
+ style,
35131
+ ref: focusRef
35131
35132
  } = elementProps;
35132
35133
  let t0;
35133
35134
  $[0] !== computeDiff || $[1] !== definitiveValue ? (t0 = {
@@ -35180,31 +35181,34 @@ function StringInputPortableText(props2) {
35180
35181
  let t5;
35181
35182
  $[20] !== handleEditorEvent ? (t5 = /* @__PURE__ */ jsx(EventListenerPlugin, { on: handleEditorEvent }), $[20] = handleEditorEvent, $[21] = t5) : t5 = $[21];
35182
35183
  let t6;
35183
- $[22] !== props2.value ? (t6 = /* @__PURE__ */ jsx(UpdateValuePlugin$1, { value: props2.value }), $[22] = props2.value, $[23] = t6) : t6 = $[23];
35184
- const t7 = props2.readOnly ?? !1;
35185
- let t8;
35186
- $[24] !== t7 ? (t8 = /* @__PURE__ */ jsx(UpdateReadOnlyPlugin$1, { readOnly: t7 }), $[24] = t7, $[25] = t8) : t8 = $[25];
35184
+ $[22] !== focusRef ? (t6 = /* @__PURE__ */ jsx(FocusBridgePlugin, { focusRef }), $[22] = focusRef, $[23] = t6) : t6 = $[23];
35185
+ let t7;
35186
+ $[24] !== props2.value ? (t7 = /* @__PURE__ */ jsx(UpdateValuePlugin$1, { value: props2.value }), $[24] = props2.value, $[25] = t7) : t7 = $[25];
35187
+ const t8 = props2.readOnly ?? !1;
35187
35188
  let t9;
35188
- $[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(BehaviorPlugin, { behaviors: [plainTextPasteBehaviour, plainTextOneLineBehaviour] }), $[26] = t9) : t9 = $[26];
35189
- const t10 = props2.validationError ? INVALID_CLASS_NAME : void 0, t11 = props2.displayInlineChanges ? renderPlaceholder : void 0, t12 = props2.displayInlineChanges ? rangeDecorations : void 0;
35190
- let t13;
35191
- $[27] !== fontSize || $[28] !== padding || $[29] !== rootTheme.scheme || $[30] !== rootTheme.tone || $[31] !== space || $[32] !== style || $[33] !== t10 || $[34] !== t11 || $[35] !== t12 ? (t13 = /* @__PURE__ */ jsx(StyledInput, { className: t10, style, renderPlaceholder: t11, rangeDecorations: t12, $fontSize: fontSize, $space: space, $padding: padding, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, "data-testid": "string-input-portable-text" }), $[27] = fontSize, $[28] = padding, $[29] = rootTheme.scheme, $[30] = rootTheme.tone, $[31] = space, $[32] = style, $[33] = t10, $[34] = t11, $[35] = t12, $[36] = t13) : t13 = $[36];
35189
+ $[26] !== t8 ? (t9 = /* @__PURE__ */ jsx(UpdateReadOnlyPlugin$1, { readOnly: t8 }), $[26] = t8, $[27] = t9) : t9 = $[27];
35190
+ let t10;
35191
+ $[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsx(BehaviorPlugin, { behaviors: [plainTextPasteBehaviour, plainTextOneLineBehaviour] }), $[28] = t10) : t10 = $[28];
35192
+ const t11 = props2.validationError ? INVALID_CLASS_NAME : void 0, t12 = props2.displayInlineChanges ? renderPlaceholder : void 0, t13 = props2.displayInlineChanges ? rangeDecorations : void 0;
35192
35193
  let t14;
35193
- $[37] !== initialConfig || $[38] !== t13 || $[39] !== t5 || $[40] !== t6 || $[41] !== t8 ? (t14 = /* @__PURE__ */ jsxs(EditorProvider, { initialConfig, children: [
35194
+ $[29] !== fontSize || $[30] !== padding || $[31] !== rootTheme.scheme || $[32] !== rootTheme.tone || $[33] !== space || $[34] !== style || $[35] !== t11 || $[36] !== t12 || $[37] !== t13 ? (t14 = /* @__PURE__ */ jsx(StyledInput, { className: t11, style, renderPlaceholder: t12, rangeDecorations: t13, $fontSize: fontSize, $space: space, $padding: padding, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, "data-testid": "string-input-portable-text" }), $[29] = fontSize, $[30] = padding, $[31] = rootTheme.scheme, $[32] = rootTheme.tone, $[33] = space, $[34] = style, $[35] = t11, $[36] = t12, $[37] = t13, $[38] = t14) : t14 = $[38];
35195
+ let t15;
35196
+ $[39] !== initialConfig || $[40] !== t14 || $[41] !== t5 || $[42] !== t6 || $[43] !== t7 || $[44] !== t9 ? (t15 = /* @__PURE__ */ jsxs(EditorProvider, { initialConfig, children: [
35194
35197
  t4,
35195
35198
  t5,
35196
35199
  t6,
35197
- t8,
35200
+ t7,
35198
35201
  t9,
35199
- t13
35200
- ] }), $[37] = initialConfig, $[38] = t13, $[39] = t5, $[40] = t6, $[41] = t8, $[42] = t14) : t14 = $[42];
35201
- let t15;
35202
- $[43] !== radius || $[44] !== rootTheme.scheme || $[45] !== rootTheme.tone ? (t15 = /* @__PURE__ */ jsx(StyledEditorRepresentation, { radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, "data-border": !0 }), $[43] = radius, $[44] = rootTheme.scheme, $[45] = rootTheme.tone, $[46] = t15) : t15 = $[46];
35202
+ t10,
35203
+ t14
35204
+ ] }), $[39] = initialConfig, $[40] = t14, $[41] = t5, $[42] = t6, $[43] = t7, $[44] = t9, $[45] = t15) : t15 = $[45];
35203
35205
  let t16;
35204
- return $[47] !== t14 || $[48] !== t15 ? (t16 = /* @__PURE__ */ jsxs(StyledRoot, { children: [
35205
- t14,
35206
- t15
35207
- ] }), $[47] = t14, $[48] = t15, $[49] = t16) : t16 = $[49], t16;
35206
+ $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone ? (t16 = /* @__PURE__ */ jsx(StyledEditorRepresentation, { radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, "data-border": !0 }), $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t16) : t16 = $[49];
35207
+ let t17;
35208
+ return $[50] !== t15 || $[51] !== t16 ? (t17 = /* @__PURE__ */ jsxs(StyledRoot, { children: [
35209
+ t15,
35210
+ t16
35211
+ ] }), $[50] = t15, $[51] = t16, $[52] = t17) : t17 = $[52], t17;
35208
35212
  }
35209
35213
  function UpdateValuePlugin$1(props2) {
35210
35214
  const $ = c(4), editor2 = useEditor();
@@ -35216,6 +35220,19 @@ function UpdateValuePlugin$1(props2) {
35216
35220
  });
35217
35221
  }, t1 = [editor2, props2.value], $[0] = editor2, $[1] = props2.value, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1), null;
35218
35222
  }
35223
+ function FocusBridgePlugin(props2) {
35224
+ const $ = c(4), editor2 = useEditor(), {
35225
+ focusRef
35226
+ } = props2;
35227
+ let t0, t1;
35228
+ return $[0] !== editor2 || $[1] !== focusRef ? (t0 = () => (focusRef.current = {
35229
+ focus: () => editor2.send({
35230
+ type: "focus"
35231
+ })
35232
+ }, () => {
35233
+ focusRef.current = void 0;
35234
+ }), t1 = [editor2, focusRef], $[0] = editor2, $[1] = focusRef, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1), null;
35235
+ }
35219
35236
  const plainTextPasteBehaviour = defineBehavior({
35220
35237
  on: "clipboard.paste",
35221
35238
  actions: [(event) => [raise({