@blueking/ai-ui-sdk 0.5.0-beta.3 → 0.5.0-beta.4

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.
Files changed (108) hide show
  1. package/dist/components/render-agent/agent-type.vue.css +3 -3
  2. package/dist/components/render-agent/agent-type.vue.js +1 -1
  3. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  4. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  5. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  6. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  7. package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
  8. package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
  9. package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +6 -1
  10. package/dist/components/render-card/base.script.vue.js +5 -11
  11. package/dist/components/render-card/base.vue.css +12 -12
  12. package/dist/components/render-card/base.vue.js +1 -1
  13. package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
  14. package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
  15. package/dist/components/render-card/llm/icons.vue.css +2 -2
  16. package/dist/components/render-card/llm/icons.vue.js +1 -1
  17. package/dist/components/render-card/llm/info.vue.css +1 -1
  18. package/dist/components/render-card/llm/info.vue.js +1 -1
  19. package/dist/components/render-card/llm/tag-prefix.vue.css +3 -3
  20. package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
  21. package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
  22. package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
  23. package/dist/components/render-card/prompt/icons.vue.css +1 -1
  24. package/dist/components/render-card/prompt/icons.vue.js +1 -1
  25. package/dist/components/render-card/skill/tag-prefix.vue.css +3 -3
  26. package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
  27. package/dist/components/render-checkbox/index.vue.css +9 -9
  28. package/dist/components/render-checkbox/index.vue.js +1 -1
  29. package/dist/components/render-choose-tag/index.vue.css +7 -7
  30. package/dist/components/render-choose-tag/index.vue.js +1 -1
  31. package/dist/components/render-collapse/index.script.vue.js.js +1 -3
  32. package/dist/components/render-collapse/index.vue.css +2 -2
  33. package/dist/components/render-collapse/index.vue.js +1 -1
  34. package/dist/components/render-collection/content/index.vue.css +4 -4
  35. package/dist/components/render-collection/content/index.vue.js +1 -1
  36. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  37. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  38. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
  39. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  40. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  41. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
  42. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  43. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  44. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  45. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  46. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  47. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  48. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  49. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  50. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  51. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
  52. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  53. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  54. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  55. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  56. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  57. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
  58. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  59. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  60. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  61. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  62. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  63. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  64. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  65. package/dist/components/render-dataset-list/index.vue.css +2 -2
  66. package/dist/components/render-dataset-list/index.vue.js +1 -1
  67. package/dist/components/render-dialog/choose-resource.vue.css +3 -3
  68. package/dist/components/render-dialog/choose-resource.vue.js +1 -1
  69. package/dist/components/render-dialog/choose-result.vue.css +14 -14
  70. package/dist/components/render-dialog/choose-result.vue.js +1 -1
  71. package/dist/components/render-dialog/choose-space.vue.css +9 -9
  72. package/dist/components/render-dialog/choose-space.vue.js +1 -1
  73. package/dist/components/render-dialog/index.vue.css +6 -6
  74. package/dist/components/render-dialog/index.vue.js +1 -1
  75. package/dist/components/render-file-card/index.vue.css +11 -11
  76. package/dist/components/render-file-card/index.vue.js +1 -1
  77. package/dist/components/render-file-type-icon/index.vue.css +6 -6
  78. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  79. package/dist/components/render-generate-tag/index.vue.css +5 -5
  80. package/dist/components/render-generate-tag/index.vue.js +1 -1
  81. package/dist/components/render-knowledge/icon/index.vue.css +1 -1
  82. package/dist/components/render-knowledge/icon/index.vue.js +1 -1
  83. package/dist/components/render-prompt/content/index.vue.css +1 -1
  84. package/dist/components/render-prompt/content/index.vue.js +1 -1
  85. package/dist/components/render-reference/index.vue.css +2 -2
  86. package/dist/components/render-reference/index.vue.js +1 -1
  87. package/dist/components/render-resource-version/index.vue.css +2 -2
  88. package/dist/components/render-resource-version/index.vue.js +1 -1
  89. package/dist/components/render-router-tab/index.vue.css +3 -3
  90. package/dist/components/render-router-tab/index.vue.js +1 -1
  91. package/dist/components/render-select-plus-extension/index.vue.css +3 -3
  92. package/dist/components/render-select-plus-extension/index.vue.js +1 -1
  93. package/dist/components/render-t-table/index.vue.css +27 -27
  94. package/dist/components/render-t-table/index.vue.js +1 -1
  95. package/dist/components/render-tag-tree/index.vue.css +7 -7
  96. package/dist/components/render-tag-tree/index.vue.js +1 -1
  97. package/dist/components/render-tags/index.vue.css +6 -6
  98. package/dist/components/render-tags/index.vue.js +1 -1
  99. package/dist/node_modules/core-js/internals/{get-iterator.js → get-iterator-internal.js} +3 -3
  100. package/dist/node_modules/core-js/internals/{get-iterator-method.js → get-iterator-method-internal.js} +4 -4
  101. package/dist/node_modules/core-js/internals/iterate.js +2 -2
  102. package/dist/node_modules/core-js/internals/iterators.js +1 -1
  103. package/dist/node_modules/core-js/internals/shared-store.js +2 -2
  104. package/dist/node_modules/core-js/internals/shared.js +3 -1
  105. package/dist/node_modules/core-js/internals/this-number-value.js +6 -0
  106. package/dist/node_modules/core-js/modules/es.json.stringify.js +150 -34
  107. package/dist/node_modules/core-js/modules/es.string.search.js +3 -1
  108. package/package.json +1 -1
@@ -1,38 +1,54 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export.js');
3
3
  var getBuiltIn = require('../internals/get-built-in.js');
4
- var apply = require('../internals/function-apply.js');
5
4
  var call = require('../internals/function-call.js');
6
5
  var uncurryThis = require('../internals/function-uncurry-this.js');
7
6
  var fails = require('../internals/fails.js');
8
7
  var isArray = require('../internals/is-array.js');
9
8
  var isCallable = require('../internals/is-callable.js');
9
+ var isObject = require('../internals/is-object.js');
10
+ var create = require('../internals/object-create.js');
10
11
  var isRawJSON = require('../internals/is-raw-json.js');
11
12
  var isSymbol = require('../internals/is-symbol.js');
12
13
  var classof = require('../internals/classof-raw.js');
14
+ var thisNumberValue = require('../internals/this-number-value.js');
15
+ var includes = require('../internals/array-includes.js').includes;
16
+ var hasOwn = require('../internals/has-own-property.js');
13
17
  var toString = require('../internals/to-string.js');
14
- var arraySlice = require('../internals/array-slice.js');
15
18
  var parseJSONString = require('../internals/parse-json-string.js');
16
19
  var uid = require('../internals/uid.js');
17
20
  var NATIVE_SYMBOL = require('../internals/symbol-constructor-detection.js');
18
21
  var NATIVE_RAW_JSON = require('../internals/native-raw-json.js');
19
22
 
20
23
  var $String = String;
24
+ var $TypeError = TypeError;
21
25
  var $stringify = getBuiltIn('JSON', 'stringify');
26
+ var $BigInt = getBuiltIn('BigInt');
27
+ var stringValueOf = uncurryThis(''.valueOf);
28
+ var booleanValueOf = uncurryThis(true.valueOf);
29
+ var bigIntValueOf = $BigInt && uncurryThis($BigInt.prototype.valueOf);
22
30
  var exec = uncurryThis(/./.exec);
23
31
  var charAt = uncurryThis(''.charAt);
24
32
  var charCodeAt = uncurryThis(''.charCodeAt);
25
33
  var replace = uncurryThis(''.replace);
26
34
  var slice = uncurryThis(''.slice);
27
35
  var push = uncurryThis([].push);
36
+ var pop = uncurryThis([].pop);
28
37
  var numberToString = uncurryThis(1.1.toString);
29
38
 
30
39
  var surrogates = /[\uD800-\uDFFF]/g;
31
40
  var leadingSurrogates = /^[\uD800-\uDBFF]$/;
32
41
  var trailingSurrogates = /^[\uDC00-\uDFFF]$/;
42
+ var digits = /^\d+$/;
33
43
 
34
- var MARK = uid();
35
- var MARK_LENGTH = MARK.length;
44
+ // a placeholder of a raw JSON value
45
+ var RAW_MARK = uid();
46
+ // a prefix of keys of a reordered object, see `createOrderedObject`
47
+ var KEY_MARK = uid();
48
+ // the last key of a reordered object, marks the end of its serialization
49
+ var END_MARK = uid();
50
+ var RAW_MARK_LENGTH = RAW_MARK.length;
51
+ var KEY_MARK_LENGTH = KEY_MARK.length;
36
52
 
37
53
  var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
38
54
  var symbol = getBuiltIn('Symbol')('stringify detection');
@@ -50,16 +66,13 @@ var ILL_FORMED_UNICODE = fails(function () {
50
66
  || $stringify('\uDEAD') !== '"\\udead"';
51
67
  });
52
68
 
53
- var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer) {
54
- var args = arraySlice(arguments);
55
- var $replacer = getReplacerFunction(replacer);
56
- if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
57
- args[1] = function (key, value) {
58
- // some old implementations (like WebKit) could pass numbers as keys
59
- if (isCallable($replacer)) value = call($replacer, this, $String(key), value);
60
- if (!isSymbol(value)) return value;
61
- };
62
- return apply($stringify, null, args);
69
+ var isRawJSONValue = NATIVE_RAW_JSON ? getBuiltIn('JSON', 'isRawJSON') : isRawJSON;
70
+
71
+ var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer, space) {
72
+ return $stringify(it, function (key, value) {
73
+ var replaced = call(replacer, this, key, value);
74
+ if (!isSymbol(replaced)) return replaced;
75
+ }, space);
63
76
  } : $stringify;
64
77
 
65
78
  var fixIllFormedJSON = function (match, offset, string) {
@@ -73,47 +86,150 @@ var fixIllFormedJSON = function (match, offset, string) {
73
86
  } return match;
74
87
  };
75
88
 
76
- var getReplacerFunction = function (replacer) {
77
- if (isCallable(replacer)) return replacer;
89
+ // `PropertyList` of `JSON.stringify`
90
+ // https://tc39.es/ecma262/#sec-json.stringify
91
+ var getPropertyList = function (replacer) {
78
92
  if (!isArray(replacer)) return;
79
93
  var rawLength = replacer.length;
80
- var keys = [];
94
+ var propertyList = [];
95
+ // a null prototype object is used as a set of already added keys to keep the deduplication linear
96
+ var addedKeys = create(null);
81
97
  for (var i = 0; i < rawLength; i++) {
82
98
  var element = replacer[i];
83
- if (typeof element == 'string') push(keys, element);
84
- else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
99
+ var key;
100
+ if (typeof element == 'string') key = element;
101
+ else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') key = toString(element);
102
+ else continue;
103
+ if (!hasOwn(addedKeys, key)) {
104
+ addedKeys[key] = true;
105
+ push(propertyList, key);
106
+ }
85
107
  }
86
- var keysLength = keys.length;
87
- var root = true;
88
- return function (key, value) {
89
- if (root) {
90
- root = false;
91
- return value;
108
+ return propertyList;
109
+ };
110
+
111
+ // values with such an internal slot are unwrapped by `SerializeJSONProperty` instead of being serialized as objects
112
+ var hasInternalSlot = function (valueOf, it) {
113
+ try {
114
+ valueOf(it);
115
+ return true;
116
+ } catch (error) {
117
+ return false;
118
+ }
119
+ };
120
+
121
+ // the slot check is expensive, so it's performed only for the kind reported by the value itself -
122
+ // a value lying about its kind via `Symbol.toStringTag` is serialized as an ordinary object
123
+ var isBoxedPrimitive = function (it) {
124
+ var kind = classof(it);
125
+ return (kind === 'Number' && hasInternalSlot(thisNumberValue, it))
126
+ || (kind === 'String' && hasInternalSlot(stringValueOf, it))
127
+ || (kind === 'Boolean' && hasInternalSlot(booleanValueOf, it))
128
+ || (!!bigIntValueOf && kind === 'BigInt' && hasInternalSlot(bigIntValueOf, it));
129
+ };
130
+
131
+ // only objects serialized by `SerializeJSONObject` are affected by the property list
132
+ var isSerializedAsObject = function (it) {
133
+ if (!isObject(it) || isCallable(it) || isArray(it)) return false;
134
+ try {
135
+ return !isBoxedPrimitive(it);
136
+ // `classof` reads `Symbol.toStringTag`, so a proxy could throw - it has no internal slots anyway
137
+ } catch (error) {
138
+ return true;
139
+ }
140
+ };
141
+
142
+ // the engine unwraps it in the same order as it would read the original property,
143
+ // so the property is read lazily and `toJSON` is called once and with the original key
144
+ var createElementHolder = function (holder, key) {
145
+ return {
146
+ toJSON: function () {
147
+ var element = holder[key];
148
+ if (isObject(element) || typeof element == 'bigint') {
149
+ var elementToJSON = element.toJSON;
150
+ if (isCallable(elementToJSON)) element = call(elementToJSON, element, key);
151
+ } return element;
92
152
  }
93
- if (isArray(this)) return value;
94
- for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
95
153
  };
96
154
  };
97
155
 
156
+ // own keys of objects are sorted - integer-like keys are moved to the beginning,
157
+ // so such keys should be marked and restored in the serialized string
158
+ var getKeyPrefix = function (propertyList) {
159
+ for (var i = 0, length = propertyList.length; i < length; i++) {
160
+ if (exec(digits, propertyList[i])) return KEY_MARK;
161
+ } return '';
162
+ };
163
+
164
+ // `SerializeJSONObject` iterates the property list, so the value is replaced with an object with keys in this order
165
+ var createOrderedObject = function (value, propertyList, keyPrefix) {
166
+ // keys are not marked if the property list has no integer-like keys, so `Object.prototype`
167
+ // with a setter, a non-writable property or `__proto__` should not intercept the assignment
168
+ var ordered = create(null);
169
+ for (var i = 0, length = propertyList.length; i < length; i++) {
170
+ var key = propertyList[i];
171
+ ordered[keyPrefix + key] = createElementHolder(value, key);
172
+ }
173
+ ordered[END_MARK] = null;
174
+ return ordered;
175
+ };
176
+
98
177
  // `JSON.stringify` method
99
178
  // https://tc39.es/ecma262/#sec-json.stringify
100
179
  // https://github.com/tc39/proposal-json-parse-with-source
101
180
  if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, {
102
181
  stringify: function stringify(text, replacer, space) {
103
- var replacerFunction = getReplacerFunction(replacer);
182
+ var replacerFunction = isCallable(replacer) ? replacer : undefined;
183
+ var propertyList = replacerFunction ? undefined : getPropertyList(replacer);
184
+ var keyPrefix = propertyList && getKeyPrefix(propertyList);
104
185
  var rawStrings = [];
186
+ var openObjects = [];
187
+ var parentOrdered = [];
188
+ var currentOrdered;
189
+ var marked = false;
190
+ var root = true;
105
191
 
106
192
  var json = stringifyWithProperSymbolsConversion(text, function (key, value) {
107
193
  // some old implementations (like WebKit) could pass numbers as keys
108
- var v = isCallable(replacerFunction) ? call(replacerFunction, this, $String(key), value) : value;
109
- return !NATIVE_RAW_JSON && isRawJSON(v) ? MARK + (push(rawStrings, v.rawJSON) - 1) : v;
194
+ key = $String(key);
195
+
196
+ if (propertyList) {
197
+ if (key === END_MARK) {
198
+ pop(openObjects);
199
+ currentOrdered = pop(parentOrdered);
200
+ return;
201
+ }
202
+ if (root) root = false;
203
+ // the innermost reordered object already contains only keys of the property list and arrays are not
204
+ // affected by it, the rest of objects (like objects with a fake `Symbol.toStringTag`) are filtered here
205
+ else if (this !== currentOrdered && !isArray(this) && !includes(propertyList, key)) return;
206
+ } else if (replacerFunction) value = call(replacerFunction, this, key, value);
207
+
208
+ if (isRawJSONValue(value)) {
209
+ if (NATIVE_RAW_JSON) return value;
210
+ marked = true;
211
+ return RAW_MARK + (push(rawStrings, value.rawJSON) - 1);
212
+ }
213
+
214
+ if (propertyList && isSerializedAsObject(value)) {
215
+ // reordered objects are new each time, so cycles should be detected before the engine does it
216
+ if (includes(openObjects, value)) throw new $TypeError('Converting circular structure to JSON');
217
+ var ordered = createOrderedObject(value, propertyList, keyPrefix);
218
+ push(openObjects, value);
219
+ push(parentOrdered, currentOrdered);
220
+ currentOrdered = ordered;
221
+ if (keyPrefix) marked = true;
222
+ return ordered;
223
+ }
224
+
225
+ return value;
110
226
  }, space);
111
227
 
112
228
  if (typeof json != 'string') return json;
113
229
 
114
230
  if (ILL_FORMED_UNICODE) json = replace(json, surrogates, fixIllFormedJSON);
115
231
 
116
- if (NATIVE_RAW_JSON) return json;
232
+ if (!marked) return json;
117
233
 
118
234
  var result = '';
119
235
  var length = json.length;
@@ -123,9 +239,9 @@ if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_
123
239
  if (chr === '"') {
124
240
  var end = parseJSONString(json, ++i).end - 1;
125
241
  var string = slice(json, i, end);
126
- result += slice(string, 0, MARK_LENGTH) === MARK
127
- ? rawStrings[slice(string, MARK_LENGTH)]
128
- : '"' + string + '"';
242
+ if (slice(string, 0, RAW_MARK_LENGTH) === RAW_MARK) result += rawStrings[slice(string, RAW_MARK_LENGTH)];
243
+ else if (slice(string, 0, KEY_MARK_LENGTH) === KEY_MARK) result += '"' + slice(string, KEY_MARK_LENGTH) + '"';
244
+ else result += '"' + string + '"';
129
245
  i = end;
130
246
  } else result += chr;
131
247
  }
@@ -17,7 +17,9 @@ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCal
17
17
  function search(regexp) {
18
18
  var O = requireObjectCoercible(this);
19
19
  var searcher = isObject(regexp) ? getMethod(regexp, SEARCH) : undefined;
20
- return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
20
+ if (searcher) return call(searcher, regexp, O);
21
+ var S = toString(O);
22
+ return new RegExp(regexp)[SEARCH](S);
21
23
  },
22
24
  // `RegExp.prototype[@@search]` method
23
25
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.5.0-beta.3",
3
+ "version": "0.5.0-beta.4",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",