@esposter/shared 2.16.0 → 2.17.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 CHANGED
@@ -1,201 +1,201 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2020-present Jimmy Chen
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2020-present Jimmy Chen
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- # @esposter/shared
2
-
3
- [![Apache-2.0 licensed][badge-license]][url-license]
4
- [![NPM version][badge-npm-version]][url-npm]
5
- [![NPM downloads][badge-npm-downloads]][url-npm]
6
- [![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
7
-
8
- ### Table of Contents
9
-
10
- - ⚖️ [License](#license)
11
-
12
- ---
13
-
14
- ## <a name="license">⚖️ License</a>
15
-
16
- This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
17
-
18
- [badge-license]: https://img.shields.io/github/license/Esposter/Esposter.svg?color=blue
19
- [url-license]: https://github.com/Esposter/Esposter/blob/main/LICENSE
20
- [badge-npm-version]: https://img.shields.io/npm/v/@esposter/shared/latest?color=brightgreen
21
- [url-npm]: https://www.npmjs.com/package/@esposter/shared/v/latest
22
- [badge-npm-unpacked-size]: https://img.shields.io/npm/unpacked-size/@esposter/shared/latest?label=npm
23
- [badge-npm-downloads]: https://img.shields.io/npm/dm/@esposter/shared.svg
1
+ # @esposter/shared
2
+
3
+ [![Apache-2.0 licensed][badge-license]][url-license]
4
+ [![NPM version][badge-npm-version]][url-npm]
5
+ [![NPM downloads][badge-npm-downloads]][url-npm]
6
+ [![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
7
+
8
+ ### Table of Contents
9
+
10
+ - ⚖️ [License](#license)
11
+
12
+ ---
13
+
14
+ ## <a name="license">⚖️ License</a>
15
+
16
+ This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
17
+
18
+ [badge-license]: https://img.shields.io/github/license/Esposter/Esposter.svg?color=blue
19
+ [url-license]: https://github.com/Esposter/Esposter/blob/main/LICENSE
20
+ [badge-npm-version]: https://img.shields.io/npm/v/@esposter/shared/latest?color=brightgreen
21
+ [url-npm]: https://www.npmjs.com/package/@esposter/shared/v/latest
22
+ [badge-npm-unpacked-size]: https://img.shields.io/npm/unpacked-size/@esposter/shared/latest?label=npm
23
+ [badge-npm-downloads]: https://img.shields.io/npm/dm/@esposter/shared.svg
package/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ declare const RoutePath: {
57
57
  };
58
58
  type RoutePath = typeof RoutePath;
59
59
  //#endregion
60
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/primitive.d.ts
60
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/primitive.d.ts
61
61
  /**
62
62
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
63
63
 
@@ -65,7 +65,7 @@ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/
65
65
  */
66
66
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
67
67
  //#endregion
68
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/basic.d.ts
68
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/basic.d.ts
69
69
  /**
70
70
  Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
71
71
 
@@ -76,7 +76,7 @@ type Class<T$1, Arguments extends unknown[] = any[]> = {
76
76
  new (...arguments_: Arguments): T$1;
77
77
  };
78
78
  //#endregion
79
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-any.d.ts
79
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-any.d.ts
80
80
  /**
81
81
  Returns a boolean for whether the given type is `any`.
82
82
 
@@ -107,7 +107,7 @@ const anyA = get(anyObject, 'a');
107
107
  */
108
108
  type IsAny<T$1> = 0 extends 1 & NoInfer<T$1> ? true : false;
109
109
  //#endregion
110
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-optional-key-of.d.ts
110
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-optional-key-of.d.ts
111
111
  /**
112
112
  Returns a boolean for whether the given key is an optional key of type.
113
113
 
@@ -150,7 +150,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
150
150
  */
151
151
  type IsOptionalKeyOf<Type extends object, Key$1 extends keyof Type> = IsAny<Type | Key$1> extends true ? never : Key$1 extends keyof Type ? Type extends Record<Key$1, Type[Key$1]> ? false : true : false;
152
152
  //#endregion
153
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/optional-keys-of.d.ts
153
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/optional-keys-of.d.ts
154
154
  /**
155
155
  Extract all optional keys from the given type.
156
156
 
@@ -188,7 +188,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
188
188
  ? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
189
189
  : never;
190
190
  //#endregion
191
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/required-keys-of.d.ts
191
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/required-keys-of.d.ts
192
192
  /**
193
193
  Extract all required keys from the given type.
194
194
 
@@ -216,7 +216,7 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
216
216
  type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
217
217
  ? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
218
218
  //#endregion
219
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-never.d.ts
219
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-never.d.ts
220
220
  /**
221
221
  Returns a boolean for whether the given type is `never`.
222
222
 
@@ -260,7 +260,7 @@ endIfEqual('abc', '123');
260
260
  */
261
261
  type IsNever<T$1> = [T$1] extends [never] ? true : false;
262
262
  //#endregion
263
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/if.d.ts
263
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/if.d.ts
264
264
  /**
265
265
  An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
266
266
 
@@ -315,12 +315,47 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
315
315
  //=> 'not equal'
316
316
  ```
317
317
 
318
+ Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example:
319
+
320
+ @example
321
+ ```
322
+ import type {If, IsEqual, StringRepeat} from 'type-fest';
323
+
324
+ type HundredZeroes = StringRepeat<'0', 100>;
325
+
326
+ // The following implementation is not tail recursive
327
+ type Includes<S extends string, Char extends string> =
328
+ S extends `${infer First}${infer Rest}`
329
+ ? If<IsEqual<First, Char>,
330
+ 'found',
331
+ Includes<Rest, Char>>
332
+ : 'not found';
333
+
334
+ // Hence, instantiations with long strings will fail
335
+ // @ts-expect-error
336
+ type Fails = Includes<HundredZeroes, '1'>;
337
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
338
+ // Error: Type instantiation is excessively deep and possibly infinite.
339
+
340
+ // However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
341
+ type IncludesWithoutIf<S extends string, Char extends string> =
342
+ S extends `${infer First}${infer Rest}`
343
+ ? IsEqual<First, Char> extends true
344
+ ? 'found'
345
+ : IncludesWithoutIf<Rest, Char>
346
+ : 'not found';
347
+
348
+ // Now, instantiations with long strings will work
349
+ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
350
+ //=> 'not found'
351
+ ```
352
+
318
353
  @category Type Guard
319
354
  @category Utilities
320
355
  */
321
356
  type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
322
357
  //#endregion
323
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/internal/type.d.ts
358
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/type.d.ts
324
359
  /**
325
360
  Matches any primitive, `void`, `Date`, or `RegExp` value.
326
361
  */
@@ -338,7 +373,7 @@ type HasMultipleCallSignatures<T$1 extends (...arguments_: any[]) => unknown> =
338
373
  (...arguments_: infer B): unknown;
339
374
  } ? B extends A ? A extends B ? false : true : true : false;
340
375
  //#endregion
341
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/simplify.d.ts
376
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/simplify.d.ts
342
377
  /**
343
378
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
344
379
 
@@ -393,12 +428,12 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
393
428
  ```
394
429
 
395
430
  @link https://github.com/microsoft/TypeScript/issues/15300
396
- @see SimplifyDeep
431
+ @see {@link SimplifyDeep}
397
432
  @category Object
398
433
  */
399
434
  type Simplify<T$1> = { [KeyType in keyof T$1]: T$1[KeyType] } & {};
400
435
  //#endregion
401
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/is-equal.d.ts
436
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/is-equal.d.ts
402
437
  /**
403
438
  Returns a boolean for whether the two given types are equal.
404
439
 
@@ -429,7 +464,7 @@ type IsEqual<A$1, B$1> = [A$1, B$1] extends [infer AA, infer BB] ? [AA] extends
429
464
  // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
430
465
  type _IsEqual<A$1, B$1> = (<G>() => G extends A$1 & G | G ? 1 : 2) extends (<G>() => G extends B$1 & G | G ? 1 : 2) ? true : false;
431
466
  //#endregion
432
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/omit-index-signature.d.ts
467
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/omit-index-signature.d.ts
433
468
  /**
434
469
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
435
470
 
@@ -517,12 +552,12 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
517
552
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
518
553
  ```
519
554
 
520
- @see PickIndexSignature
555
+ @see {@link PickIndexSignature}
521
556
  @category Object
522
557
  */
523
558
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
524
559
  //#endregion
525
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/pick-index-signature.d.ts
560
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/pick-index-signature.d.ts
526
561
  /**
527
562
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
528
563
 
@@ -565,12 +600,12 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
565
600
  // }
566
601
  ```
567
602
 
568
- @see OmitIndexSignature
603
+ @see {@link OmitIndexSignature}
569
604
  @category Object
570
605
  */
571
606
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
572
607
  //#endregion
573
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/merge.d.ts
608
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/merge.d.ts
574
609
  // Merges two objects without worrying about index signatures.
575
610
  type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
576
611
 
@@ -610,7 +645,7 @@ export type FooBar = Merge<Foo, Bar>;
610
645
  */
611
646
  type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
612
647
  //#endregion
613
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/internal/object.d.ts
648
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/internal/object.d.ts
614
649
  /**
615
650
  Merges user specified options with default options.
616
651
 
@@ -665,7 +700,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
665
700
  */
666
701
  type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
667
702
  //#endregion
668
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/except.d.ts
703
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/except.d.ts
669
704
  /**
670
705
  Filter out keys from an object.
671
706
 
@@ -762,7 +797,7 @@ type PostPayload = Except<UserData, 'email'>;
762
797
  type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
763
798
  type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
764
799
  //#endregion
765
- //#region ../../node_modules/.pnpm/type-fest@5.1.0/node_modules/type-fest/source/required-deep.d.ts
800
+ //#region ../../node_modules/.pnpm/type-fest@5.2.0/node_modules/type-fest/source/required-deep.d.ts
766
801
  /**
767
802
  Create a type from another type with all keys and nested keys set to required.
768
803
 
@@ -815,8 +850,8 @@ interface ItemEntityType<T$1 extends string> {
815
850
  type: T$1;
816
851
  }
817
852
  declare const ItemEntityTypePropertyNames: PropertyNames<ItemEntityType<string>>;
818
- declare const createItemEntityTypeSchema: <T extends z.ZodType<string>>(schema: T) => z.ZodObject<{
819
- type: T;
853
+ declare const createItemEntityTypeSchema: <T$1 extends z.ZodType<string>>(schema: T$1) => z.ZodObject<{
854
+ type: T$1;
820
855
  }>;
821
856
  //#endregion
822
857
  //#region src/models/shared/ItemMetadata.d.ts
@@ -856,9 +891,9 @@ type DeepOptionalUndefined<T$1> = T$1 extends ((...args: unknown[]) => unknown)
856
891
  type ToData<T$1 extends Serializable> = DeepOptionalUndefined<DeepOmit<T$1, "toJSON">>;
857
892
  //#endregion
858
893
  //#region src/models/shared/WithMetadata.d.ts
859
- interface WithMetadata<TBase$1 extends Class<NonNullable<unknown>>> {
860
- new (...args: ConstructorParameters<TBase$1>): InstanceType<TBase$1> & ItemMetadata;
861
- prototype: InstanceType<TBase$1> & ItemMetadata;
894
+ interface WithMetadata<TBase extends Class<NonNullable<unknown>>> {
895
+ new (...args: ConstructorParameters<TBase>): InstanceType<TBase> & ItemMetadata;
896
+ prototype: InstanceType<TBase> & ItemMetadata;
862
897
  }
863
898
  //#endregion
864
899
  //#region src/services/app/constants.d.ts
@@ -869,18 +904,6 @@ declare const MENTION_ID_ATTRIBUTE = "data-id";
869
904
  declare const MENTION_LABEL_ATTRIBUTE = "data-label";
870
905
  declare const MENTION_TYPE_ATTRIBUTE = "data-type";
871
906
  declare const MENTION_TYPE = "mention";
872
- declare const PUSH_NOTIFICATION_MAX_LENGTH = 100;
873
- //#endregion
874
- //#region src/services/message/getCreateMessageNotificationPayload.d.ts
875
- declare const getCreateMessageNotificationPayload: (message: string, {
876
- icon,
877
- title,
878
- url
879
- }: {
880
- icon?: null | string;
881
- title?: null | string;
882
- url: string;
883
- }) => string | undefined;
884
907
  //#endregion
885
908
  //#region src/services/message/getMentions.d.ts
886
909
  declare const getMentions: (message: string) => HTMLElement[];
@@ -904,7 +927,7 @@ declare const getIsServer: () => boolean;
904
927
  declare const ID_SEPARATOR = "|";
905
928
  //#endregion
906
929
  //#region src/util/object/getPropertyNames.d.ts
907
- declare const getPropertyNames: <T>() => PropertyNames<T>;
930
+ declare const getPropertyNames: <T$1>() => PropertyNames<T$1>;
908
931
  //#endregion
909
932
  //#region src/util/object/isPlainObject.d.ts
910
933
  declare const isPlainObject: (data: unknown) => data is object;
@@ -916,13 +939,13 @@ declare const jsonDateParse: (text: string) => any;
916
939
  type MergeObjectsStrict<T$1 extends object[]> = T$1 extends [infer TFirst, infer TSecond, ...infer TRemaining] ? TSecond extends { [K in keyof TSecond]: K extends keyof TFirst ? never : TSecond[K] } ? TRemaining extends object[] ? MergeObjectsStrict<[TSecond, ...TRemaining]> & TFirst : TFirst & TSecond : never : T$1 extends [infer TFirst] ? TFirst : never;
917
940
  //#endregion
918
941
  //#region src/util/object/mergeObjectsStrict.d.ts
919
- declare const mergeObjectsStrict: <T extends object[]>(...objects: T) => MergeObjectsStrict<T>;
942
+ declare const mergeObjectsStrict: <T$1 extends object[]>(...objects: T$1) => MergeObjectsStrict<T$1>;
920
943
  //#endregion
921
944
  //#region src/util/reactivity/getRawData.d.ts
922
- declare const getRawData: <T>(data: T) => T;
945
+ declare const getRawData: <T$1>(data: T$1) => T$1;
923
946
  //#endregion
924
947
  //#region src/util/reactivity/toRawDeep.d.ts
925
- declare const toRawDeep: <T extends object>(data: T) => T;
948
+ declare const toRawDeep: <T$1 extends object>(data: T$1) => T$1;
926
949
  //#endregion
927
950
  //#region src/util/regex/escapeRegExp.d.ts
928
951
  declare const escapeRegExp: (string: string) => string;
@@ -937,13 +960,13 @@ declare const streamToText: (readable: NodeJS.ReadableStream) => Promise<string>
937
960
  type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : S;
938
961
  //#endregion
939
962
  //#region src/util/text/toKebabCase.d.ts
940
- declare const toKebabCase: <T extends string>(string: T) => CamelToKebab<T>;
963
+ declare const toKebabCase: <T$1 extends string>(string: T$1) => CamelToKebab<T$1>;
941
964
  //#endregion
942
965
  //#region src/util/text/truncate.d.ts
943
966
  declare const truncate: (string: string, length: number) => string;
944
967
  //#endregion
945
968
  //#region src/util/text/uncapitalize.d.ts
946
- declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
969
+ declare const uncapitalize: <T$1 extends string>(string: T$1) => Uncapitalize<T$1>;
947
970
  //#endregion
948
971
  //#region src/util/time/hrtime.d.ts
949
972
  declare const hrtime: (previousHrTime?: [number, number]) => [number, number];
@@ -994,4 +1017,4 @@ declare const UUIDV4_REGEX: RegExp;
994
1017
  //#region src/util/id/uuid/uuidValidateV4.d.ts
995
1018
  declare const uuidValidateV4: (uuid: string) => boolean;
996
1019
  //#endregion
997
- export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PUSH_NOTIFICATION_MAX_LENGTH, PartialByKeys, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getCreateMessageNotificationPayload, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
1020
+ export { CamelToKebab, DeepOmit, DeepOmitArray, DeepOptionalProperties, DeepOptionalUndefined, DeepRequiredProperties, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KebabToCamel, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PartialByKeys, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, WithMetadata, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
package/dist/index.js CHANGED
@@ -219,6 +219,11 @@ const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,auto
219
219
 
220
220
  //#endregion
221
221
  //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
222
+ /**
223
+ * @vue/reactivity v3.5.22
224
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
225
+ * @license MIT
226
+ **/
222
227
  function warn$2(msg, ...args) {
223
228
  console.warn(`[Vue warn] ${msg}`, ...args);
224
229
  }
@@ -1298,6 +1303,11 @@ function traverse(value, depth = Infinity, seen) {
1298
1303
 
1299
1304
  //#endregion
1300
1305
  //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1306
+ /**
1307
+ * @vue/runtime-core v3.5.22
1308
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
1309
+ * @license MIT
1310
+ **/
1301
1311
  const stack = [];
1302
1312
  function pushWarningContext(vnode) {
1303
1313
  stack.push(vnode);
@@ -2276,6 +2286,11 @@ function initCustomFormatter() {
2276
2286
 
2277
2287
  //#endregion
2278
2288
  //#region ../../node_modules/.pnpm/vue@3.5.22_typescript@5.9.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
2289
+ /**
2290
+ * vue v3.5.22
2291
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
2292
+ * @license MIT
2293
+ **/
2279
2294
  function initDev() {
2280
2295
  initCustomFormatter();
2281
2296
  }
@@ -2286,15 +2301,15 @@ initDev();
2286
2301
  const getRawData = (data) => isReactive(data) ? toRaw(data) : data;
2287
2302
 
2288
2303
  //#endregion
2289
- //#region ../../node_modules/.pnpm/@vueuse+shared@13.9.0_vue@3.5.22_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs
2304
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.0.0_vue@3.5.22_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
2290
2305
  const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
2291
2306
  const toString = Object.prototype.toString;
2292
2307
  const isObject = (val) => toString.call(val) === "[object Object]";
2293
2308
  function cacheStringFunction(fn) {
2294
- const cache = /* @__PURE__ */ Object.create(null);
2295
- return (str) => {
2309
+ const cache = Object.create(null);
2310
+ return ((str) => {
2296
2311
  return cache[str] || (cache[str] = fn(str));
2297
- };
2312
+ });
2298
2313
  }
2299
2314
  const hyphenateRE = /\B([A-Z])/g;
2300
2315
  const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
@@ -2329,11 +2344,6 @@ const MENTION_ID_ATTRIBUTE = "data-id";
2329
2344
  const MENTION_LABEL_ATTRIBUTE = "data-label";
2330
2345
  const MENTION_TYPE_ATTRIBUTE = "data-type";
2331
2346
  const MENTION_TYPE = "mention";
2332
- const PUSH_NOTIFICATION_MAX_LENGTH = 100;
2333
-
2334
- //#endregion
2335
- //#region src/util/text/truncate.ts
2336
- const truncate = (string, length) => string.length > length ? `${string.slice(0, length)}..."` : string;
2337
2347
 
2338
2348
  //#endregion
2339
2349
  //#region ../../node_modules/.pnpm/he@1.2.0/node_modules/he/he.js
@@ -6605,6 +6615,7 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/domhan
6605
6615
  return __assign$1.apply(this, arguments);
6606
6616
  };
6607
6617
  Object.defineProperty(exports, "__esModule", { value: true });
6618
+ exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
6608
6619
  var domelementtype_1$2 = require_lib$6();
6609
6620
  /**
6610
6621
  * This object will be used as the prototype for Nodes when creating a
@@ -9538,6 +9549,7 @@ var require_encode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/enti
9538
9549
  return mod && mod.__esModule ? mod : { "default": mod };
9539
9550
  };
9540
9551
  Object.defineProperty(exports, "__esModule", { value: true });
9552
+ exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
9541
9553
  var encode_html_js_1 = __importDefault$11(require_encode_html());
9542
9554
  var escape_js_1$1 = require_escape();
9543
9555
  var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
@@ -9825,6 +9837,7 @@ var require_lib$4 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/entit
9825
9837
  //#region ../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/foreignNames.js
9826
9838
  var require_foreignNames = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/foreignNames.js": ((exports) => {
9827
9839
  Object.defineProperty(exports, "__esModule", { value: true });
9840
+ exports.attributeNames = exports.elementNames = void 0;
9828
9841
  exports.elementNames = new Map([
9829
9842
  "altGlyph",
9830
9843
  "altGlyphDef",
@@ -9976,6 +9989,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dom-s
9976
9989
  return result;
9977
9990
  };
9978
9991
  Object.defineProperty(exports, "__esModule", { value: true });
9992
+ exports.render = void 0;
9979
9993
  var ElementType = __importStar$2(require_lib$6());
9980
9994
  var entities_1 = require_lib$4();
9981
9995
  /**
@@ -10765,6 +10779,7 @@ var require_legacy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/domu
10765
10779
  //#region ../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/helpers.js
10766
10780
  var require_helpers = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/helpers.js": ((exports) => {
10767
10781
  Object.defineProperty(exports, "__esModule", { value: true });
10782
+ exports.DocumentPosition = void 0;
10768
10783
  exports.removeSubsets = removeSubsets$1;
10769
10784
  exports.compareDocumentPosition = compareDocumentPosition;
10770
10785
  exports.uniqueSort = uniqueSort;
@@ -11216,7 +11231,7 @@ function isWhitespace(c) {
11216
11231
  * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
11217
11232
  * the second contains the relevant tokens for that selector.
11218
11233
  */
11219
- function parse$5(selector) {
11234
+ function parse$4(selector) {
11220
11235
  const subselects = [];
11221
11236
  const endIndex = parseSelector(subselects, `${selector}`, 0);
11222
11237
  if (endIndex < selector.length) throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);
@@ -11582,7 +11597,7 @@ var es_exports = /* @__PURE__ */ __export({
11582
11597
  IgnoreCaseMode: () => IgnoreCaseMode,
11583
11598
  SelectorType: () => SelectorType,
11584
11599
  isTraversal: () => isTraversal$1,
11585
- parse: () => parse$5,
11600
+ parse: () => parse$4,
11586
11601
  stringify: () => stringify
11587
11602
  });
11588
11603
  var init_es = __esm({ "../../node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/index.js": (() => {
@@ -11595,6 +11610,7 @@ var init_es = __esm({ "../../node_modules/.pnpm/css-what@6.2.2/node_modules/css-
11595
11610
  //#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/sort.js
11596
11611
  var require_sort = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/sort.js": ((exports) => {
11597
11612
  Object.defineProperty(exports, "__esModule", { value: true });
11613
+ exports.isTraversal = void 0;
11598
11614
  var css_what_1$3 = (init_es(), __toCommonJS(es_exports));
11599
11615
  var procedure = new Map([
11600
11616
  [css_what_1$3.SelectorType.Universal, 50],
@@ -11662,6 +11678,7 @@ var require_attributes = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
11662
11678
  return mod && mod.__esModule ? mod : { "default": mod };
11663
11679
  };
11664
11680
  Object.defineProperty(exports, "__esModule", { value: true });
11681
+ exports.attributeRules = void 0;
11665
11682
  var boolbase_1$5 = __importDefault$9(require_boolbase());
11666
11683
  /**
11667
11684
  * All reserved characters in a regex, used for escaping.
@@ -11860,6 +11877,7 @@ var require_attributes = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
11860
11877
  //#region ../../node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/parse.js
11861
11878
  var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/parse.js": ((exports) => {
11862
11879
  Object.defineProperty(exports, "__esModule", { value: true });
11880
+ exports.parse = void 0;
11863
11881
  var whitespace = new Set([
11864
11882
  9,
11865
11883
  10,
@@ -11876,7 +11894,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/nth
11876
11894
  * @returns An array containing the integer step size and the integer offset of the nth rule.
11877
11895
  * @example nthCheck.parse("2n+3"); // returns [2, 3]
11878
11896
  */
11879
- function parse$4(formula) {
11897
+ function parse$3(formula) {
11880
11898
  formula = formula.trim().toLowerCase();
11881
11899
  if (formula === "even") return [2, 0];
11882
11900
  else if (formula === "odd") return [2, 1];
@@ -11917,7 +11935,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/nth
11917
11935
  while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) idx++;
11918
11936
  }
11919
11937
  }
11920
- exports.parse = parse$4;
11938
+ exports.parse = parse$3;
11921
11939
  }) });
11922
11940
 
11923
11941
  //#endregion
@@ -11927,6 +11945,7 @@ var require_compile$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/n
11927
11945
  return mod && mod.__esModule ? mod : { "default": mod };
11928
11946
  };
11929
11947
  Object.defineProperty(exports, "__esModule", { value: true });
11948
+ exports.generate = exports.compile = void 0;
11930
11949
  var boolbase_1$4 = __importDefault$8(require_boolbase());
11931
11950
  /**
11932
11951
  * Returns a function that checks if an elements index matches the given rule
@@ -12249,6 +12268,7 @@ var require_filters = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css
12249
12268
  //#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/pseudo-selectors/pseudos.js
12250
12269
  var require_pseudos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/pseudo-selectors/pseudos.js": ((exports) => {
12251
12270
  Object.defineProperty(exports, "__esModule", { value: true });
12271
+ exports.verifyPseudoArgs = exports.pseudos = void 0;
12252
12272
  exports.pseudos = {
12253
12273
  empty: function(elem, _a$1) {
12254
12274
  var adapter = _a$1.adapter;
@@ -12321,6 +12341,7 @@ var require_pseudos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css
12321
12341
  //#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/pseudo-selectors/aliases.js
12322
12342
  var require_aliases = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/pseudo-selectors/aliases.js": ((exports) => {
12323
12343
  Object.defineProperty(exports, "__esModule", { value: true });
12344
+ exports.aliases = void 0;
12324
12345
  /**
12325
12346
  * Aliases are pseudos that are expressed as selectors.
12326
12347
  */
@@ -12504,6 +12525,7 @@ var require_pseudo_selectors = /* @__PURE__ */ __commonJS({ "../../node_modules/
12504
12525
  //#region ../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/general.js
12505
12526
  var require_general = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/general.js": ((exports) => {
12506
12527
  Object.defineProperty(exports, "__esModule", { value: true });
12528
+ exports.compileGeneralSelector = void 0;
12507
12529
  var attributes_js_1 = require_attributes();
12508
12530
  var index_js_1$1 = require_pseudo_selectors();
12509
12531
  var css_what_1$1 = (init_es(), __toCommonJS(es_exports));
@@ -12630,6 +12652,7 @@ var require_compile = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/css
12630
12652
  return mod && mod.__esModule ? mod : { "default": mod };
12631
12653
  };
12632
12654
  Object.defineProperty(exports, "__esModule", { value: true });
12655
+ exports.compileToken = exports.compileUnsafe = exports.compile = void 0;
12633
12656
  var css_what_1 = (init_es(), __toCommonJS(es_exports));
12634
12657
  var boolbase_1$1 = __importDefault$5(require_boolbase());
12635
12658
  var sort_js_1 = __importStar$1(require_sort());
@@ -13129,6 +13152,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13129
13152
  return mod && mod.__esModule ? mod : { "default": mod };
13130
13153
  };
13131
13154
  Object.defineProperty(exports, "__esModule", { value: true });
13155
+ exports.parse = exports.base_parse = void 0;
13132
13156
  const css_select_1 = require_lib();
13133
13157
  const he_1 = __importDefault$1(require_he());
13134
13158
  const back_1 = __importDefault$1(require_back());
@@ -13392,7 +13416,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13392
13416
  }).join("");
13393
13417
  }
13394
13418
  set innerHTML(content) {
13395
- const r = parse$3(content, this._parseOptions);
13419
+ const r = parse$2(content, this._parseOptions);
13396
13420
  const nodes = r.childNodes.length ? r.childNodes : [new text_1$1.default(content, this)];
13397
13421
  resetParent(nodes, this);
13398
13422
  resetParent(this.childNodes, null);
@@ -13402,7 +13426,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13402
13426
  if (content instanceof node_1$1.default) content = [content];
13403
13427
  else if (typeof content == "string") {
13404
13428
  options = Object.assign(Object.assign({}, this._parseOptions), options);
13405
- const r = parse$3(content, options);
13429
+ const r = parse$2(content, options);
13406
13430
  content = r.childNodes.length ? r.childNodes : [new text_1$1.default(r.innerHTML, this)];
13407
13431
  }
13408
13432
  resetParent(this.childNodes, null);
@@ -13415,7 +13439,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13415
13439
  const content = nodes.map((node) => {
13416
13440
  if (node instanceof node_1$1.default) return [node];
13417
13441
  else if (typeof node == "string") {
13418
- const r = parse$3(node, this._parseOptions);
13442
+ const r = parse$2(node, this._parseOptions);
13419
13443
  return r.childNodes.length ? r.childNodes : [new text_1$1.default(node, this)];
13420
13444
  }
13421
13445
  return [];
@@ -13743,7 +13767,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13743
13767
  }
13744
13768
  insertAdjacentHTML(where, html$1) {
13745
13769
  if (arguments.length < 2) throw new Error("2 arguments required");
13746
- const p = parse$3(html$1, this._parseOptions);
13770
+ const p = parse$2(html$1, this._parseOptions);
13747
13771
  if (where === "afterend") this.after(...p.childNodes);
13748
13772
  else if (where === "afterbegin") this.prepend(...p.childNodes);
13749
13773
  else if (where === "beforeend") this.append(...p.childNodes);
@@ -13869,7 +13893,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
13869
13893
  }
13870
13894
  /** Clone this Node */
13871
13895
  clone() {
13872
- return parse$3(this.toString(), this._parseOptions).firstChild;
13896
+ return parse$2(this.toString(), this._parseOptions).firstChild;
13873
13897
  }
13874
13898
  };
13875
13899
  exports.default = HTMLElement$2;
@@ -14171,7 +14195,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
14171
14195
  * Parses HTML and returns a root element
14172
14196
  * Parse a chuck of HTML source.
14173
14197
  */
14174
- function parse$3(data, options = {}) {
14198
+ function parse$2(data, options = {}) {
14175
14199
  const stack$1 = base_parse(data, options);
14176
14200
  const [root] = stack$1;
14177
14201
  while (stack$1.length > 1) {
@@ -14196,7 +14220,7 @@ var require_html = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
14196
14220
  }
14197
14221
  return root;
14198
14222
  }
14199
- exports.parse = parse$3;
14223
+ exports.parse = parse$2;
14200
14224
  /**
14201
14225
  * Resolves a list of {@link NodeInsertable} to a list of nodes,
14202
14226
  * and removes nodes from any potential parent.
@@ -14253,6 +14277,7 @@ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
14253
14277
  return mod && mod.__esModule ? mod : { "default": mod };
14254
14278
  };
14255
14279
  Object.defineProperty(exports, "__esModule", { value: true });
14280
+ exports.NodeType = exports.TextNode = exports.Node = exports.valid = exports.CommentNode = exports.HTMLElement = exports.parse = void 0;
14256
14281
  const comment_1 = __importDefault(require_comment());
14257
14282
  exports.CommentNode = comment_1.default;
14258
14283
  const html_1 = __importDefault(require_html());
@@ -14266,37 +14291,19 @@ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/node-h
14266
14291
  const parse_1 = __importDefault(require_parse());
14267
14292
  const valid_1 = __importDefault(require_valid());
14268
14293
  exports.valid = valid_1.default;
14269
- function parse$2(data, options = {}) {
14294
+ function parse$1(data, options = {}) {
14270
14295
  return (0, parse_1.default)(data, options);
14271
14296
  }
14272
- exports.default = parse$2;
14273
- exports.parse = parse$2;
14274
- parse$2.parse = parse_1.default;
14275
- parse$2.HTMLElement = html_1.default;
14276
- parse$2.CommentNode = comment_1.default;
14277
- parse$2.valid = valid_1.default;
14278
- parse$2.Node = node_1.default;
14279
- parse$2.TextNode = text_1.default;
14280
- parse$2.NodeType = type_1.default;
14297
+ exports.parse = parse$1;
14298
+ parse$1.parse = parse_1.default;
14299
+ parse$1.HTMLElement = html_1.default;
14300
+ parse$1.CommentNode = comment_1.default;
14301
+ parse$1.valid = valid_1.default;
14302
+ parse$1.Node = node_1.default;
14303
+ parse$1.TextNode = text_1.default;
14304
+ parse$1.NodeType = type_1.default;
14281
14305
  }) });
14282
14306
 
14283
- //#endregion
14284
- //#region src/services/message/getCreateMessageNotificationPayload.ts
14285
- var import_dist$1 = /* @__PURE__ */ __toESM(require_dist(), 1);
14286
- const getCreateMessageNotificationPayload = (message, { icon, title, url }) => {
14287
- let textContent$1 = message;
14288
- try {
14289
- textContent$1 = (0, import_dist$1.default)(message).querySelector("p")?.textContent;
14290
- } catch {}
14291
- if (!textContent$1) return;
14292
- return JSON.stringify({
14293
- body: truncate(textContent$1, PUSH_NOTIFICATION_MAX_LENGTH),
14294
- data: { url },
14295
- icon,
14296
- title
14297
- });
14298
- };
14299
-
14300
14307
  //#endregion
14301
14308
  //#region src/services/message/getMentions.ts
14302
14309
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
@@ -14379,6 +14386,10 @@ const streamToText = async (readable) => {
14379
14386
  //#region src/util/text/toKebabCase.ts
14380
14387
  const toKebabCase = (string) => string.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map((x) => x.toLowerCase()).join("-") ?? "";
14381
14388
 
14389
+ //#endregion
14390
+ //#region src/util/text/truncate.ts
14391
+ const truncate = (string, length) => string.length > length ? `${string.slice(0, length)}..."` : string;
14392
+
14382
14393
  //#endregion
14383
14394
  //#region src/util/time/hrtime.ts
14384
14395
  const hrtime = (previousHrTime) => {
@@ -14422,4 +14433,4 @@ const UUIDV4_REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-
14422
14433
  const uuidValidateV4 = (uuid) => UUIDV4_REGEX.test(uuid);
14423
14434
 
14424
14435
  //#endregion
14425
- export { ID_SEPARATOR, InvalidOperationError, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, MENTION_ID_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, NIL, NotFoundError, NotInitializedError, Operation, PUSH_NOTIFICATION_MAX_LENGTH, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, UUIDV4_REGEX, applyItemMetadataMixin, capitalize, createItemEntityTypeSchema, css, escapeRegExp, exhaustiveGuard, getCreateMessageNotificationPayload, getIsServer, getMentions, getPropertyNames, getRawData, hrtime, html, isPlainObject, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, now, streamToText, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
14436
+ export { 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, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esposter/shared",
3
3
  "description": "A library that contains shared typescript code.",
4
- "version": "2.16.0",
4
+ "version": "2.17.0",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/Esposter/Esposter/blob/main/packages/shared#readme",
7
7
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc"
32
32
  },
33
33
  "dependencies": {
34
- "@vueuse/core": "^13.9.0",
34
+ "@vueuse/core": "^14.0.0",
35
35
  "node-html-parser": "^7.0.1",
36
36
  "vue": "^3.5.22",
37
37
  "zod": "^4.1.12"
@@ -39,5 +39,5 @@
39
39
  "devDependencies": {
40
40
  "@azure/data-tables": "^13.3.1"
41
41
  },
42
- "gitHead": "1c280a23f75959017d55b4f9fcddaf4ca1805229"
42
+ "gitHead": "7df0ac1ec308e2c3abdcae2c208c9f6a2f9d61f4"
43
43
  }