@safetype/react 1.5.1 → 1.6.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.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -67,7 +67,7 @@ declare const SafeTypeInput: react.ForwardRefExoticComponent<Omit<UseSafeTypeOpt
|
|
|
67
67
|
onModeration?: (result: ModerationResult) => void;
|
|
68
68
|
/** Errors from moderation callbacks or classifiers (`onError` is the element's own event). */
|
|
69
69
|
onModerationError?: (error: unknown) => void;
|
|
70
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "mode" | "language" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLInputElement>>;
|
|
70
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "mode" | "language" | "languages" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLInputElement>>;
|
|
71
71
|
/** A `<textarea>` with live moderation. Works controlled (`value` + `onChange`) or uncontrolled. */
|
|
72
72
|
declare const SafeTypeTextarea: react.ForwardRefExoticComponent<Omit<UseSafeTypeOptions, "onError" | "showMessages"> & {
|
|
73
73
|
/** Render the built-in accessible message under the field. Default true. */
|
|
@@ -78,7 +78,7 @@ declare const SafeTypeTextarea: react.ForwardRefExoticComponent<Omit<UseSafeType
|
|
|
78
78
|
onModeration?: (result: ModerationResult) => void;
|
|
79
79
|
/** Errors from moderation callbacks or classifiers (`onError` is the element's own event). */
|
|
80
80
|
onModerationError?: (error: unknown) => void;
|
|
81
|
-
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "mode" | "language" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
81
|
+
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "mode" | "language" | "languages" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Moderates a string during render, e.g. for previews, chat bubbles, or validating state before sending.
|
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare const SafeTypeInput: react.ForwardRefExoticComponent<Omit<UseSafeTypeOpt
|
|
|
67
67
|
onModeration?: (result: ModerationResult) => void;
|
|
68
68
|
/** Errors from moderation callbacks or classifiers (`onError` is the element's own event). */
|
|
69
69
|
onModerationError?: (error: unknown) => void;
|
|
70
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "mode" | "language" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLInputElement>>;
|
|
70
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "mode" | "language" | "languages" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLInputElement>>;
|
|
71
71
|
/** A `<textarea>` with live moderation. Works controlled (`value` + `onChange`) or uncontrolled. */
|
|
72
72
|
declare const SafeTypeTextarea: react.ForwardRefExoticComponent<Omit<UseSafeTypeOptions, "onError" | "showMessages"> & {
|
|
73
73
|
/** Render the built-in accessible message under the field. Default true. */
|
|
@@ -78,7 +78,7 @@ declare const SafeTypeTextarea: react.ForwardRefExoticComponent<Omit<UseSafeType
|
|
|
78
78
|
onModeration?: (result: ModerationResult) => void;
|
|
79
79
|
/** Errors from moderation callbacks or classifiers (`onError` is the element's own event). */
|
|
80
80
|
onModerationError?: (error: unknown) => void;
|
|
81
|
-
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "mode" | "language" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
81
|
+
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "mode" | "language" | "languages" | "categories" | "policy" | "packs" | "customWords" | "allowList" | "rules" | "maskChar" | "maskStyle" | "detectSpacedLetters" | "classifiers" | "classifierTimeoutMs" | "onModerated" | "onViolation" | "onBlocked" | "onWarning" | "engine" | "messages" | "blockSubmit" | "asyncModeration" | "asyncDebounceMs" | "showMessage" | "unstyled" | "onModeration" | "onModerationError"> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Moderates a string during render, e.g. for previews, chat bubbles, or validating state before sending.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@safetype/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "React components and hooks for SafeType.js content moderation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"input"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@safetype/core": "1.
|
|
38
|
-
"@safetype/dom": "1.
|
|
37
|
+
"@safetype/core": "1.6.0",
|
|
38
|
+
"@safetype/dom": "1.6.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=17.0.0",
|
|
42
|
-
"@safetype/editor": "^1.
|
|
42
|
+
"@safetype/editor": "^1.6.0"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jsdom": "25.0.1",
|
|
68
68
|
"react": "18.3.1",
|
|
69
69
|
"react-dom": "18.3.1",
|
|
70
|
-
"@safetype/editor": "1.
|
|
70
|
+
"@safetype/editor": "1.6.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {
|
|
73
73
|
"@safetype/editor": {
|