@elementor/editor-props 4.5.0-1153 → 4.5.0-1155

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.mts CHANGED
@@ -108,6 +108,7 @@ declare function jsonSchemaToPropType(schema: JsonSchema7, key?: string): PropTy
108
108
  type DynamicTagNamesResolver = (categories: string[]) => string[];
109
109
  declare function setDynamicTagNamesResolver(resolver: DynamicTagNamesResolver | null): void;
110
110
  declare function propTypeToJsonSchema(propType: PropType, suppressDynamic?: boolean): JsonSchema7;
111
+ declare function isPropSensitive(propType?: PropType): boolean;
111
112
  declare function isPropKeyConfigurable(propKey: string, propType?: PropType): boolean;
112
113
  declare function configurableKeys(schema: PropsSchema): string[];
113
114
  declare function enrichWithIntention(jsonSchema: JsonSchema7, text?: string): JsonSchema7;
@@ -7908,6 +7909,7 @@ declare const Schema: {
7908
7909
  transformers?: Record<string, (value: unknown) => PropValue>;
7909
7910
  }) => PropValue;
7910
7911
  isPropKeyConfigurable: typeof isPropKeyConfigurable;
7912
+ isPropSensitive: typeof isPropSensitive;
7911
7913
  nonConfigurablePropKeys: readonly string[];
7912
7914
  configurableKeys: typeof configurableKeys;
7913
7915
  validatePropValue: (schema: PropType, value: unknown) => {
package/dist/index.d.ts CHANGED
@@ -108,6 +108,7 @@ declare function jsonSchemaToPropType(schema: JsonSchema7, key?: string): PropTy
108
108
  type DynamicTagNamesResolver = (categories: string[]) => string[];
109
109
  declare function setDynamicTagNamesResolver(resolver: DynamicTagNamesResolver | null): void;
110
110
  declare function propTypeToJsonSchema(propType: PropType, suppressDynamic?: boolean): JsonSchema7;
111
+ declare function isPropSensitive(propType?: PropType): boolean;
111
112
  declare function isPropKeyConfigurable(propKey: string, propType?: PropType): boolean;
112
113
  declare function configurableKeys(schema: PropsSchema): string[];
113
114
  declare function enrichWithIntention(jsonSchema: JsonSchema7, text?: string): JsonSchema7;
@@ -7908,6 +7909,7 @@ declare const Schema: {
7908
7909
  transformers?: Record<string, (value: unknown) => PropValue>;
7909
7910
  }) => PropValue;
7910
7911
  isPropKeyConfigurable: typeof isPropKeyConfigurable;
7912
+ isPropSensitive: typeof isPropSensitive;
7911
7913
  nonConfigurablePropKeys: readonly string[];
7912
7914
  configurableKeys: typeof configurableKeys;
7913
7915
  validatePropValue: (schema: PropType, value: unknown) => {
package/dist/index.js CHANGED
@@ -1268,7 +1268,13 @@ function convertArrayPropType(propType, baseSchema, suppressDynamic) {
1268
1268
  return schema;
1269
1269
  }
1270
1270
  var nonConfigurablePropKeys = ["_cssid", "classes", "attributes"];
1271
+ function isPropSensitive(propType) {
1272
+ return !Array.isArray(propType?.meta) && true === propType?.meta?.sensitive;
1273
+ }
1271
1274
  function isPropKeyConfigurable(propKey, propType) {
1275
+ if (isPropSensitive(propType)) {
1276
+ return false;
1277
+ }
1272
1278
  if (!nonConfigurablePropKeys.includes(propKey)) {
1273
1279
  return true;
1274
1280
  }
@@ -1611,6 +1617,7 @@ var Schema = {
1611
1617
  propTypeToJsonSchema,
1612
1618
  adjustLlmPropValueSchema,
1613
1619
  isPropKeyConfigurable,
1620
+ isPropSensitive,
1614
1621
  nonConfigurablePropKeys,
1615
1622
  configurableKeys,
1616
1623
  validatePropValue,