@elementor/editor-props 4.5.0-1150 → 4.5.0-1154
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/utils/props-to-llm-schema.ts +9 -0
|
@@ -264,7 +264,16 @@ function convertArrayPropType(
|
|
|
264
264
|
|
|
265
265
|
export const nonConfigurablePropKeys = [ '_cssid', 'classes', 'attributes' ] as readonly string[];
|
|
266
266
|
|
|
267
|
+
// Sensitive props (e.g. API keys) are hidden from agents: not published, not writable and not readable.
|
|
268
|
+
export function isPropSensitive( propType?: PropType ): boolean {
|
|
269
|
+
return ! Array.isArray( propType?.meta ) && true === propType?.meta?.sensitive;
|
|
270
|
+
}
|
|
271
|
+
|
|
267
272
|
export function isPropKeyConfigurable( propKey: string, propType?: PropType ): boolean {
|
|
273
|
+
if ( isPropSensitive( propType ) ) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
|
|
268
277
|
if ( ! nonConfigurablePropKeys.includes( propKey ) ) {
|
|
269
278
|
return true;
|
|
270
279
|
}
|