@notabene/javascript-sdk 1.34.0 → 2.0.0-RC
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.md +21 -0
- package/README.md +500 -259
- package/dist/{es/index.js → js/notabene.js} +1 -1
- package/dist/notabene.cjs +1 -0
- package/dist/notabene.d.ts +1565 -0
- package/dist/notabene.js +343 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +50 -64
- package/src/__tests__/notabene.test.ts +270 -0
- package/src/components/EmbeddedComponent.ts +237 -0
- package/src/components/__tests__/EmbeddedComponent.test.ts +530 -0
- package/src/ivms/types.ts +232 -152
- package/src/locales.ts +47 -0
- package/src/notabene.ts +292 -288
- package/src/types.ts +1068 -78
- package/src/utils/MessageEventManager.ts +115 -0
- package/src/utils/__tests__/MessageEventManager.test.ts +119 -0
- package/src/utils/__tests__/urls.test.ts +112 -0
- package/src/utils/arbitraries.ts +244 -0
- package/src/utils/caip.ts +16 -0
- package/src/utils/urls.ts +40 -0
- package/.editorconfig +0 -10
- package/.envrc.template +0 -1
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -13
- package/.gitlab-ci.yml +0 -74
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.husky/pre-push +0 -4
- package/.nvmrc +0 -1
- package/.prettierrc +0 -4
- package/.releaserc.json +0 -16
- package/.tool-versions +0 -3
- package/.vscode/extensions.json +0 -7
- package/.vscode/settings.json +0 -11
- package/CODEOWNERS +0 -1
- package/dist/lib/index.js +0 -376
- package/jest.config.js +0 -5
- package/public/index.html +0 -93
- package/src/lib/index.ts +0 -2
- package/src/module/index.ts +0 -10
- package/src/zoidComponentProps.ts +0 -81
- package/tsconfig.json +0 -18
- /package/{public/js/.gitkeep → src/arbitraries.ts} +0 -0
package/dist/notabene.js
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var m = (e, t, r) => t in e ? c(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var o = (e, t, r) => m(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
var u = /* @__PURE__ */ ((e) => (e.PRIVATE = "WALLET", e.VASP = "VASP", e))(u || {}), E = /* @__PURE__ */ ((e) => (e.NATURAL = "natural", e.LEGAL = "legal", e.SELF = "self", e))(E || {}), f = /* @__PURE__ */ ((e) => (e.EMPTY = "empty", e.VERIFY = "verify", e.PENDING = "pending", e.VERIFIED = "verified", e.BANNED = "banned", e))(f || {}), p = /* @__PURE__ */ ((e) => (e.ASSET = "asset", e.DESTINATION = "destination", e.COUNTERPARTY = "counterparty", e.AGENT = "agent", e))(p || {}), h = /* @__PURE__ */ ((e) => (e.COMPLETE = "complete", e.RESIZE = "resize", e.RESULT = "result", e.READY = "ready", e.INVALID = "invalid", e.ERROR = "error", e.CANCEL = "cancel", e))(h || {}), d = /* @__PURE__ */ ((e) => (e.UPDATE = "update", e.REQUEST_RESPONSE = "requestResponse", e))(d || {}), v = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.FAILED = "rejected", e.FLAGGED = "flagged", e.VERIFIED = "verified", e))(v || {}), g = /* @__PURE__ */ ((e) => (e.SelfDeclaration = "self-declaration", e.SIWE = "siwe", e.SIWX = "siwx", e.EIP191 = "eip-191", e.EIP712 = "eip-712", e.EIP1271 = "eip-1271", e.BIP137 = "bip-137", e.BIP137_XPUB = "xpub", e.ED25519 = "ed25519", e.MicroTransfer = "microtransfer", e.Screenshot = "screenshot", e.Connect = "connect", e))(g || {});
|
|
5
|
+
class I {
|
|
6
|
+
constructor() {
|
|
7
|
+
o(this, "listeners", /* @__PURE__ */ new Map());
|
|
8
|
+
o(this, "port");
|
|
9
|
+
this.handleMessage = this.handleMessage.bind(this);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Sets up the message port for communication.
|
|
13
|
+
*
|
|
14
|
+
* Initializes the MessagePort for receiving messages by setting up the message handler
|
|
15
|
+
* and starting the port.
|
|
16
|
+
*
|
|
17
|
+
* @param port - The MessagePort instance to use for communication
|
|
18
|
+
*/
|
|
19
|
+
setPort(t) {
|
|
20
|
+
this.port = t, this.port.onmessage = this.handleMessage, this.port.start();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Registers a callback for a specific message type.
|
|
24
|
+
*
|
|
25
|
+
* When messages of the specified type are received, the callback will be executed
|
|
26
|
+
* with the message data.
|
|
27
|
+
*
|
|
28
|
+
* @param messageType - The type of message to listen for
|
|
29
|
+
* @param callback - The callback function to execute when matching messages are received
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
on(t, r) {
|
|
33
|
+
return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => this.off(t, r);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Removes a callback for a specific message type.
|
|
37
|
+
*
|
|
38
|
+
* If the callback is the last one registered for the message type,
|
|
39
|
+
* the message type entry will be removed entirely.
|
|
40
|
+
*
|
|
41
|
+
* @param messageType - The type of message to remove listener from
|
|
42
|
+
* @param callback - The callback function to remove
|
|
43
|
+
*/
|
|
44
|
+
off(t, r) {
|
|
45
|
+
const i = this.listeners.get(t);
|
|
46
|
+
i && (i.delete(r), i.size === 0 && this.listeners.delete(t));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Internal message handler for processing received messages.
|
|
50
|
+
*
|
|
51
|
+
* Validates incoming messages and dispatches them to registered callbacks
|
|
52
|
+
* based on the message type.
|
|
53
|
+
*
|
|
54
|
+
* @param event - The message event containing the component message
|
|
55
|
+
*/
|
|
56
|
+
handleMessage(t) {
|
|
57
|
+
const r = t.data;
|
|
58
|
+
if (typeof r == "object" && r !== null && "type" in r) {
|
|
59
|
+
const i = r.type, s = this.listeners.get(i);
|
|
60
|
+
s && s.forEach((n) => n(r));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Sends a message through the message port
|
|
65
|
+
* @param message The host message to send
|
|
66
|
+
*/
|
|
67
|
+
send(t) {
|
|
68
|
+
this.port && this.port.postMessage(t);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
class w {
|
|
72
|
+
/**
|
|
73
|
+
* Creates an instance of EmbeddedComponent.
|
|
74
|
+
* @param url - The URL of the embedded component
|
|
75
|
+
* @param value - The initial transaction value
|
|
76
|
+
*/
|
|
77
|
+
constructor(t, r, i) {
|
|
78
|
+
o(this, "_url");
|
|
79
|
+
o(this, "_value");
|
|
80
|
+
o(this, "_options");
|
|
81
|
+
o(this, "_errors", []);
|
|
82
|
+
o(this, "iframe");
|
|
83
|
+
o(this, "eventManager");
|
|
84
|
+
o(this, "modal");
|
|
85
|
+
this._url = t, this._value = r, this._options = i, this.eventManager = new I(), this.on(h.INVALID, (s) => {
|
|
86
|
+
s.type === h.INVALID && (this._errors = s.errors, this._value = s.value);
|
|
87
|
+
}), this.on(h.RESIZE, (s) => {
|
|
88
|
+
s.type === h.RESIZE && this.iframe && (this.iframe.style.height = `${s.height}px`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Gets the URL of the embedded component
|
|
93
|
+
* @returns The URL of the embedded component
|
|
94
|
+
*/
|
|
95
|
+
get url() {
|
|
96
|
+
return this._url;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Gets the current transaction value
|
|
100
|
+
* @returns The current transaction value
|
|
101
|
+
*/
|
|
102
|
+
get value() {
|
|
103
|
+
return this._value;
|
|
104
|
+
}
|
|
105
|
+
get options() {
|
|
106
|
+
return this._options;
|
|
107
|
+
}
|
|
108
|
+
get errors() {
|
|
109
|
+
return this._errors;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Opens the component URL in the current window
|
|
113
|
+
*/
|
|
114
|
+
open() {
|
|
115
|
+
document.location.href = this.url;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Mounts the component to a parent element
|
|
119
|
+
* @param parentId - The ID of the parent element
|
|
120
|
+
* @throws Will throw an error if the parent element is not found
|
|
121
|
+
*/
|
|
122
|
+
mount(t) {
|
|
123
|
+
const r = document.querySelector(t);
|
|
124
|
+
if (!r) throw new Error(`parentID ${t} not found`);
|
|
125
|
+
this.embed(r);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Embeds the component into a parent element
|
|
129
|
+
* @param parent - The parent element to embed the component into
|
|
130
|
+
*/
|
|
131
|
+
embed(t, r = !1) {
|
|
132
|
+
var i, s;
|
|
133
|
+
this.removeEmbed(), this.iframe = document.createElement("iframe"), this.iframe.src = this.url + (r ? "" : "&embedded=true"), this.iframe.allow = "web-share", this.iframe.style.width = "100%", this.iframe.style.height = "100px", this.iframe.style.border = "none", this.iframe.style.overflow = "hidden", t.appendChild(this.iframe), window.addEventListener("message", (n) => {
|
|
134
|
+
var a, l;
|
|
135
|
+
n.source === ((a = this.iframe) == null ? void 0 : a.contentWindow) && ((l = this.eventManager) == null || l.setPort(n.ports[0]));
|
|
136
|
+
}), (s = (i = this.iframe) == null ? void 0 : i.contentWindow) == null || s.focus();
|
|
137
|
+
}
|
|
138
|
+
removeEmbed() {
|
|
139
|
+
this.iframe && this.iframe.remove();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Sends a message to the embedded component
|
|
143
|
+
* @param message - The message to send
|
|
144
|
+
*/
|
|
145
|
+
send(t) {
|
|
146
|
+
this.eventManager.send(t);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Adds an event listener for a specific message type
|
|
150
|
+
* @param messageType - The type of message to listen for
|
|
151
|
+
* @param callback - The callback function to execute when the message is received
|
|
152
|
+
*/
|
|
153
|
+
on(t, r) {
|
|
154
|
+
return this.eventManager.on(t, r);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Removes an event listener for a specific message type
|
|
158
|
+
* @param messageType - The type of message to stop listening for
|
|
159
|
+
* @param callback - The callback function to remove
|
|
160
|
+
*/
|
|
161
|
+
off(t, r) {
|
|
162
|
+
this.eventManager.off(t, r);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Updates the transaction value and sends an update message to the component
|
|
166
|
+
* @param value - The new transaction value
|
|
167
|
+
*/
|
|
168
|
+
update(t, r) {
|
|
169
|
+
this._value = t, r && (this._options = r), this.send({ type: d.UPDATE, value: t, options: this._options });
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Waits for the component to complete and returns the transaction response
|
|
173
|
+
* @returns A promise that resolves with the transaction response
|
|
174
|
+
*/
|
|
175
|
+
completion() {
|
|
176
|
+
return new Promise((t, r) => {
|
|
177
|
+
let i, s;
|
|
178
|
+
function n() {
|
|
179
|
+
i && i(), s && s();
|
|
180
|
+
}
|
|
181
|
+
i = this.on(h.COMPLETE, (a) => {
|
|
182
|
+
t(a.response), n();
|
|
183
|
+
}), s = this.on("error", (a) => {
|
|
184
|
+
r(new Error(a.message)), n();
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Opens the component in a modal dialog
|
|
190
|
+
*/
|
|
191
|
+
openModal() {
|
|
192
|
+
return this.modal && this.closeModal(), this.modal = document.createElement("dialog"), this.modal.style.border = "none", this.modal.style.backgroundColor = "white", this.modal.style.maxWidth = "100vw", this.modal.style.maxHeight = "100vh", this.modal.style.width = "600px", this.modal.style.height = "600px", document.body.appendChild(this.modal), this.embed(this.modal, !0), this.on(h.CANCEL, () => {
|
|
193
|
+
this.closeModal();
|
|
194
|
+
}), this.on(h.COMPLETE, () => {
|
|
195
|
+
this.closeModal();
|
|
196
|
+
}), this.modal.showModal(), this.modal.addEventListener("click", () => {
|
|
197
|
+
this.closeModal();
|
|
198
|
+
}), this.completion();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Closes the modal dialog
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
closeModal() {
|
|
205
|
+
var t;
|
|
206
|
+
this.modal && ((t = this.modal) == null || t.close(), this.modal.remove(), this.modal = void 0);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function U(e) {
|
|
210
|
+
return Object.entries(e).map(([t, r]) => {
|
|
211
|
+
if (r == null) return;
|
|
212
|
+
const i = encodeURIComponent(t), s = encodeURIComponent(
|
|
213
|
+
typeof r == "object" ? JSON.stringify(r) : String(r)
|
|
214
|
+
// Use String() to handle all primitive types
|
|
215
|
+
);
|
|
216
|
+
return `${i}=${s}`;
|
|
217
|
+
}).filter((t) => t !== void 0).join("&");
|
|
218
|
+
}
|
|
219
|
+
function b(e) {
|
|
220
|
+
const t = e.slice(1);
|
|
221
|
+
return t ? t.split("&").filter(Boolean).reduce(
|
|
222
|
+
(i, s) => {
|
|
223
|
+
const [n, a] = s.split("=");
|
|
224
|
+
return n && (i[decodeURIComponent(n)] = a ? decodeURIComponent(a) : ""), i;
|
|
225
|
+
},
|
|
226
|
+
{}
|
|
227
|
+
) : {};
|
|
228
|
+
}
|
|
229
|
+
class A {
|
|
230
|
+
/**
|
|
231
|
+
* Creates a new instance of the Notabene SDK
|
|
232
|
+
*
|
|
233
|
+
* @param config - Configuration options for the Notabene SDK
|
|
234
|
+
*/
|
|
235
|
+
constructor(t) {
|
|
236
|
+
o(this, "nodeUrl");
|
|
237
|
+
o(this, "authToken");
|
|
238
|
+
o(this, "uxUrl");
|
|
239
|
+
o(this, "theme");
|
|
240
|
+
o(this, "locale");
|
|
241
|
+
this.uxUrl = t.uxUrl || "https://connect.notabene.id", this.nodeUrl = t.nodeUrl, this.authToken = t.authToken, this.theme = t.theme, this.locale = t.locale;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Generates a URL for a Notabene component
|
|
245
|
+
*
|
|
246
|
+
* @param path - The path of the component
|
|
247
|
+
* @param value - Transaction data
|
|
248
|
+
* @param configuration - Optional transaction configuration
|
|
249
|
+
* @param callbacks - Optional callback configuration
|
|
250
|
+
* @returns component URL
|
|
251
|
+
* @internal
|
|
252
|
+
*/
|
|
253
|
+
componentUrl(t, r, i, s) {
|
|
254
|
+
const n = new URL(this.uxUrl);
|
|
255
|
+
n.pathname = t;
|
|
256
|
+
const a = U({
|
|
257
|
+
authToken: this.authToken,
|
|
258
|
+
value: r,
|
|
259
|
+
configuration: i
|
|
260
|
+
});
|
|
261
|
+
return n.hash = a, this.nodeUrl && n.searchParams.set("nodeUrl", this.nodeUrl), this.theme && n.searchParams.set("theme", JSON.stringify(this.theme)), this.locale && n.searchParams.set("locale", this.locale), s && (s.callback && n.searchParams.set("callback_url", s.callback), s.redirectUri && n.searchParams.set("redirect_uri", s.redirectUri)), n.toString();
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Creates a new embedded component
|
|
265
|
+
*
|
|
266
|
+
* @param path - The path of the component
|
|
267
|
+
* @param value - Transaction data
|
|
268
|
+
* @param options - Optional transaction options
|
|
269
|
+
* @param callbacks - Optional callback configuration
|
|
270
|
+
* @returns A new EmbeddedComponent instance
|
|
271
|
+
* @internal
|
|
272
|
+
*/
|
|
273
|
+
createComponent(t, r, i, s) {
|
|
274
|
+
return new w(
|
|
275
|
+
this.componentUrl(t, r, i, s),
|
|
276
|
+
r,
|
|
277
|
+
i
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Creates a withdrawal assist component
|
|
282
|
+
*
|
|
283
|
+
* @param value - Withdrawal transaction data
|
|
284
|
+
* @param options - Optional transaction options
|
|
285
|
+
* @param callbacks - Optional callback configuration
|
|
286
|
+
* @returns A new EmbeddedComponent instance for withdrawal assistance
|
|
287
|
+
*/
|
|
288
|
+
createWithdrawalAssist(t, r, i) {
|
|
289
|
+
return this.createComponent(
|
|
290
|
+
"withdrawal-assist",
|
|
291
|
+
t,
|
|
292
|
+
r,
|
|
293
|
+
i
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Creates a connect component
|
|
298
|
+
*
|
|
299
|
+
* @param value - Connection request data
|
|
300
|
+
* @param options - Optional transaction options
|
|
301
|
+
* @param callbacks - Optional callback configuration
|
|
302
|
+
* @returns A new EmbeddedComponent instance for connection
|
|
303
|
+
* @alpha
|
|
304
|
+
*/
|
|
305
|
+
createConnectWallet(t, r, i) {
|
|
306
|
+
return this.createComponent(
|
|
307
|
+
"connect",
|
|
308
|
+
t,
|
|
309
|
+
r,
|
|
310
|
+
i
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Creates a deposit request component
|
|
315
|
+
*
|
|
316
|
+
* @param value - Deposit request data
|
|
317
|
+
* @param options - Optional transaction options
|
|
318
|
+
* @param callbacks - Optional callback configuration
|
|
319
|
+
* @returns A new EmbeddedComponent instance for deposit requests
|
|
320
|
+
* @public
|
|
321
|
+
*/
|
|
322
|
+
createDepositRequest(t, r, i) {
|
|
323
|
+
return this.createComponent(
|
|
324
|
+
"deposit-request",
|
|
325
|
+
t,
|
|
326
|
+
r,
|
|
327
|
+
i
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
export {
|
|
332
|
+
u as AgentType,
|
|
333
|
+
h as CMType,
|
|
334
|
+
w as EmbeddedComponent,
|
|
335
|
+
d as HMType,
|
|
336
|
+
E as PersonType,
|
|
337
|
+
v as ProofStatus,
|
|
338
|
+
g as ProofTypes,
|
|
339
|
+
f as Status,
|
|
340
|
+
p as ValidationSections,
|
|
341
|
+
b as decodeFragmentToObject,
|
|
342
|
+
A as default
|
|
343
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.47.11"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notabene/javascript-sdk",
|
|
3
|
+
"type": "module",
|
|
3
4
|
"description": "JavaScript SDK for Notabene",
|
|
4
5
|
"homepage": "https://gitlab.com/notabene/open-source/javascript-sdk",
|
|
5
6
|
"repository": {
|
|
@@ -8,74 +9,63 @@
|
|
|
8
9
|
},
|
|
9
10
|
"author": "Notabene <developers@notabene.id>",
|
|
10
11
|
"license": "MIT",
|
|
11
|
-
"version": "
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"version": "2.0.0-RC",
|
|
13
|
+
"source": "src/notabene.ts",
|
|
14
|
+
"main": "dist/notabene.js",
|
|
15
|
+
"types": "dist/notabene.d.ts",
|
|
14
16
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
"lib": {
|
|
23
|
-
"source": "src/lib/index.ts",
|
|
24
|
-
"isLibrary": true,
|
|
25
|
-
"context": "node",
|
|
26
|
-
"outputFormat": "commonjs"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
},
|
|
32
|
-
"alias": {
|
|
33
|
-
"process": false,
|
|
34
|
-
"buffer": false
|
|
35
|
-
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src",
|
|
20
|
+
"package.json",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
36
23
|
"scripts": {
|
|
24
|
+
"docs": "typedoc --options typedoc.json",
|
|
37
25
|
"prepare": "husky install",
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"preview": "vite preview",
|
|
38
28
|
"watch": "parcel watch",
|
|
39
|
-
"dev": "sirv --dev --port 3002 public",
|
|
40
29
|
"build:dev": "yarn build && yarn dev",
|
|
41
|
-
"build": "
|
|
42
|
-
"build
|
|
43
|
-
"build:compile": "parcel build --no-source-maps && cp dist/es/index.js public/js/notabene.js",
|
|
30
|
+
"build:clean": "rimraf dist/ ts-out",
|
|
31
|
+
"build": "yarn lint && vite build && tsc && api-extractor run && yarn docs ",
|
|
44
32
|
"lint": "eslint .",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
33
|
+
"format": "prettier --write .",
|
|
34
|
+
"test": "vitest",
|
|
35
|
+
"coverage": "vitest run --coverage --coverage.extension=.ts",
|
|
36
|
+
"release": "semantic-release",
|
|
37
|
+
"publish": "yarn build && npm publish --tag next"
|
|
47
38
|
},
|
|
48
39
|
"devDependencies": {
|
|
49
|
-
"@commitlint/cli": "^
|
|
50
|
-
"@commitlint/config-conventional": "^
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
40
|
+
"@commitlint/cli": "^19.5.0",
|
|
41
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
42
|
+
"@eslint/js": "^9.13.0",
|
|
43
|
+
"@fast-check/vitest": "^0.1.3",
|
|
44
|
+
"@microsoft/api-extractor": "^7.47.11",
|
|
53
45
|
"@semantic-release/git": "^10.0.1",
|
|
54
|
-
"@semantic-release/gitlab": "^
|
|
55
|
-
"@semantic-release/npm": "^
|
|
56
|
-
"@
|
|
57
|
-
"@typescript-eslint/
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"eslint": "^
|
|
61
|
-
"eslint-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"ts-jest": "^28.0.3",
|
|
78
|
-
"typescript": "^4.7.2"
|
|
46
|
+
"@semantic-release/gitlab": "^13.2.1",
|
|
47
|
+
"@semantic-release/npm": "^12.0.1",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.11.0",
|
|
49
|
+
"@typescript-eslint/parser": "^8.11.0",
|
|
50
|
+
"@vitest/coverage-v8": "2.1.3",
|
|
51
|
+
"eslint": "^9.13.0",
|
|
52
|
+
"eslint-config-prettier": "^9.1.0",
|
|
53
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
54
|
+
"fast-check": "^3.22.0",
|
|
55
|
+
"globals": "^15.11.0",
|
|
56
|
+
"husky": "^9.1.6",
|
|
57
|
+
"jsdom": "^25.0.1",
|
|
58
|
+
"lint-staged": "^15.2.10",
|
|
59
|
+
"organize-imports-cli": "^0.10.0",
|
|
60
|
+
"prettier": "^3.3.3",
|
|
61
|
+
"rimraf": "^6.0.1",
|
|
62
|
+
"semantic-release": "^24.1.3",
|
|
63
|
+
"typedoc": "^0.26.10",
|
|
64
|
+
"typedoc-plugin-markdown": "^4.2.9",
|
|
65
|
+
"typescript": "^5.6.3",
|
|
66
|
+
"typescript-eslint": "^8.11.0",
|
|
67
|
+
"vite": "^5.4.10",
|
|
68
|
+
"vitest": "^2.1.3"
|
|
79
69
|
},
|
|
80
70
|
"lint-staged": {
|
|
81
71
|
"*.ts": [
|
|
@@ -87,9 +77,5 @@
|
|
|
87
77
|
"extends": [
|
|
88
78
|
"@commitlint/config-conventional"
|
|
89
79
|
]
|
|
90
|
-
},
|
|
91
|
-
"dependencies": {
|
|
92
|
-
"jsx-pragmatic": "^2.0.22",
|
|
93
|
-
"zoid": "^9.0.86"
|
|
94
80
|
}
|
|
95
|
-
}
|
|
81
|
+
}
|