@esposter/shared 2.20.0 → 2.22.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/LICENSE +201 -201
- package/dist/index.d.ts +74 -43
- package/dist/index.js +57 -14
- package/dist/magic-string.es-CDi1Mjxn.js +1011 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
9
|
var __exportAll = (all, no_symbols) => {
|
|
10
10
|
let target = {};
|
|
11
11
|
for (var name in all) __defProp(target, name, {
|
|
@@ -75,6 +75,14 @@ const AllSpecialValues = [
|
|
|
75
75
|
}
|
|
76
76
|
];
|
|
77
77
|
//#endregion
|
|
78
|
+
//#region src/models/error/ForbiddenError.ts
|
|
79
|
+
var ForbiddenError = class extends Error {
|
|
80
|
+
constructor(message) {
|
|
81
|
+
super(message);
|
|
82
|
+
this.name = "ForbiddenError";
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
78
86
|
//#region src/models/error/InvalidOperationError.ts
|
|
79
87
|
var InvalidOperationError = class extends Error {
|
|
80
88
|
constructor(operation, name, message) {
|
|
@@ -126,6 +134,7 @@ const RoutePath = {
|
|
|
126
134
|
Index: "/",
|
|
127
135
|
Login: "/login",
|
|
128
136
|
Messages: (id) => `/messages/${id}`,
|
|
137
|
+
MessagesFriends: "/messages/friends",
|
|
129
138
|
MessagesIndex: "/messages",
|
|
130
139
|
MessagesInvite: (code) => `/messages/invite/${code}`,
|
|
131
140
|
MessagesMessage: (id, rowKey) => `/messages/${id}/${rowKey}`,
|
|
@@ -171,9 +180,9 @@ let Operation = /* @__PURE__ */ function(Operation) {
|
|
|
171
180
|
return Operation;
|
|
172
181
|
}({});
|
|
173
182
|
//#endregion
|
|
174
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.
|
|
183
|
+
//#region ../../node_modules/.pnpm/@vue+shared@3.5.33/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
175
184
|
/**
|
|
176
|
-
* @vue/shared v3.5.
|
|
185
|
+
* @vue/shared v3.5.33
|
|
177
186
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
178
187
|
* @license MIT
|
|
179
188
|
**/
|
|
@@ -243,9 +252,9 @@ const getGlobalThis = () => {
|
|
|
243
252
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
244
253
|
};
|
|
245
254
|
//#endregion
|
|
246
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.
|
|
255
|
+
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.33/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
247
256
|
/**
|
|
248
|
-
* @vue/reactivity v3.5.
|
|
257
|
+
* @vue/reactivity v3.5.33
|
|
249
258
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
250
259
|
* @license MIT
|
|
251
260
|
**/
|
|
@@ -1345,9 +1354,9 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
1345
1354
|
return value;
|
|
1346
1355
|
}
|
|
1347
1356
|
//#endregion
|
|
1348
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.
|
|
1357
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.33/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
1349
1358
|
/**
|
|
1350
|
-
* @vue/runtime-core v3.5.
|
|
1359
|
+
* @vue/runtime-core v3.5.33
|
|
1351
1360
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1352
1361
|
* @license MIT
|
|
1353
1362
|
**/
|
|
@@ -2304,9 +2313,9 @@ function initCustomFormatter() {
|
|
|
2304
2313
|
else window.devtoolsFormatters = [formatter];
|
|
2305
2314
|
}
|
|
2306
2315
|
//#endregion
|
|
2307
|
-
//#region ../../node_modules/.pnpm/vue@3.5.
|
|
2316
|
+
//#region ../../node_modules/.pnpm/vue@3.5.33_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
|
2308
2317
|
/**
|
|
2309
|
-
* vue v3.5.
|
|
2318
|
+
* vue v3.5.33
|
|
2310
2319
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
2311
2320
|
* @license MIT
|
|
2312
2321
|
**/
|
|
@@ -2356,6 +2365,8 @@ const MENTION_ID_ATTRIBUTE = "data-id";
|
|
|
2356
2365
|
const MENTION_LABEL_ATTRIBUTE = "data-label";
|
|
2357
2366
|
const MENTION_TYPE_ATTRIBUTE = "data-type";
|
|
2358
2367
|
const MENTION_TYPE = "mention";
|
|
2368
|
+
const MENTION_HERE_ID = "@here";
|
|
2369
|
+
const MENTION_EVERYONE_ID = "@everyone";
|
|
2359
2370
|
//#endregion
|
|
2360
2371
|
//#region ../../node_modules/.pnpm/he@1.2.0/node_modules/he/he.js
|
|
2361
2372
|
var require_he = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -6640,6 +6651,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6640
6651
|
this.endIndex = null;
|
|
6641
6652
|
}
|
|
6642
6653
|
Object.defineProperty(Node.prototype, "parentNode", {
|
|
6654
|
+
/**
|
|
6655
|
+
* Same as {@link parent}.
|
|
6656
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6657
|
+
*/
|
|
6643
6658
|
get: function() {
|
|
6644
6659
|
return this.parent;
|
|
6645
6660
|
},
|
|
@@ -6650,6 +6665,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6650
6665
|
configurable: true
|
|
6651
6666
|
});
|
|
6652
6667
|
Object.defineProperty(Node.prototype, "previousSibling", {
|
|
6668
|
+
/**
|
|
6669
|
+
* Same as {@link prev}.
|
|
6670
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6671
|
+
*/
|
|
6653
6672
|
get: function() {
|
|
6654
6673
|
return this.prev;
|
|
6655
6674
|
},
|
|
@@ -6660,6 +6679,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6660
6679
|
configurable: true
|
|
6661
6680
|
});
|
|
6662
6681
|
Object.defineProperty(Node.prototype, "nextSibling", {
|
|
6682
|
+
/**
|
|
6683
|
+
* Same as {@link next}.
|
|
6684
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6685
|
+
*/
|
|
6663
6686
|
get: function() {
|
|
6664
6687
|
return this.next;
|
|
6665
6688
|
},
|
|
@@ -6696,6 +6719,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6696
6719
|
return _this;
|
|
6697
6720
|
}
|
|
6698
6721
|
Object.defineProperty(DataNode.prototype, "nodeValue", {
|
|
6722
|
+
/**
|
|
6723
|
+
* Same as {@link data}.
|
|
6724
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6725
|
+
*/
|
|
6699
6726
|
get: function() {
|
|
6700
6727
|
return this.data;
|
|
6701
6728
|
},
|
|
@@ -6783,6 +6810,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6783
6810
|
return _this;
|
|
6784
6811
|
}
|
|
6785
6812
|
Object.defineProperty(NodeWithChildren.prototype, "firstChild", {
|
|
6813
|
+
/** First child of the node. */
|
|
6786
6814
|
get: function() {
|
|
6787
6815
|
var _a;
|
|
6788
6816
|
return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -6791,6 +6819,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6791
6819
|
configurable: true
|
|
6792
6820
|
});
|
|
6793
6821
|
Object.defineProperty(NodeWithChildren.prototype, "lastChild", {
|
|
6822
|
+
/** Last child of the node. */
|
|
6794
6823
|
get: function() {
|
|
6795
6824
|
return this.children.length > 0 ? this.children[this.children.length - 1] : null;
|
|
6796
6825
|
},
|
|
@@ -6798,6 +6827,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6798
6827
|
configurable: true
|
|
6799
6828
|
});
|
|
6800
6829
|
Object.defineProperty(NodeWithChildren.prototype, "childNodes", {
|
|
6830
|
+
/**
|
|
6831
|
+
* Same as {@link children}.
|
|
6832
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6833
|
+
*/
|
|
6801
6834
|
get: function() {
|
|
6802
6835
|
return this.children;
|
|
6803
6836
|
},
|
|
@@ -6874,6 +6907,10 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6874
6907
|
configurable: true
|
|
6875
6908
|
});
|
|
6876
6909
|
Object.defineProperty(Element.prototype, "tagName", {
|
|
6910
|
+
/**
|
|
6911
|
+
* Same as {@link name}.
|
|
6912
|
+
* [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
|
|
6913
|
+
*/
|
|
6877
6914
|
get: function() {
|
|
6878
6915
|
return this.name;
|
|
6879
6916
|
},
|
|
@@ -12395,6 +12432,9 @@ var require_subselects = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12395
12432
|
};
|
|
12396
12433
|
exports.subselects = {
|
|
12397
12434
|
is,
|
|
12435
|
+
/**
|
|
12436
|
+
* `:matches` and `:where` are aliases for `:is`.
|
|
12437
|
+
*/
|
|
12398
12438
|
matches: is,
|
|
12399
12439
|
where: is,
|
|
12400
12440
|
not: function(next, token, options, context, compileToken) {
|
|
@@ -13289,7 +13329,8 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13289
13329
|
* @param {HTMLElement} newNode new node
|
|
13290
13330
|
*/
|
|
13291
13331
|
exchangeChild(oldNode, newNode) {
|
|
13292
|
-
|
|
13332
|
+
const children = this.childNodes;
|
|
13333
|
+
this.childNodes = children.map((child) => {
|
|
13293
13334
|
if (child === oldNode) return newNode;
|
|
13294
13335
|
return child;
|
|
13295
13336
|
});
|
|
@@ -13327,7 +13368,8 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13327
13368
|
return decode(this.rawText);
|
|
13328
13369
|
}
|
|
13329
13370
|
set textContent(val) {
|
|
13330
|
-
|
|
13371
|
+
const content = [new text_1.default(val, this)];
|
|
13372
|
+
this.childNodes = content;
|
|
13331
13373
|
}
|
|
13332
13374
|
/**
|
|
13333
13375
|
* Get unescaped text value of current node and its children.
|
|
@@ -13479,10 +13521,11 @@ var require_html = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13479
13521
|
this.childNodes[o++] = node;
|
|
13480
13522
|
});
|
|
13481
13523
|
this.childNodes.length = o;
|
|
13482
|
-
|
|
13524
|
+
const attrs = Object.keys(this.rawAttributes).map((key) => {
|
|
13483
13525
|
const val = this.rawAttributes[key];
|
|
13484
13526
|
return `${key}=${JSON.stringify(val)}`;
|
|
13485
13527
|
}).join(" ");
|
|
13528
|
+
this.rawAttrs = attrs;
|
|
13486
13529
|
delete this._rawAttrs;
|
|
13487
13530
|
return this;
|
|
13488
13531
|
}
|
|
@@ -14410,7 +14453,7 @@ const now = () => {
|
|
|
14410
14453
|
//#endregion
|
|
14411
14454
|
//#region src/util/validation/exhaustiveGuard.ts
|
|
14412
14455
|
const exhaustiveGuard = (value) => {
|
|
14413
|
-
throw new InvalidOperationError(
|
|
14456
|
+
throw new InvalidOperationError("Read", exhaustiveGuard.name, JSON.stringify(value));
|
|
14414
14457
|
};
|
|
14415
14458
|
//#endregion
|
|
14416
14459
|
//#region src/util/id/uuid/constants.ts
|
|
@@ -14420,4 +14463,4 @@ const UUIDV4_REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-
|
|
|
14420
14463
|
//#region src/util/id/uuid/uuidValidateV4.ts
|
|
14421
14464
|
const uuidValidateV4 = (uuid) => UUIDV4_REGEX.test(uuid);
|
|
14422
14465
|
//#endregion
|
|
14423
|
-
export { AllSpecialValues, ID_SEPARATOR, InvalidOperationError, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, NIL, NotFoundError, NotInitializedError, Operation, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, UUIDV4_REGEX, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, takeOne, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
|
|
14466
|
+
export { AllSpecialValues, ForbiddenError, ID_SEPARATOR, InvalidOperationError, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, NIL, NotFoundError, NotInitializedError, Operation, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, UUIDV4_REGEX, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, takeOne, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
|