@vixoniccom/modules 2.25.0 → 2.26.0-dev.1

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
@@ -1,6 +1,6 @@
1
1
  export { Configuration } from './lib';
2
2
  export { Errors, ErrorsMap } from './lib/errors';
3
- export { Autocomplete, BitlyInput, ColorPicker, DateInput, NumberInput, SelectAssetKna, SelectInput, Switch, Slider, TextArea, TextFormat, TextInput, ServiceInput, isInput, InputValue, RedirectButton, InputComponent, isInputInstance } from './lib/inputs';
3
+ export { Autocomplete, BitlyInput, ColorPicker, DateInput, NumberInput, SelectAssetKna, SelectInput, Switch, Slider, TextArea, AITextArea, TextFormat, TextInput, ServiceInput, isInput, InputValue, RedirectButton, InputComponent, isInputInstance } from './lib/inputs';
4
4
  export { Label } from './lib/ui';
5
5
  export { Group, List, DynamicMatrix } from './lib/containers';
6
6
  export { RangeValue, DateRangeValue, NumberRangeValue } from './lib/values';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NumberRangeValue = exports.DateRangeValue = exports.RangeValue = exports.DynamicMatrix = exports.List = exports.Group = exports.Label = exports.isInputInstance = exports.RedirectButton = exports.isInput = exports.ServiceInput = exports.TextInput = exports.TextFormat = exports.TextArea = exports.Slider = exports.Switch = exports.SelectInput = exports.SelectAssetKna = exports.NumberInput = exports.DateInput = exports.ColorPicker = exports.BitlyInput = exports.Autocomplete = exports.Errors = exports.Configuration = void 0;
3
+ exports.NumberRangeValue = exports.DateRangeValue = exports.RangeValue = exports.DynamicMatrix = exports.List = exports.Group = exports.Label = exports.isInputInstance = exports.RedirectButton = exports.isInput = exports.ServiceInput = exports.TextInput = exports.TextFormat = exports.AITextArea = exports.TextArea = exports.Slider = exports.Switch = exports.SelectInput = exports.SelectAssetKna = exports.NumberInput = exports.DateInput = exports.ColorPicker = exports.BitlyInput = exports.Autocomplete = exports.Errors = exports.Configuration = void 0;
4
4
  var lib_1 = require("./lib");
5
5
  Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return lib_1.Configuration; } });
6
6
  var errors_1 = require("./lib/errors");
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "SelectInput", { enumerable: true, get: function
16
16
  Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return inputs_1.Switch; } });
17
17
  Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return inputs_1.Slider; } });
18
18
  Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return inputs_1.TextArea; } });
19
+ Object.defineProperty(exports, "AITextArea", { enumerable: true, get: function () { return inputs_1.AITextArea; } });
19
20
  Object.defineProperty(exports, "TextFormat", { enumerable: true, get: function () { return inputs_1.TextFormat; } });
20
21
  Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return inputs_1.TextInput; } });
21
22
  Object.defineProperty(exports, "ServiceInput", { enumerable: true, get: function () { return inputs_1.ServiceInput; } });
@@ -0,0 +1,14 @@
1
+ import { TextArea, TextAreaJSON } from './text-area';
2
+ /**
3
+ * Rich-text area with an AI "improve text" affordance on the client.
4
+ *
5
+ * Behaves exactly like {@link TextArea} for schema/validation purposes (same
6
+ * range/html/visible-text counting); the only difference is the `type`, which
7
+ * lets the client render a dedicated input (no paste truncation + AI button)
8
+ * only where a field opts in via `"type": "ai-text-area"`.
9
+ */
10
+ export declare class AITextArea extends TextArea {
11
+ static type: string;
12
+ type: string;
13
+ static fromJSON(value: TextAreaJSON): AITextArea;
14
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AITextArea = void 0;
30
+ var text_input_1 = require("./text-input");
31
+ var text_area_1 = require("./text-area");
32
+ /**
33
+ * Rich-text area with an AI "improve text" affordance on the client.
34
+ *
35
+ * Behaves exactly like {@link TextArea} for schema/validation purposes (same
36
+ * range/html/visible-text counting); the only difference is the `type`, which
37
+ * lets the client render a dedicated input (no paste truncation + AI button)
38
+ * only where a field opts in via `"type": "ai-text-area"`.
39
+ */
40
+ var AITextArea = /** @class */ (function (_super) {
41
+ __extends(AITextArea, _super);
42
+ function AITextArea() {
43
+ var _this = _super !== null && _super.apply(this, arguments) || this;
44
+ _this.type = AITextArea.type;
45
+ return _this;
46
+ }
47
+ AITextArea.fromJSON = function (value) {
48
+ var parsed = text_input_1.TextInput.parseJSON(value);
49
+ return new AITextArea(__assign(__assign({}, parsed), { rows: value.rows, html: value.html }));
50
+ };
51
+ AITextArea.type = 'ai-text-area';
52
+ return AITextArea;
53
+ }(text_area_1.TextArea));
54
+ exports.AITextArea = AITextArea;
@@ -1,4 +1,5 @@
1
1
  import { TextArea } from './text-area';
2
+ import { AITextArea } from './ai-text-area';
2
3
  import { BitlyInput } from './bitly-input';
3
4
  import { TextFormat } from './text-format';
4
5
  import { TextInput } from './text-input';
@@ -12,7 +13,7 @@ import { DateInput } from './date-input';
12
13
  import { SelectAssetKna } from './select-asset-kna';
13
14
  import { Slider } from './slider';
14
15
  import { ServiceInput } from './service-input';
15
- export { BitlyInput, TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput, RedirectButton };
16
+ export { BitlyInput, TextFormat, TextInput, SelectInput, Switch, TextArea, AITextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput, RedirectButton };
16
17
  export type AnyJson = boolean | number | string | null | JsonArray | JsonMap | undefined;
17
18
  export interface JsonMap {
18
19
  [key: string]: AnyJson | undefined;
@@ -20,7 +21,7 @@ export interface JsonMap {
20
21
  export interface JsonArray extends Array<AnyJson> {
21
22
  }
22
23
  export type InputValue = AnyJson;
23
- export type InputComponent = TextInput | TextFormat | BitlyInput | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput | RedirectButton;
24
+ export type InputComponent = TextInput | TextFormat | BitlyInput | SelectInput<string | number> | TextArea | AITextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput | RedirectButton;
24
25
  export declare const allInputs: (typeof TextInput | typeof BitlyInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof RedirectButton | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
25
26
  export declare const isInput: (arg: any) => arg is InputComponent;
26
27
  export declare const isInputInstance: <T>(arg: any, type: string | string[]) => arg is T;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInputInstance = exports.isInput = exports.allInputs = exports.RedirectButton = exports.ServiceInput = exports.Slider = exports.SelectAssetKna = exports.DateInput = exports.ColorPicker = exports.NumberInput = exports.Autocomplete = exports.TextArea = exports.Switch = exports.SelectInput = exports.TextInput = exports.TextFormat = exports.BitlyInput = void 0;
3
+ exports.isInputInstance = exports.isInput = exports.allInputs = exports.RedirectButton = exports.ServiceInput = exports.Slider = exports.SelectAssetKna = exports.DateInput = exports.ColorPicker = exports.NumberInput = exports.Autocomplete = exports.AITextArea = exports.TextArea = exports.Switch = exports.SelectInput = exports.TextInput = exports.TextFormat = exports.BitlyInput = void 0;
4
4
  var text_area_1 = require("./text-area");
5
5
  Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return text_area_1.TextArea; } });
6
+ var ai_text_area_1 = require("./ai-text-area");
7
+ Object.defineProperty(exports, "AITextArea", { enumerable: true, get: function () { return ai_text_area_1.AITextArea; } });
6
8
  var bitly_input_1 = require("./bitly-input");
7
9
  Object.defineProperty(exports, "BitlyInput", { enumerable: true, get: function () { return bitly_input_1.BitlyInput; } });
8
10
  var text_format_1 = require("./text-format");
@@ -36,6 +38,7 @@ exports.allInputs = [
36
38
  select_input_1.SelectInput,
37
39
  switch_1.Switch,
38
40
  text_area_1.TextArea,
41
+ ai_text_area_1.AITextArea,
39
42
  autocomplete_1.Autocomplete,
40
43
  number_input_1.NumberInput,
41
44
  color_picker_1.ColorPicker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixoniccom/modules",
3
- "version": "2.25.0",
3
+ "version": "2.26.0-dev.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",