@dxos/util 0.8.4-main.bbf232bc24 → 0.8.4-main.bc2380dfbc
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 +102 -5
- package/dist/lib/browser/index.mjs +38 -22
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +38 -22
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/id.d.ts +30 -0
- package/dist/types/src/id.d.ts.map +1 -0
- package/dist/types/src/id.test.d.ts +2 -0
- package/dist/types/src/id.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/id.test.ts +109 -0
- package/src/id.ts +48 -0
- package/src/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/array-to-hex.ts":{"bytes":2379,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11929,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1259,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1230,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8147,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/browser-storage.ts":{"bytes":6825,"imports":[],"format":"esm"},"src/callback-collection.ts":{"bytes":3085,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":4733,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4504,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1118,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6300,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1473,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":25202,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/composite-key.ts":{"bytes":1461,"imports":[],"format":"esm"},"src/deep.ts":{"bytes":3594,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1474,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3584,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":2931,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2089,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1273,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":701,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19681,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1420,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4145,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1745,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":2986,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3669,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13202,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12805,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":396,"imports":[],"format":"esm"},"src/object.ts":{"bytes":998,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1518,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4900,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3578,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17349,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2425,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1231,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2540,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12738,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4473,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4890,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2767,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2599,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3850,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":13259,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7195,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3861,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5662,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":606,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1076,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":12393,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7153,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6176,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10311,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":9150,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":13604,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5477,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/browser-storage.ts","kind":"import-statement","original":"./browser-storage"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/composite-key.ts","kind":"import-statement","original":"./composite-key"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/filename.ts","kind":"import-statement","original":"./filename"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":157684},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arraySwap","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearCaches","clearIndexedDB","clearOPFS","clearServiceWorkers","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","compositeKey","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isBun","isMobile","isMobileOrTablet","isNode","isNonNullable","isTauri","isTruthy","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","retry","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","safeUrl","setDeep","sortKeys","splitCompositeKey","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1931},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":153},"src/bitfield.ts":{"bytesInOutput":1637},"src/browser-storage.ts":{"bytesInOutput":1360},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":763},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1390},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":5568},"src/composite-key.ts":{"bytesInOutput":132},"src/deep.ts":{"bytesInOutput":530},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"src/error-format.ts":{"bytesInOutput":380},"src/filename.ts":{"bytesInOutput":176},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":800},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2958},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":676},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":5437},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/retry.ts":{"bytesInOutput":903},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":387},"src/safe-parse.ts":{"bytesInOutput":634},"src/safe-stringify.ts":{"bytesInOutput":2691},"src/sliding-window-summary.ts":{"bytesInOutput":1569},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":945},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":3114},"src/tracer.ts":{"bytesInOutput":1390},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2278},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":3309}},"bytes":66129}}}
|
|
1
|
+
{"inputs":{"src/array-to-hex.ts":{"bytes":2379,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11929,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1259,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1230,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8147,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/browser-storage.ts":{"bytes":6825,"imports":[],"format":"esm"},"src/callback-collection.ts":{"bytes":3085,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":4733,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4504,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1118,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6300,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1473,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":25202,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/composite-key.ts":{"bytes":1461,"imports":[],"format":"esm"},"src/deep.ts":{"bytes":3594,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1474,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3584,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":2931,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2089,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1273,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":701,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19681,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/id.ts":{"bytes":5229,"imports":[],"format":"esm"},"src/map.ts":{"bytes":1420,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4145,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1745,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":2986,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3669,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13202,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12805,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":396,"imports":[],"format":"esm"},"src/object.ts":{"bytes":998,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1518,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4900,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3578,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17349,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2425,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1231,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2540,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12738,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4473,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4890,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2767,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2599,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3850,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":13259,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7195,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3861,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5662,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":606,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1076,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":12393,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7153,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6176,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10311,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":9150,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":13604,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5551,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/browser-storage.ts","kind":"import-statement","original":"./browser-storage"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/composite-key.ts","kind":"import-statement","original":"./composite-key"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/filename.ts","kind":"import-statement","original":"./filename"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/id.ts","kind":"import-statement","original":"./id"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":160180},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arraySwap","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearCaches","clearIndexedDB","clearOPFS","clearServiceWorkers","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","compositeKey","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","id","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isBun","isMobile","isMobileOrTablet","isNode","isNonNullable","isTauri","isTruthy","isWellFormedId","isWellFormedIdPart","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","retry","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","safeUrl","setDeep","sortKeys","splitCompositeKey","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1931},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":153},"src/bitfield.ts":{"bytesInOutput":1637},"src/browser-storage.ts":{"bytesInOutput":1360},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":763},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1390},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":5568},"src/composite-key.ts":{"bytesInOutput":132},"src/deep.ts":{"bytesInOutput":530},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"src/error-format.ts":{"bytesInOutput":380},"src/filename.ts":{"bytesInOutput":176},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/id.ts":{"bytesInOutput":552},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":805},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2958},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":687},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":5437},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/retry.ts":{"bytesInOutput":903},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":387},"src/safe-parse.ts":{"bytesInOutput":634},"src/safe-stringify.ts":{"bytesInOutput":2691},"src/sliding-window-summary.ts":{"bytesInOutput":1569},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":945},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":3114},"src/tracer.ts":{"bytesInOutput":1402},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2278},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":3309}},"bytes":66769}}}
|
|
@@ -1060,6 +1060,19 @@ var humanize = (value) => {
|
|
|
1060
1060
|
return hasher.humanize(value);
|
|
1061
1061
|
};
|
|
1062
1062
|
|
|
1063
|
+
// src/id.ts
|
|
1064
|
+
var PART = /^[a-zA-Z][a-zA-Z0-9]{0,62}$/;
|
|
1065
|
+
var ID = /^[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(\.[a-zA-Z]([a-zA-Z0-9]{0,62})?)$/;
|
|
1066
|
+
function id(strings, ...values) {
|
|
1067
|
+
const raw = strings.reduce((out, str, i) => out + str + (i < values.length ? String(values[i]) : ""), "");
|
|
1068
|
+
if (!ID.test(raw)) {
|
|
1069
|
+
throw new Error(`Invalid id (expected AT Protocol NSID): ${JSON.stringify(raw)}`);
|
|
1070
|
+
}
|
|
1071
|
+
return raw;
|
|
1072
|
+
}
|
|
1073
|
+
var isWellFormedId = (value) => ID.test(value);
|
|
1074
|
+
var isWellFormedIdPart = (value) => PART.test(value);
|
|
1075
|
+
|
|
1063
1076
|
// src/map.ts
|
|
1064
1077
|
var defaultMap = (map, key, def) => {
|
|
1065
1078
|
let value = map.get(key);
|
|
@@ -1079,12 +1092,12 @@ var getPrototypeSpecificInstanceId = (instance) => {
|
|
|
1079
1092
|
nextId: 0,
|
|
1080
1093
|
instanceIds: /* @__PURE__ */ new WeakMap()
|
|
1081
1094
|
}));
|
|
1082
|
-
let
|
|
1083
|
-
if (
|
|
1084
|
-
|
|
1085
|
-
instanceCtx.instanceIds.set(instance,
|
|
1095
|
+
let id2 = instanceCtx.instanceIds.get(instance);
|
|
1096
|
+
if (id2 === void 0) {
|
|
1097
|
+
id2 = instanceCtx.nextId++;
|
|
1098
|
+
instanceCtx.instanceIds.set(instance, id2);
|
|
1086
1099
|
}
|
|
1087
|
-
return
|
|
1100
|
+
return id2;
|
|
1088
1101
|
};
|
|
1089
1102
|
var getDebugName = (instance) => {
|
|
1090
1103
|
if (instance == null) {
|
|
@@ -1365,27 +1378,27 @@ var orderKeys = (obj, order) => {
|
|
|
1365
1378
|
|
|
1366
1379
|
// src/order.ts
|
|
1367
1380
|
var inferObjectOrder = (objectMap, order = []) => {
|
|
1368
|
-
const orderedObjects = order.reduce((acc,
|
|
1369
|
-
if (
|
|
1370
|
-
acc.objects.push(objectMap[
|
|
1371
|
-
acc.ids.add(
|
|
1381
|
+
const orderedObjects = order.reduce((acc, id2) => {
|
|
1382
|
+
if (id2 in objectMap) {
|
|
1383
|
+
acc.objects.push(objectMap[id2]);
|
|
1384
|
+
acc.ids.add(id2);
|
|
1372
1385
|
}
|
|
1373
1386
|
return acc;
|
|
1374
1387
|
}, {
|
|
1375
1388
|
objects: [],
|
|
1376
1389
|
ids: /* @__PURE__ */ new Set()
|
|
1377
1390
|
});
|
|
1378
|
-
const { objects } = Object.keys(objectMap).reduce((acc,
|
|
1379
|
-
if (!acc.ids.has(
|
|
1380
|
-
acc.objects.push(objectMap[
|
|
1391
|
+
const { objects } = Object.keys(objectMap).reduce((acc, id2) => {
|
|
1392
|
+
if (!acc.ids.has(id2)) {
|
|
1393
|
+
acc.objects.push(objectMap[id2]);
|
|
1381
1394
|
}
|
|
1382
1395
|
return acc;
|
|
1383
1396
|
}, orderedObjects);
|
|
1384
1397
|
return objects;
|
|
1385
1398
|
};
|
|
1386
1399
|
var inferRecordOrder = (objectMap, order = []) => {
|
|
1387
|
-
return Object.assign(order.filter((
|
|
1388
|
-
acc[
|
|
1400
|
+
return Object.assign(order.filter((id2) => id2 in objectMap).reduce((acc, id2) => {
|
|
1401
|
+
acc[id2] = null;
|
|
1389
1402
|
return acc;
|
|
1390
1403
|
}, {}), objectMap);
|
|
1391
1404
|
};
|
|
@@ -2118,8 +2131,8 @@ var Tracer = class {
|
|
|
2118
2131
|
keys() {
|
|
2119
2132
|
return Array.from(this._events.keys());
|
|
2120
2133
|
}
|
|
2121
|
-
get(
|
|
2122
|
-
const events = this._events.get(
|
|
2134
|
+
get(id2, filter) {
|
|
2135
|
+
const events = this._events.get(id2);
|
|
2123
2136
|
if (filter) {
|
|
2124
2137
|
return events?.filter((event) => Object.entries(filter).every(([key, value]) => event?.value[key] === value));
|
|
2125
2138
|
}
|
|
@@ -2136,11 +2149,11 @@ var Tracer = class {
|
|
|
2136
2149
|
this._recording = false;
|
|
2137
2150
|
return this;
|
|
2138
2151
|
}
|
|
2139
|
-
emit(
|
|
2140
|
-
this._post(this._createEvent(
|
|
2152
|
+
emit(id2, value) {
|
|
2153
|
+
this._post(this._createEvent(id2, value));
|
|
2141
2154
|
}
|
|
2142
|
-
mark(
|
|
2143
|
-
const event = this._createEvent(
|
|
2155
|
+
mark(id2, value) {
|
|
2156
|
+
const event = this._createEvent(id2, value);
|
|
2144
2157
|
const start = performance.now();
|
|
2145
2158
|
return {
|
|
2146
2159
|
start,
|
|
@@ -2150,9 +2163,9 @@ var Tracer = class {
|
|
|
2150
2163
|
}
|
|
2151
2164
|
};
|
|
2152
2165
|
}
|
|
2153
|
-
_createEvent(
|
|
2166
|
+
_createEvent(id2, value) {
|
|
2154
2167
|
const event = {
|
|
2155
|
-
id,
|
|
2168
|
+
id: id2,
|
|
2156
2169
|
timestamp: Date.now()
|
|
2157
2170
|
};
|
|
2158
2171
|
if (value !== void 0) {
|
|
@@ -2567,6 +2580,7 @@ export {
|
|
|
2567
2580
|
hexToHue,
|
|
2568
2581
|
humanize,
|
|
2569
2582
|
hyphenize,
|
|
2583
|
+
id,
|
|
2570
2584
|
idEmoji,
|
|
2571
2585
|
idHue,
|
|
2572
2586
|
inferObjectOrder,
|
|
@@ -2581,6 +2595,8 @@ export {
|
|
|
2581
2595
|
isNonNullable,
|
|
2582
2596
|
isTauri,
|
|
2583
2597
|
isTruthy,
|
|
2598
|
+
isWellFormedId,
|
|
2599
|
+
isWellFormedIdPart,
|
|
2584
2600
|
joinTables,
|
|
2585
2601
|
jsonKeyReplacer,
|
|
2586
2602
|
jsonReplacer,
|