lib0 0.2.108 → 0.2.109
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/bin/0serve.js +9 -1
- package/coverage/tmp/coverage-32991-1750516864118-0.json +1 -0
- package/diff/patience.d.ts +16 -0
- package/diff/patience.d.ts.map +1 -0
- package/diff/patience.js +226 -0
- package/diff/patience.test.d.ts +4 -0
- package/diff/patience.test.d.ts.map +1 -0
- package/dist/{broadcastchannel-f721f1d5.cjs → broadcastchannel-3f71755b.cjs} +2 -2
- package/dist/{broadcastchannel-f721f1d5.cjs.map → broadcastchannel-3f71755b.cjs.map} +1 -1
- package/dist/broadcastchannel.cjs +5 -5
- package/dist/{buffer-5c744eee.cjs → buffer-c040e625.cjs} +2 -2
- package/dist/{buffer-5c744eee.cjs.map → buffer-c040e625.cjs.map} +1 -1
- package/dist/buffer.cjs +4 -4
- package/dist/cache.cjs +2 -2
- package/dist/component.cjs +3 -3
- package/dist/diff/patience.d.ts +16 -0
- package/dist/diff/patience.d.ts.map +1 -0
- package/dist/diff/patience.test.d.ts +4 -0
- package/dist/diff/patience.test.d.ts.map +1 -0
- package/dist/{diff-6c8c103c.cjs → diff-117a5b30.cjs} +2 -2
- package/dist/{diff-6c8c103c.cjs.map → diff-117a5b30.cjs.map} +1 -1
- package/dist/diff.cjs +3 -3
- package/dist/{environment-e8406042.cjs → environment-f28f4004.cjs} +2 -2
- package/dist/{environment-e8406042.cjs.map → environment-f28f4004.cjs.map} +1 -1
- package/dist/environment.cjs +3 -3
- package/dist/{function-a29189eb.cjs → function-e09c7eb7.cjs} +2 -2
- package/dist/{function-a29189eb.cjs.map → function-e09c7eb7.cjs.map} +1 -1
- package/dist/function.cjs +2 -2
- package/dist/index.cjs +7 -7
- package/dist/indexeddbV2.cjs +1 -1
- package/dist/jwt.cjs +4 -4
- package/dist/list.cjs +2 -2
- package/dist/logging.cjs +3 -3
- package/dist/logging.common.cjs +3 -3
- package/dist/logging.node.cjs +3 -3
- package/dist/{object-315a738b.cjs → object-0dc73acd.cjs} +10 -1
- package/dist/object-0dc73acd.cjs.map +1 -0
- package/dist/object.cjs +2 -1
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.ts +16 -5
- package/dist/object.d.ts.map +1 -1
- package/dist/object.test.d.ts.map +1 -1
- package/dist/patience.cjs +236 -0
- package/dist/patience.cjs.map +1 -0
- package/dist/performance.node.cjs +2 -2
- package/dist/pledge.cjs +1 -1
- package/dist/{prng-706a5e42.cjs → prng-57f83f83.cjs} +2 -2
- package/dist/{prng-706a5e42.cjs.map → prng-57f83f83.cjs.map} +1 -1
- package/dist/prng.cjs +5 -5
- package/dist/rabin-gf2-polynomial.cjs +4 -4
- package/dist/rabin-uncached.cjs +4 -4
- package/dist/rabin.cjs +4 -4
- package/dist/testing.cjs +6 -6
- package/dist/url.cjs +1 -1
- package/object.d.ts +16 -5
- package/object.d.ts.map +1 -1
- package/object.js +7 -0
- package/object.test.d.ts.map +1 -1
- package/package.json +7 -1
- package/test.html +1 -0
- package/test.js +2 -0
- package/coverage/tmp/coverage-24213-1747233250173-0.json +0 -1
- package/dist/object-315a738b.cjs.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function diff(as: Array<string>, bs: Array<string>): Array<{
|
|
2
|
+
index: number;
|
|
3
|
+
remove: Array<string>;
|
|
4
|
+
insert: Array<string>;
|
|
5
|
+
}>;
|
|
6
|
+
export function diffSplitBy(a: string, b: string, _regexp: RegExp | string): {
|
|
7
|
+
index: number;
|
|
8
|
+
remove: string;
|
|
9
|
+
insert: string;
|
|
10
|
+
}[];
|
|
11
|
+
export function diffAuto(a: string, b: string): {
|
|
12
|
+
insert: string;
|
|
13
|
+
remove: string;
|
|
14
|
+
index: number;
|
|
15
|
+
}[];
|
|
16
|
+
//# sourceMappingURL=patience.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patience.d.ts","sourceRoot":"","sources":["patience.js"],"names":[],"mappings":"AAoBO,yBAJI,MAAM,MAAM,CAAC,MACb,MAAM,MAAM,CAAC,GACZ,MAAM;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,MAAM,CAAC,CAAA;CAAC,CAAC,CAShF;AAOM,+BAJI,MAAM,KACN,MAAM,WACN,MAAM,GAAC,MAAM;;;;IAqBvB;AAWM,4BAHI,MAAM,KACN,MAAM;;;;IASP"}
|
package/diff/patience.js
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g.
|
|
3
|
+
* first diff lines, then diff words)
|
|
4
|
+
*
|
|
5
|
+
* https://bramcohen.livejournal.com/73318.html
|
|
6
|
+
*
|
|
7
|
+
* @experiemantal This API will likely change.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import * as map from '../map.js'
|
|
11
|
+
import * as math from '../math.js'
|
|
12
|
+
import * as array from '../array.js'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Implementation of patience diff. Expects that content is pre-split (e.g. by newline).
|
|
16
|
+
*
|
|
17
|
+
* @param {Array<string>} as
|
|
18
|
+
* @param {Array<string>} bs
|
|
19
|
+
* @return {Array<{ index: number, remove: Array<string>, insert: Array<string>}>} changeset @todo should use delta instead
|
|
20
|
+
*/
|
|
21
|
+
export const diff = (as, bs) => {
|
|
22
|
+
const {
|
|
23
|
+
middleAs,
|
|
24
|
+
middleBs,
|
|
25
|
+
commonPrefix
|
|
26
|
+
} = removeCommonPrefixAndSuffix(as, bs)
|
|
27
|
+
return lcs(middleAs, middleBs, commonPrefix)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} a
|
|
32
|
+
* @param {string} b
|
|
33
|
+
* @param {RegExp|string} _regexp
|
|
34
|
+
*/
|
|
35
|
+
export const diffSplitBy = (a, b, _regexp) => {
|
|
36
|
+
const isStringSeparator = typeof _regexp === 'string'
|
|
37
|
+
const separator = isStringSeparator ? _regexp : ''
|
|
38
|
+
const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp
|
|
39
|
+
const as = splitByRegexp(a, regexp, !isStringSeparator)
|
|
40
|
+
const bs = splitByRegexp(b, regexp, !isStringSeparator)
|
|
41
|
+
const changes = diff(as, bs)
|
|
42
|
+
let prevSplitIndex = 0
|
|
43
|
+
let prevStringIndex = 0
|
|
44
|
+
return changes.map(change => {
|
|
45
|
+
for (; prevSplitIndex < change.index; prevSplitIndex++) {
|
|
46
|
+
prevStringIndex += as[prevSplitIndex].length
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
index: prevStringIndex,
|
|
50
|
+
remove: change.remove.join(separator),
|
|
51
|
+
insert: change.insert.join(separator)
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Sensible default for diffing strings using patience (it's fast though).
|
|
58
|
+
*
|
|
59
|
+
* Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word
|
|
60
|
+
* (split by space, brackets, punctuation)
|
|
61
|
+
*
|
|
62
|
+
* @param {string} a
|
|
63
|
+
* @param {string} b
|
|
64
|
+
*/
|
|
65
|
+
export const diffAuto = (a, b) =>
|
|
66
|
+
diffSplitBy(a, b, '\n').map(d =>
|
|
67
|
+
diffSplitBy(d.remove, d.insert, /\. |[a-zA-Z0-9]+|[. ()[\],;{}]/g).map(dd => ({
|
|
68
|
+
insert: dd.insert,
|
|
69
|
+
remove: dd.remove,
|
|
70
|
+
index: dd.index + d.index
|
|
71
|
+
}))
|
|
72
|
+
).flat()
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @param {Array<string>} as
|
|
76
|
+
* @param {Array<string>} bs
|
|
77
|
+
*/
|
|
78
|
+
const removeCommonPrefixAndSuffix = (as, bs) => {
|
|
79
|
+
const commonLen = math.min(as.length, bs.length)
|
|
80
|
+
let commonPrefix = 0
|
|
81
|
+
let commonSuffix = 0
|
|
82
|
+
// match start
|
|
83
|
+
for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ }
|
|
84
|
+
// match end
|
|
85
|
+
for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ }
|
|
86
|
+
const middleAs = as.slice(commonPrefix, as.length - commonSuffix)
|
|
87
|
+
const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix)
|
|
88
|
+
return {
|
|
89
|
+
middleAs, middleBs, commonPrefix, commonSuffix
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Splits string by regex and returns all strings as an array. The matched parts are also returned.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} str
|
|
97
|
+
* @param {RegExp} regexp
|
|
98
|
+
* @param {boolean} includeSeparator
|
|
99
|
+
*/
|
|
100
|
+
const splitByRegexp = (str, regexp, includeSeparator) => {
|
|
101
|
+
const matches = [...str.matchAll(regexp)]
|
|
102
|
+
let prevIndex = 0
|
|
103
|
+
/**
|
|
104
|
+
* @type {Array<string>}
|
|
105
|
+
*/
|
|
106
|
+
const res = []
|
|
107
|
+
matches.forEach(m => {
|
|
108
|
+
prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index))
|
|
109
|
+
includeSeparator && res.push(m[0]) // is always non-empty
|
|
110
|
+
prevIndex = /** @type {number} */ (m.index) + m[0].length
|
|
111
|
+
})
|
|
112
|
+
const end = str.slice(prevIndex)
|
|
113
|
+
end.length > 0 && res.push(end)
|
|
114
|
+
return res
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* An item may have multiple occurances (not when matching unique entries). It also may have a
|
|
119
|
+
* reference to the stack of other items (from as to bs).
|
|
120
|
+
*/
|
|
121
|
+
class Item {
|
|
122
|
+
constructor () {
|
|
123
|
+
/**
|
|
124
|
+
* @type {Array<number>}
|
|
125
|
+
*/
|
|
126
|
+
this.indexes = []
|
|
127
|
+
/**
|
|
128
|
+
* The matching item from the other side
|
|
129
|
+
* @type {Item?}
|
|
130
|
+
*/
|
|
131
|
+
this.match = null
|
|
132
|
+
/**
|
|
133
|
+
* For patience sort. Reference (index of the stack) to the previous pile.
|
|
134
|
+
*
|
|
135
|
+
* @type {Item?}
|
|
136
|
+
*/
|
|
137
|
+
this.ref = null
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @param {Array<string>} xs
|
|
143
|
+
*/
|
|
144
|
+
const partition = xs => {
|
|
145
|
+
/**
|
|
146
|
+
* @type {Map<string,Item>}
|
|
147
|
+
*/
|
|
148
|
+
const refs = map.create()
|
|
149
|
+
xs.forEach((x, index) => {
|
|
150
|
+
map.setIfUndefined(refs, x, () => new Item()).indexes.push(index)
|
|
151
|
+
})
|
|
152
|
+
return refs
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Find the longest common subsequence of items using patience sort.
|
|
157
|
+
*
|
|
158
|
+
* @param {Array<string>} as
|
|
159
|
+
* @param {Array<string>} bs
|
|
160
|
+
* @param {number} indexAdjust
|
|
161
|
+
*/
|
|
162
|
+
const lcs = (as, bs, indexAdjust) => {
|
|
163
|
+
if (as.length === 0 && bs.length === 0) return []
|
|
164
|
+
const aParts = partition(as)
|
|
165
|
+
const bParts = partition(bs)
|
|
166
|
+
/**
|
|
167
|
+
* @type {Array<Array<Item>>} I.e. Array<Pile<Item>>
|
|
168
|
+
*/
|
|
169
|
+
const piles = []
|
|
170
|
+
aParts.forEach((aItem, aKey) => {
|
|
171
|
+
// skip if no match or if either item is not unique
|
|
172
|
+
if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return
|
|
173
|
+
for (let i = 0; i < piles.length; i++) {
|
|
174
|
+
const pile = piles[i]
|
|
175
|
+
if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) {
|
|
176
|
+
pile.push(aItem)
|
|
177
|
+
if (i > 0) aItem.ref = array.last(piles[i - 1])
|
|
178
|
+
return
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1]))
|
|
182
|
+
piles.push([aItem])
|
|
183
|
+
})
|
|
184
|
+
/**
|
|
185
|
+
* References to all matched items
|
|
186
|
+
*
|
|
187
|
+
* @type {Array<Item>}
|
|
188
|
+
*/
|
|
189
|
+
const matches = []
|
|
190
|
+
/**
|
|
191
|
+
* @type {Item?}
|
|
192
|
+
*/
|
|
193
|
+
let currPileItem = piles[piles.length - 1]?.[0]
|
|
194
|
+
while (currPileItem != null) {
|
|
195
|
+
matches.push(currPileItem)
|
|
196
|
+
currPileItem = currPileItem.ref
|
|
197
|
+
}
|
|
198
|
+
matches.reverse()
|
|
199
|
+
// add pseude match (assume the string terminal always matches)
|
|
200
|
+
const pseudoA = new Item()
|
|
201
|
+
const pseudoB = new Item()
|
|
202
|
+
pseudoA.match = pseudoB
|
|
203
|
+
pseudoA.indexes.push(as.length)
|
|
204
|
+
pseudoB.indexes.push(bs.length)
|
|
205
|
+
matches.push(pseudoA)
|
|
206
|
+
/**
|
|
207
|
+
* @type {Array<{ index: number, remove: Array<string>, insert: Array<string>}>}
|
|
208
|
+
*/
|
|
209
|
+
const changeset = []
|
|
210
|
+
let diffAStart = 0
|
|
211
|
+
let diffBStart = 0
|
|
212
|
+
for (let i = 0; i < matches.length; i++) {
|
|
213
|
+
const m = matches[i]
|
|
214
|
+
const delLength = m.indexes[0] - diffAStart
|
|
215
|
+
const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart
|
|
216
|
+
if (delLength !== 0 || insLength !== 0) {
|
|
217
|
+
const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength))
|
|
218
|
+
if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) {
|
|
219
|
+
changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs })
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
diffAStart = m.indexes[0] + 1
|
|
223
|
+
diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1
|
|
224
|
+
}
|
|
225
|
+
return changeset
|
|
226
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patience.test.d.ts","sourceRoot":"","sources":["patience.test.js"],"names":[],"mappings":"AAmBO,iCAFI,EAAE,QAAQ,QAwGpB;AAKM,gDAFI,EAAE,QAAQ,QAgDpB;mBA3KkB,eAAe"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var map = require('./map-0dabcc55.cjs');
|
|
4
4
|
var set = require('./set-a0a3ea69.cjs');
|
|
5
|
-
var buffer = require('./buffer-
|
|
5
|
+
var buffer = require('./buffer-c040e625.cjs');
|
|
6
6
|
var storage = require('./storage.cjs');
|
|
7
7
|
|
|
8
8
|
/* eslint-env browser */
|
|
@@ -125,4 +125,4 @@ exports.broadcastchannel = broadcastchannel;
|
|
|
125
125
|
exports.publish = publish;
|
|
126
126
|
exports.subscribe = subscribe;
|
|
127
127
|
exports.unsubscribe = unsubscribe;
|
|
128
|
-
//# sourceMappingURL=broadcastchannel-
|
|
128
|
+
//# sourceMappingURL=broadcastchannel-3f71755b.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcastchannel-
|
|
1
|
+
{"version":3,"file":"broadcastchannel-3f71755b.cjs","sources":["../broadcastchannel.js"],"sourcesContent":["/* eslint-env browser */\n\n/**\n * Helpers for cross-tab communication using broadcastchannel with LocalStorage fallback.\n *\n * ```js\n * // In browser window A:\n * broadcastchannel.subscribe('my events', data => console.log(data))\n * broadcastchannel.publish('my events', 'Hello world!') // => A: 'Hello world!' fires synchronously in same tab\n *\n * // In browser window B:\n * broadcastchannel.publish('my events', 'hello from tab B') // => A: 'hello from tab B'\n * ```\n *\n * @module broadcastchannel\n */\n\n// @todo before next major: use Uint8Array instead as buffer object\n\nimport * as map from './map.js'\nimport * as set from './set.js'\nimport * as buffer from './buffer.js'\nimport * as storage from './storage.js'\n\n/**\n * @typedef {Object} Channel\n * @property {Set<function(any, any):any>} Channel.subs\n * @property {any} Channel.bc\n */\n\n/**\n * @type {Map<string, Channel>}\n */\nconst channels = new Map()\n\n/* c8 ignore start */\nclass LocalStoragePolyfill {\n /**\n * @param {string} room\n */\n constructor (room) {\n this.room = room\n /**\n * @type {null|function({data:ArrayBuffer}):void}\n */\n this.onmessage = null\n /**\n * @param {any} e\n */\n this._onChange = e => e.key === room && this.onmessage !== null && this.onmessage({ data: buffer.fromBase64(e.newValue || '') })\n storage.onChange(this._onChange)\n }\n\n /**\n * @param {ArrayBuffer} buf\n */\n postMessage (buf) {\n storage.varStorage.setItem(this.room, buffer.toBase64(buffer.createUint8ArrayFromArrayBuffer(buf)))\n }\n\n close () {\n storage.offChange(this._onChange)\n }\n}\n/* c8 ignore stop */\n\n// Use BroadcastChannel or Polyfill\n/* c8 ignore next */\nconst BC = typeof BroadcastChannel === 'undefined' ? LocalStoragePolyfill : BroadcastChannel\n\n/**\n * @param {string} room\n * @return {Channel}\n */\nconst getChannel = room =>\n map.setIfUndefined(channels, room, () => {\n const subs = set.create()\n const bc = new BC(room)\n /**\n * @param {{data:ArrayBuffer}} e\n */\n /* c8 ignore next */\n bc.onmessage = e => subs.forEach(sub => sub(e.data, 'broadcastchannel'))\n return {\n bc, subs\n }\n })\n\n/**\n * Subscribe to global `publish` events.\n *\n * @function\n * @param {string} room\n * @param {function(any, any):any} f\n */\nexport const subscribe = (room, f) => {\n getChannel(room).subs.add(f)\n return f\n}\n\n/**\n * Unsubscribe from `publish` global events.\n *\n * @function\n * @param {string} room\n * @param {function(any, any):any} f\n */\nexport const unsubscribe = (room, f) => {\n const channel = getChannel(room)\n const unsubscribed = channel.subs.delete(f)\n if (unsubscribed && channel.subs.size === 0) {\n channel.bc.close()\n channels.delete(room)\n }\n return unsubscribed\n}\n\n/**\n * Publish data to all subscribers (including subscribers on this tab)\n *\n * @function\n * @param {string} room\n * @param {any} data\n * @param {any} [origin]\n */\nexport const publish = (room, data, origin = null) => {\n const c = getChannel(room)\n c.bc.postMessage(data)\n c.subs.forEach(sub => sub(data, origin))\n}\n"],"names":["buffer.fromBase64","storage.onChange","storage.varStorage","buffer.toBase64","buffer.createUint8ArrayFromArrayBuffer","storage.offChange","map.setIfUndefined","set.create"],"mappings":";;;;;;;AAAA;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,QAAQ,GAAG,IAAI,GAAG,GAAE;AAC1B;AACA;AACA,MAAM,oBAAoB,CAAC;AAC3B;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE;AACrB,IAAI,IAAI,CAAC,IAAI,GAAG,KAAI;AACpB;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,GAAG,KAAI;AACzB;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAEA,iBAAiB,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,EAAC;AACpI,IAAIC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAC;AACpC,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE,WAAW,CAAC,CAAC,GAAG,EAAE;AACpB,IAAIC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAEC,eAAe,CAACC,sCAAsC,CAAC,GAAG,CAAC,CAAC,EAAC;AACv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tB,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAC;AACzB,GAAG;AACH,EAAE,OAAO,YAAY;AACrB,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK;AACtD,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,EAAC;AAC5B,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,EAAC;AACxB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,EAAC;AAC1C;;;;;;;;;;;;;;"}
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('./map-0dabcc55.cjs');
|
|
6
6
|
require('./set-a0a3ea69.cjs');
|
|
7
|
-
require('./buffer-
|
|
7
|
+
require('./buffer-c040e625.cjs');
|
|
8
8
|
require('./storage.cjs');
|
|
9
|
-
var broadcastchannel = require('./broadcastchannel-
|
|
9
|
+
var broadcastchannel = require('./broadcastchannel-3f71755b.cjs');
|
|
10
10
|
require('./string-42009272.cjs');
|
|
11
11
|
require('./array-f0f52786.cjs');
|
|
12
|
-
require('./environment-
|
|
12
|
+
require('./environment-f28f4004.cjs');
|
|
13
13
|
require('./conditions-f5c0c102.cjs');
|
|
14
|
-
require('./function-
|
|
15
|
-
require('./object-
|
|
14
|
+
require('./function-e09c7eb7.cjs');
|
|
15
|
+
require('./object-0dc73acd.cjs');
|
|
16
16
|
require('./traits.cjs');
|
|
17
17
|
require('./math-08e068f9.cjs');
|
|
18
18
|
require('./encoding-364fc682.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var string = require('./string-42009272.cjs');
|
|
4
|
-
var environment = require('./environment-
|
|
4
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
5
5
|
var array = require('./array-f0f52786.cjs');
|
|
6
6
|
var math = require('./math-08e068f9.cjs');
|
|
7
7
|
var encoding = require('./encoding-364fc682.cjs');
|
|
@@ -195,4 +195,4 @@ exports.shiftNBitsLeft = shiftNBitsLeft;
|
|
|
195
195
|
exports.toBase64 = toBase64;
|
|
196
196
|
exports.toBase64UrlEncoded = toBase64UrlEncoded;
|
|
197
197
|
exports.toHexString = toHexString;
|
|
198
|
-
//# sourceMappingURL=buffer-
|
|
198
|
+
//# sourceMappingURL=buffer-c040e625.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer-
|
|
1
|
+
{"version":3,"file":"buffer-c040e625.cjs","sources":["../buffer.js"],"sourcesContent":["/**\n * Utility functions to work with buffers (Uint8Array).\n *\n * @module buffer\n */\n\nimport * as string from './string.js'\nimport * as env from './environment.js'\nimport * as array from './array.js'\nimport * as math from './math.js'\nimport * as encoding from './encoding.js'\nimport * as decoding from './decoding.js'\n\n/**\n * @param {number} len\n */\nexport const createUint8ArrayFromLen = len => new Uint8Array(len)\n\n/**\n * Create Uint8Array with initial content from buffer\n *\n * @param {ArrayBuffer} buffer\n * @param {number} byteOffset\n * @param {number} length\n */\nexport const createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length) => new Uint8Array(buffer, byteOffset, length)\n\n/**\n * Create Uint8Array with initial content from buffer\n *\n * @param {ArrayBuffer} buffer\n */\nexport const createUint8ArrayFromArrayBuffer = buffer => new Uint8Array(buffer)\n\n/* c8 ignore start */\n/**\n * @param {Uint8Array} bytes\n * @return {string}\n */\nconst toBase64Browser = bytes => {\n let s = ''\n for (let i = 0; i < bytes.byteLength; i++) {\n s += string.fromCharCode(bytes[i])\n }\n // eslint-disable-next-line no-undef\n return btoa(s)\n}\n/* c8 ignore stop */\n\n/**\n * @param {Uint8Array} bytes\n * @return {string}\n */\nconst toBase64Node = bytes => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64')\n\n/* c8 ignore start */\n/**\n * @param {string} s\n * @return {Uint8Array}\n */\nconst fromBase64Browser = s => {\n // eslint-disable-next-line no-undef\n const a = atob(s)\n const bytes = createUint8ArrayFromLen(a.length)\n for (let i = 0; i < a.length; i++) {\n bytes[i] = a.charCodeAt(i)\n }\n return bytes\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} s\n */\nconst fromBase64Node = s => {\n const buf = Buffer.from(s, 'base64')\n return createUint8ArrayViewFromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength)\n}\n\n/* c8 ignore next */\nexport const toBase64 = env.isBrowser ? toBase64Browser : toBase64Node\n\n/* c8 ignore next */\nexport const fromBase64 = env.isBrowser ? fromBase64Browser : fromBase64Node\n\n/**\n * Implements base64url - see https://datatracker.ietf.org/doc/html/rfc4648#section-5\n * @param {Uint8Array} buf\n */\nexport const toBase64UrlEncoded = buf => toBase64(buf).replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '')\n\n/**\n * @param {string} base64\n */\nexport const fromBase64UrlEncoded = base64 => fromBase64(base64.replaceAll('-', '+').replaceAll('_', '/'))\n\n/**\n * Base64 is always a more efficient choice. This exists for utility purposes only.\n *\n * @param {Uint8Array} buf\n */\nexport const toHexString = buf => array.map(buf, b => b.toString(16).padStart(2, '0')).join('')\n\n/**\n * Note: This function expects that the hex doesn't start with 0x..\n *\n * @param {string} hex\n */\nexport const fromHexString = hex => {\n const hlen = hex.length\n const buf = new Uint8Array(math.ceil(hlen / 2))\n for (let i = 0; i < hlen; i += 2) {\n buf[buf.length - i / 2 - 1] = Number.parseInt(hex.slice(hlen - i - 2, hlen - i), 16)\n }\n return buf\n}\n\n/**\n * Copy the content of an Uint8Array view to a new ArrayBuffer.\n *\n * @param {Uint8Array} uint8Array\n * @return {Uint8Array}\n */\nexport const copyUint8Array = uint8Array => {\n const newBuf = createUint8ArrayFromLen(uint8Array.byteLength)\n newBuf.set(uint8Array)\n return newBuf\n}\n\n/**\n * Encode anything as a UInt8Array. It's a pun on typescripts's `any` type.\n * See encoding.writeAny for more information.\n *\n * @param {any} data\n * @return {Uint8Array}\n */\nexport const encodeAny = data =>\n encoding.encode(encoder => encoding.writeAny(encoder, data))\n\n/**\n * Decode an any-encoded value.\n *\n * @param {Uint8Array} buf\n * @return {any}\n */\nexport const decodeAny = buf => decoding.readAny(decoding.createDecoder(buf))\n\n/**\n * Shift Byte Array {N} bits to the left. Does not expand byte array.\n *\n * @param {Uint8Array} bs\n * @param {number} N should be in the range of [0-7]\n */\nexport const shiftNBitsLeft = (bs, N) => {\n if (N === 0) return bs\n bs = new Uint8Array(bs)\n bs[0] <<= N\n for (let i = 1; i < bs.length; i++) {\n bs[i - 1] |= bs[i] >>> (8 - N)\n bs[i] <<= N\n }\n return bs\n}\n"],"names":["string.fromCharCode","env.isBrowser","array.map","math.ceil","encoding.encode","encoding.writeAny","decoding.readAny","decoding.createDecoder"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACY,MAAC,uBAAuB,GAAG,GAAG,IAAI,IAAI,UAAU,CAAC,GAAG,EAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mCAAmC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC;AAC7H;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,+BAA+B,GAAG,MAAM,IAAI,IAAI,UAAU,CAAC,MAAM,EAAC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,KAAK,IAAI;AACjC,EAAE,IAAI,CAAC,GAAG,GAAE;AACZ,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;AAC7C,IAAI,CAAC,IAAIA,mBAAmB,CAAC,KAAK,CAAC,CAAC,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AAM;AACf,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,IAAI;AAC7B,EAAEC,eAAe,CAAC,OAAO,IAAIC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,EAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,SAAS,GAAG,GAAG,IAAIC,gBAAgB,CAACC,sBAAsB,CAAC,GAAG,CAAC,EAAC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK;AACzC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE;AACxB,EAAE,EAAE,GAAG,IAAI,UAAU,CAAC,EAAE,EAAC;AACzB,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAC;AACb,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAC;AAClC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAC;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/buffer.cjs
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('./string-42009272.cjs');
|
|
6
|
-
require('./environment-
|
|
6
|
+
require('./environment-f28f4004.cjs');
|
|
7
7
|
require('./array-f0f52786.cjs');
|
|
8
8
|
require('./math-08e068f9.cjs');
|
|
9
9
|
require('./encoding-364fc682.cjs');
|
|
10
10
|
require('./decoding-7b1393a8.cjs');
|
|
11
|
-
var buffer = require('./buffer-
|
|
11
|
+
var buffer = require('./buffer-c040e625.cjs');
|
|
12
12
|
require('./map-0dabcc55.cjs');
|
|
13
13
|
require('./conditions-f5c0c102.cjs');
|
|
14
14
|
require('./storage.cjs');
|
|
15
|
-
require('./function-
|
|
16
|
-
require('./object-
|
|
15
|
+
require('./function-e09c7eb7.cjs');
|
|
16
|
+
require('./object-0dc73acd.cjs');
|
|
17
17
|
require('./traits.cjs');
|
|
18
18
|
require('./set-a0a3ea69.cjs');
|
|
19
19
|
require('./number-466d8922.cjs');
|
package/dist/cache.cjs
CHANGED
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var list = require('./list.cjs');
|
|
6
6
|
var map = require('./map-0dabcc55.cjs');
|
|
7
7
|
var time = require('./time-bc2081b9.cjs');
|
|
8
|
-
require('./function-
|
|
8
|
+
require('./function-e09c7eb7.cjs');
|
|
9
9
|
require('./array-f0f52786.cjs');
|
|
10
10
|
require('./set-a0a3ea69.cjs');
|
|
11
|
-
require('./object-
|
|
11
|
+
require('./object-0dc73acd.cjs');
|
|
12
12
|
require('./traits.cjs');
|
|
13
13
|
require('./error-8582d695.cjs');
|
|
14
14
|
require('./metric.cjs');
|
package/dist/component.cjs
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var dom = require('./dom-16daf1a0.cjs');
|
|
6
|
-
var diff = require('./diff-
|
|
7
|
-
var object = require('./object-
|
|
6
|
+
var diff = require('./diff-117a5b30.cjs');
|
|
7
|
+
var object = require('./object-0dc73acd.cjs');
|
|
8
8
|
var json = require('./json-092190a1.cjs');
|
|
9
9
|
var string = require('./string-42009272.cjs');
|
|
10
10
|
var array = require('./array-f0f52786.cjs');
|
|
11
11
|
var number = require('./number-466d8922.cjs');
|
|
12
|
-
var _function = require('./function-
|
|
12
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
13
13
|
require('./pair-ab022bc3.cjs');
|
|
14
14
|
require('./map-0dabcc55.cjs');
|
|
15
15
|
require('./set-a0a3ea69.cjs');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function diff(as: Array<string>, bs: Array<string>): Array<{
|
|
2
|
+
index: number;
|
|
3
|
+
remove: Array<string>;
|
|
4
|
+
insert: Array<string>;
|
|
5
|
+
}>;
|
|
6
|
+
export function diffSplitBy(a: string, b: string, _regexp: RegExp | string): {
|
|
7
|
+
index: number;
|
|
8
|
+
remove: string;
|
|
9
|
+
insert: string;
|
|
10
|
+
}[];
|
|
11
|
+
export function diffAuto(a: string, b: string): {
|
|
12
|
+
insert: string;
|
|
13
|
+
remove: string;
|
|
14
|
+
index: number;
|
|
15
|
+
}[];
|
|
16
|
+
//# sourceMappingURL=patience.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patience.d.ts","sourceRoot":"","sources":["../../diff/patience.js"],"names":[],"mappings":"AAoBO,yBAJI,MAAM,MAAM,CAAC,MACb,MAAM,MAAM,CAAC,GACZ,MAAM;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,MAAM,CAAC,CAAA;CAAC,CAAC,CAShF;AAOM,+BAJI,MAAM,KACN,MAAM,WACN,MAAM,GAAC,MAAM;;;;IAqBvB;AAWM,4BAHI,MAAM,KACN,MAAM;;;;IASP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patience.test.d.ts","sourceRoot":"","sources":["../../diff/patience.test.js"],"names":[],"mappings":"AAmBO,iCAFI,EAAE,QAAQ,QAwGpB;AAKM,gDAFI,EAAE,QAAQ,QAgDpB;mBA3KkB,eAAe"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _function = require('./function-
|
|
3
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Efficient diffs.
|
|
@@ -161,4 +161,4 @@ exports.simpleDiff = simpleDiff;
|
|
|
161
161
|
exports.simpleDiffArray = simpleDiffArray;
|
|
162
162
|
exports.simpleDiffString = simpleDiffString;
|
|
163
163
|
exports.simpleDiffStringWithCursor = simpleDiffStringWithCursor;
|
|
164
|
-
//# sourceMappingURL=diff-
|
|
164
|
+
//# sourceMappingURL=diff-117a5b30.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-
|
|
1
|
+
{"version":3,"file":"diff-117a5b30.cjs","sources":["../diff.js"],"sourcesContent":["/**\n * Efficient diffs.\n *\n * @module diff\n */\n\nimport { equalityStrict } from './function.js'\n\n/**\n * A SimpleDiff describes a change on a String.\n *\n * ```js\n * console.log(a) // the old value\n * console.log(b) // the updated value\n * // Apply changes of diff (pseudocode)\n * a.remove(diff.index, diff.remove) // Remove `diff.remove` characters\n * a.insert(diff.index, diff.insert) // Insert `diff.insert`\n * a === b // values match\n * ```\n *\n * @typedef {Object} SimpleDiff\n * @property {Number} index The index where changes were applied\n * @property {Number} remove The number of characters to delete starting\n * at `index`.\n * @property {T} insert The new text to insert at `index` after applying\n * `delete`\n *\n * @template T\n */\n\nconst highSurrogateRegex = /[\\uD800-\\uDBFF]/\nconst lowSurrogateRegex = /[\\uDC00-\\uDFFF]/\n\n/**\n * Create a diff between two strings. This diff implementation is highly\n * efficient, but not very sophisticated.\n *\n * @function\n *\n * @param {string} a The old version of the string\n * @param {string} b The updated version of the string\n * @return {SimpleDiff<string>} The diff description.\n */\nexport const simpleDiffString = (a, b) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n while (left < a.length && left < b.length && a[left] === b[left]) {\n left++\n }\n // If the last same character is a high surrogate, we need to rollback to the previous character\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n while (right + left < a.length && right + left < b.length && a[a.length - right - 1] === b[b.length - right - 1]) {\n right++\n }\n // If the last same character is a low surrogate, we need to rollback to the previous character\n if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n\n/**\n * @todo Remove in favor of simpleDiffString\n * @deprecated\n */\nexport const simpleDiff = simpleDiffString\n\n/**\n * Create a diff between two arrays. This diff implementation is highly\n * efficient, but not very sophisticated.\n *\n * Note: This is basically the same function as above. Another function was created so that the runtime\n * can better optimize these function calls.\n *\n * @function\n * @template T\n *\n * @param {Array<T>} a The old version of the array\n * @param {Array<T>} b The updated version of the array\n * @param {function(T, T):boolean} [compare]\n * @return {SimpleDiff<Array<T>>} The diff description.\n */\nexport const simpleDiffArray = (a, b, compare = equalityStrict) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n while (left < a.length && left < b.length && compare(a[left], b[left])) {\n left++\n }\n while (right + left < a.length && right + left < b.length && compare(a[a.length - right - 1], b[b.length - right - 1])) {\n right++\n }\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n\n/**\n * Diff text and try to diff at the current cursor position.\n *\n * @param {string} a\n * @param {string} b\n * @param {number} cursor This should refer to the current left cursor-range position\n */\nexport const simpleDiffStringWithCursor = (a, b, cursor) => {\n let left = 0 // number of same characters counting from left\n let right = 0 // number of same characters counting from right\n // Iterate left to the right until we find a changed character\n // First iteration considers the current cursor position\n while (\n left < a.length &&\n left < b.length &&\n a[left] === b[left] &&\n left < cursor\n ) {\n left++\n }\n // If the last same character is a high surrogate, we need to rollback to the previous character\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n // Iterate right to the left until we find a changed character\n while (\n right + left < a.length &&\n right + left < b.length &&\n a[a.length - right - 1] === b[b.length - right - 1]\n ) {\n right++\n }\n // If the last same character is a low surrogate, we need to rollback to the previous character\n if (right > 0 && lowSurrogateRegex.test(a[a.length - right])) right--\n // Try to iterate left further to the right without caring about the current cursor position\n while (\n right + left < a.length &&\n right + left < b.length &&\n a[left] === b[left]\n ) {\n left++\n }\n if (left > 0 && highSurrogateRegex.test(a[left - 1])) left--\n return {\n index: left,\n remove: a.length - left - right,\n insert: b.slice(left, b.length - right)\n }\n}\n"],"names":["equalityStrict"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,kBAAiB;AAC5C,MAAM,iBAAiB,GAAG,kBAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC1C,EAAE,IAAI,IAAI,GAAG,EAAC;AACd,EAAE,IAAI,KAAK,GAAG,EAAC;AACf,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE;AACpE,IAAI,IAAI,GAAE;AACV,GAAG;AACH;AACA,EAAE,IAAI,IAAI,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE;AAC9D,EAAE,OAAO,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,EAAE;AACpH,IAAI,KAAK,GAAE;AACX,GAAG;AACH;AACA,EAAE,IAAI,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CA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AC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AACvB,IAAI;AACJ,IAAI,IAAI,GAAE;AACV,GAAG;AACH,EAAE,IAAI,IAAI,GAAG,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE;AAC9D,EAAE,OAAO;AACT,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG,KAAK;AACnC,IAAI,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;AAC3C,GAAG;AACH;;;;;;;;;;;;;;;;"}
|
package/dist/diff.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./function-
|
|
6
|
-
var diff = require('./diff-
|
|
5
|
+
require('./function-e09c7eb7.cjs');
|
|
6
|
+
var diff = require('./diff-117a5b30.cjs');
|
|
7
7
|
require('./array-f0f52786.cjs');
|
|
8
8
|
require('./set-a0a3ea69.cjs');
|
|
9
|
-
require('./object-
|
|
9
|
+
require('./object-0dc73acd.cjs');
|
|
10
10
|
require('./traits.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ var map = require('./map-0dabcc55.cjs');
|
|
|
4
4
|
var string = require('./string-42009272.cjs');
|
|
5
5
|
var conditions = require('./conditions-f5c0c102.cjs');
|
|
6
6
|
var storage = require('./storage.cjs');
|
|
7
|
-
var _function = require('./function-
|
|
7
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Isomorphic module to work access the environment (query params, env variables).
|
|
@@ -177,4 +177,4 @@ exports.isMac = isMac;
|
|
|
177
177
|
exports.isNode = isNode;
|
|
178
178
|
exports.production = production;
|
|
179
179
|
exports.supportsColor = supportsColor;
|
|
180
|
-
//# sourceMappingURL=environment-
|
|
180
|
+
//# sourceMappingURL=environment-f28f4004.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-
|
|
1
|
+
{"version":3,"file":"environment-f28f4004.cjs","sources":["../environment.js"],"sourcesContent":["/**\n * Isomorphic module to work access the environment (query params, env variables).\n *\n * @module environment\n */\n\nimport * as map from './map.js'\nimport * as string from './string.js'\nimport * as conditions from './conditions.js'\nimport * as storage from './storage.js'\nimport * as f from './function.js'\n\n/* c8 ignore next 2 */\n// @ts-ignore\nexport const isNode = typeof process !== 'undefined' && process.release && /node|io\\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n\n/* c8 ignore next */\nexport const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && !isNode\n/* c8 ignore next 3 */\nexport const isMac = typeof navigator !== 'undefined'\n ? /Mac/.test(navigator.platform)\n : false\n\n/**\n * @type {Map<string,string>}\n */\nlet params\nconst args = []\n\n/* c8 ignore start */\nconst computeParams = () => {\n if (params === undefined) {\n if (isNode) {\n params = map.create()\n const pargs = process.argv\n let currParamName = null\n for (let i = 0; i < pargs.length; i++) {\n const parg = pargs[i]\n if (parg[0] === '-') {\n if (currParamName !== null) {\n params.set(currParamName, '')\n }\n currParamName = parg\n } else {\n if (currParamName !== null) {\n params.set(currParamName, parg)\n currParamName = null\n } else {\n args.push(parg)\n }\n }\n }\n if (currParamName !== null) {\n params.set(currParamName, '')\n }\n // in ReactNative for example this would not be true (unless connected to the Remote Debugger)\n } else if (typeof location === 'object') {\n params = map.create(); // eslint-disable-next-line no-undef\n (location.search || '?').slice(1).split('&').forEach((kv) => {\n if (kv.length !== 0) {\n const [key, value] = kv.split('=')\n params.set(`--${string.fromCamelCase(key, '-')}`, value)\n params.set(`-${string.fromCamelCase(key, '-')}`, value)\n }\n })\n } else {\n params = map.create()\n }\n }\n return params\n}\n/* c8 ignore stop */\n\n/**\n * @param {string} name\n * @return {boolean}\n */\n/* c8 ignore next */\nexport const hasParam = (name) => computeParams().has(name)\n\n/**\n * @param {string} name\n * @param {string} defaultVal\n * @return {string}\n */\n/* c8 ignore next 2 */\nexport const getParam = (name, defaultVal) =>\n computeParams().get(name) || defaultVal\n\n/**\n * @param {string} name\n * @return {string|null}\n */\n/* c8 ignore next 4 */\nexport const getVariable = (name) =>\n isNode\n ? conditions.undefinedToNull(process.env[name.toUpperCase().replaceAll('-', '_')])\n : conditions.undefinedToNull(storage.varStorage.getItem(name))\n\n/**\n * @param {string} name\n * @return {string|null}\n */\n/* c8 ignore next 2 */\nexport const getConf = (name) =>\n computeParams().get('--' + name) || getVariable(name)\n\n/**\n * @param {string} name\n * @return {string}\n */\n/* c8 ignore next 5 */\nexport const ensureConf = (name) => {\n const c = getConf(name)\n if (c == null) throw new Error(`Expected configuration \"${name.toUpperCase().replaceAll('-', '_')}\"`)\n return c\n}\n\n/**\n * @param {string} name\n * @return {boolean}\n */\n/* c8 ignore next 2 */\nexport const hasConf = (name) =>\n hasParam('--' + name) || getVariable(name) !== null\n\n/* c8 ignore next */\nexport const production = hasConf('production')\n\n/* c8 ignore next 2 */\nconst forceColor = isNode &&\n f.isOneOf(process.env.FORCE_COLOR, ['true', '1', '2'])\n\n/* c8 ignore start */\n/**\n * Color is enabled by default if the terminal supports it.\n *\n * Explicitly enable color using `--color` parameter\n * Disable color using `--no-color` parameter or using `NO_COLOR=1` environment variable.\n * `FORCE_COLOR=1` enables color and takes precedence over all.\n */\nexport const supportsColor = forceColor || (\n !hasParam('--no-colors') && // @todo deprecate --no-colors\n !hasConf('no-color') &&\n (!isNode || process.stdout.isTTY) && (\n !isNode ||\n hasParam('--color') ||\n getVariable('COLORTERM') !== null ||\n (getVariable('TERM') || '').includes('color')\n )\n)\n/* c8 ignore stop */\n"],"names":["map.create","string.fromCamelCase","conditions.undefinedToNull","storage.varStorage","f.isOneOf"],"mappings":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ACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,UAAU;AACvC,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;AAC1B,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;AACtB,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AACnC,IAAI,CAAC,MAAM;AACX,IAAI,QAAQ,CAAC,SAAS,CAAC;AACvB,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,IAAI;AACrC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC;AACjD,GAAG;AACH,EAAC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/environment.cjs
CHANGED
|
@@ -6,11 +6,11 @@ require('./map-0dabcc55.cjs');
|
|
|
6
6
|
require('./string-42009272.cjs');
|
|
7
7
|
require('./conditions-f5c0c102.cjs');
|
|
8
8
|
require('./storage.cjs');
|
|
9
|
-
require('./function-
|
|
10
|
-
var environment = require('./environment-
|
|
9
|
+
require('./function-e09c7eb7.cjs');
|
|
10
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
11
11
|
require('./array-f0f52786.cjs');
|
|
12
12
|
require('./set-a0a3ea69.cjs');
|
|
13
|
-
require('./object-
|
|
13
|
+
require('./object-0dc73acd.cjs');
|
|
14
14
|
require('./traits.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var array = require('./array-f0f52786.cjs');
|
|
4
|
-
var object = require('./object-
|
|
4
|
+
var object = require('./object-0dc73acd.cjs');
|
|
5
5
|
var traits = require('./traits.cjs');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -219,4 +219,4 @@ exports.isOneOf = isOneOf;
|
|
|
219
219
|
exports.isString = isString;
|
|
220
220
|
exports.isTemplate = isTemplate;
|
|
221
221
|
exports.nop = nop;
|
|
222
|
-
//# sourceMappingURL=function-
|
|
222
|
+
//# sourceMappingURL=function-e09c7eb7.cjs.map
|