@dxos/util 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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/dist/lib/browser/index.mjs +34 -30
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +34 -30
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/circular-buffer.d.ts +1 -0
- package/dist/types/src/circular-buffer.d.ts.map +1 -1
- package/dist/types/src/deep.d.ts +0 -3
- package/dist/types/src/deep.d.ts.map +1 -1
- package/dist/types/src/platform.d.ts.map +1 -1
- package/dist/types/src/safe-parse.d.ts +1 -0
- package/dist/types/src/safe-parse.d.ts.map +1 -1
- package/dist/types/src/safe-stringify.d.ts +1 -1
- package/dist/types/src/safe-stringify.d.ts.map +1 -1
- package/dist/types/src/safe-stringify.test.d.ts +2 -0
- package/dist/types/src/safe-stringify.test.d.ts.map +1 -0
- package/dist/types/src/to-fallback.d.ts +18 -4
- package/dist/types/src/to-fallback.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +1 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -10
- package/src/circular-buffer.test.ts +26 -0
- package/src/circular-buffer.ts +5 -0
- package/src/deep.ts +0 -6
- package/src/platform.ts +28 -6
- package/src/safe-parse.ts +8 -0
- package/src/safe-stringify.test.ts +96 -0
- package/src/safe-stringify.ts +15 -8
- package/src/to-fallback.ts +39 -156
- package/src/types.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/array-to-hex.ts":{"bytes":2461,"imports":[],"format":"esm"},"src/array.ts":{"bytes":12000,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1335,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1302,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8453,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/callback-collection.ts":{"bytes":3170,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":5204,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4574,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6257,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1554,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":21712,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/deep.ts":{"bytes":4375,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3655,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":3002,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1347,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":785,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19761,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1489,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4222,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1819,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":3063,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3745,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13272,"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":12881,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":474,"imports":[],"format":"esm"},"src/object.ts":{"bytes":1070,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1598,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4971,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3648,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17195,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2499,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1303,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2611,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12812,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4560,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2843,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2680,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3395,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":12563,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7509,"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":3931,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5646,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":675,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1163,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":14062,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7225,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6250,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10382,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":8810,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1627,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":9591,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2111,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4961,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5340,"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/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/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/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/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"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":149665},"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":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","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","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","get","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","set","setDeep","sortKeys","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":1881},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":1113},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1523},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":4440},"src/deep.ts":{"bytesInOutput":773},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"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":784},"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":5433},"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/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":371},"src/safe-parse.ts":{"bytesInOutput":532},"src/safe-stringify.ts":{"bytesInOutput":2493},"src/sliding-window-summary.ts":{"bytesInOutput":1807},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":925},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":4324},"src/tracer.ts":{"bytesInOutput":1390},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2168},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":2054},"src/error-format.ts":{"bytesInOutput":366},"src/retry.ts":{"bytesInOutput":903}},"bytes":64037}}}
|
|
1
|
+
{"inputs":{"src/array-to-hex.ts":{"bytes":2461,"imports":[],"format":"esm"},"src/array.ts":{"bytes":12000,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1335,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1302,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8453,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/callback-collection.ts":{"bytes":3170,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":5204,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4574,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6562,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1554,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":21712,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/deep.ts":{"bytes":3819,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3655,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":3002,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1347,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":785,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19761,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1489,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4222,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1819,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":3063,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3745,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13272,"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":12881,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":474,"imports":[],"format":"esm"},"src/object.ts":{"bytes":1070,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1598,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4971,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3648,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17423,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2499,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1303,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2611,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12812,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4560,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2843,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2680,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3926,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":13339,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7509,"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":3931,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5646,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":675,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1163,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":12474,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7225,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6250,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10382,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":8810,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1627,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":9591,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2111,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4961,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5340,"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/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/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/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/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"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":149661},"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","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","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","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":1881},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":1113},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1592},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":4440},"src/deep.ts":{"bytesInOutput":713},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"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/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":1807},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":925},"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":2168},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":2054},"src/error-format.ts":{"bytesInOutput":366},"src/retry.ts":{"bytesInOutput":903}},"bytes":63169}}}
|
|
@@ -335,6 +335,10 @@ var CircularBuffer = class {
|
|
|
335
335
|
get elementCount() {
|
|
336
336
|
return this._elementCount;
|
|
337
337
|
}
|
|
338
|
+
clear() {
|
|
339
|
+
this._nextIndex = 0;
|
|
340
|
+
this._elementCount = 0;
|
|
341
|
+
}
|
|
338
342
|
getLast() {
|
|
339
343
|
if (this._elementCount === 0) {
|
|
340
344
|
return void 0;
|
|
@@ -568,14 +572,12 @@ var makeMap = (keyProjection) => class BoundComplexMap extends ComplexMap {
|
|
|
568
572
|
};
|
|
569
573
|
|
|
570
574
|
// src/deep.ts
|
|
571
|
-
import get from "lodash.get";
|
|
572
|
-
import set from "lodash.set";
|
|
573
575
|
import { invariant as invariant4 } from "@dxos/invariant";
|
|
574
576
|
var __dxlog_file4 = "/__w/dxos/dxos/packages/common/util/src/deep.ts";
|
|
575
577
|
var setDeep = (obj, path, value) => {
|
|
576
578
|
invariant4(path.length > 0, void 0, {
|
|
577
579
|
F: __dxlog_file4,
|
|
578
|
-
L:
|
|
580
|
+
L: 12,
|
|
579
581
|
S: void 0,
|
|
580
582
|
A: [
|
|
581
583
|
"path.length > 0",
|
|
@@ -1018,7 +1020,7 @@ var defaultMap = (map, key, def) => {
|
|
|
1018
1020
|
};
|
|
1019
1021
|
|
|
1020
1022
|
// src/instance-id.ts
|
|
1021
|
-
var symbol = Symbol.for("dxos.instance-contexts");
|
|
1023
|
+
var symbol = /* @__PURE__ */ Symbol.for("dxos.instance-contexts");
|
|
1022
1024
|
var instanceContexts = globalThis[symbol] ??= /* @__PURE__ */ new WeakMap();
|
|
1023
1025
|
var getPrototypeSpecificInstanceId = (instance) => {
|
|
1024
1026
|
const prototype = Object.getPrototypeOf(instance);
|
|
@@ -1400,7 +1402,7 @@ var iosCheck = () => {
|
|
|
1400
1402
|
};
|
|
1401
1403
|
var safariCheck = () => typeof navigator !== "undefined" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1402
1404
|
var getHostPlatform = () => {
|
|
1403
|
-
if (!("navigator" in
|
|
1405
|
+
if (!("navigator" in globalThis)) {
|
|
1404
1406
|
return "unknown";
|
|
1405
1407
|
}
|
|
1406
1408
|
const platform = (navigator.userAgentData?.platform || navigator.platform)?.toLowerCase();
|
|
@@ -1595,7 +1597,7 @@ var safeAwaitAll = async (source, taskFactory, onError) => {
|
|
|
1595
1597
|
};
|
|
1596
1598
|
|
|
1597
1599
|
// src/safe-instanceof.ts
|
|
1598
|
-
var instanceTag = Symbol("instanceTag");
|
|
1600
|
+
var instanceTag = /* @__PURE__ */ Symbol("instanceTag");
|
|
1599
1601
|
var safeInstanceof = (tag) => (target) => {
|
|
1600
1602
|
target.prototype[instanceTag] = tag;
|
|
1601
1603
|
Object.defineProperty(target.prototype, Symbol.hasInstance, {
|
|
@@ -1632,6 +1634,13 @@ var safeParseJson = (str, defaultValue) => {
|
|
|
1632
1634
|
}
|
|
1633
1635
|
return defaultValue;
|
|
1634
1636
|
};
|
|
1637
|
+
var safeUrl = (str) => {
|
|
1638
|
+
try {
|
|
1639
|
+
return new URL(str ?? "");
|
|
1640
|
+
} catch {
|
|
1641
|
+
return void 0;
|
|
1642
|
+
}
|
|
1643
|
+
};
|
|
1635
1644
|
|
|
1636
1645
|
// src/safe-stringify.ts
|
|
1637
1646
|
var SKIP = Object.freeze({});
|
|
@@ -1642,6 +1651,9 @@ function safeStringify(obj, filter = defaultFilter, indent = 2) {
|
|
|
1642
1651
|
let path = key;
|
|
1643
1652
|
if (!key) {
|
|
1644
1653
|
path = "$";
|
|
1654
|
+
if (value != null && typeof value === "object") {
|
|
1655
|
+
seen.set(value, path);
|
|
1656
|
+
}
|
|
1645
1657
|
return value;
|
|
1646
1658
|
} else if (this) {
|
|
1647
1659
|
const parentPath = seen.get(this);
|
|
@@ -1653,7 +1665,7 @@ function safeStringify(obj, filter = defaultFilter, indent = 2) {
|
|
|
1653
1665
|
if (typeof value === "function") {
|
|
1654
1666
|
return void 0;
|
|
1655
1667
|
}
|
|
1656
|
-
if (typeof value === "object" && Object.getPrototypeOf(value) !== Object.prototype) {
|
|
1668
|
+
if (typeof value === "object" && Object.getPrototypeOf(value) !== Object.prototype && !Array.isArray(value)) {
|
|
1657
1669
|
return void 0;
|
|
1658
1670
|
}
|
|
1659
1671
|
if (typeof value === "object" && value !== null) {
|
|
@@ -1674,7 +1686,11 @@ function safeStringify(obj, filter = defaultFilter, indent = 2) {
|
|
|
1674
1686
|
return `ERROR: ${error.message}`;
|
|
1675
1687
|
}
|
|
1676
1688
|
}
|
|
1677
|
-
|
|
1689
|
+
try {
|
|
1690
|
+
return JSON.stringify(obj, replacer, indent);
|
|
1691
|
+
} catch (error) {
|
|
1692
|
+
return `ERROR: ${error.message}`;
|
|
1693
|
+
}
|
|
1678
1694
|
}
|
|
1679
1695
|
var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen } = {}) => {
|
|
1680
1696
|
let currentDepth = 0;
|
|
@@ -1689,6 +1705,9 @@ var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen
|
|
|
1689
1705
|
if (typeof value === "function") {
|
|
1690
1706
|
return SKIP;
|
|
1691
1707
|
}
|
|
1708
|
+
if (maxArrayLen != null && Array.isArray(value) && value.length > maxArrayLen) {
|
|
1709
|
+
return `[length: ${value.length}]`;
|
|
1710
|
+
}
|
|
1692
1711
|
if (value && typeof value === "object") {
|
|
1693
1712
|
depthMap.set(value, currentDepth);
|
|
1694
1713
|
if (maxDepth != null && currentDepth >= maxDepth) {
|
|
@@ -1705,9 +1724,6 @@ var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen
|
|
|
1705
1724
|
return value;
|
|
1706
1725
|
}
|
|
1707
1726
|
}
|
|
1708
|
-
if (maxArrayLen != null && Array.isArray(value) && value.length > maxArrayLen) {
|
|
1709
|
-
return `[length: ${value.length}]`;
|
|
1710
|
-
}
|
|
1711
1727
|
if (maxStringLen != null && typeof value === "string" && value.length > maxStringLen) {
|
|
1712
1728
|
return value.slice(0, maxStringLen) + "...";
|
|
1713
1729
|
}
|
|
@@ -1834,18 +1850,6 @@ var throwUnhandledError = (error) => {
|
|
|
1834
1850
|
|
|
1835
1851
|
// src/to-fallback.ts
|
|
1836
1852
|
var idEmoji = [
|
|
1837
|
-
// When changing this set, please check the result in a console or e.g. RunKit (https://runkit.com/thure/642214441dd6ae000855a8de)
|
|
1838
|
-
// Emoji sometimes use a combination of code points, and some code points aren't visible on their own, so by adding or deleting you may unintentionally create non-visible items.
|
|
1839
|
-
// This set was chosen from the characters in Unicode Emoji v15.0 based on the following criteria:
|
|
1840
|
-
// – not people or isolated anthropomorphic faces
|
|
1841
|
-
// – not flags
|
|
1842
|
-
// – more concrete than abstract
|
|
1843
|
-
// – less culturally specific
|
|
1844
|
-
// – less easily confused with another emoji in the set
|
|
1845
|
-
// – requires less special knowledge to identify
|
|
1846
|
-
// – less likely to evoke negative feelings (no meat, no drugs, no weapons, etc)
|
|
1847
|
-
// – less common as a signifier in UX
|
|
1848
|
-
// NOTE that this is intentionally an array of strings because of the way emoji graphemes work.
|
|
1849
1853
|
"\u{1F47B}",
|
|
1850
1854
|
"\u{1F479}",
|
|
1851
1855
|
"\u{1F47D}",
|
|
@@ -1981,17 +1985,18 @@ var idEmoji = [
|
|
|
1981
1985
|
];
|
|
1982
1986
|
var idHue = [
|
|
1983
1987
|
"red",
|
|
1984
|
-
|
|
1988
|
+
"orange",
|
|
1985
1989
|
"amber",
|
|
1986
|
-
|
|
1990
|
+
"yellow",
|
|
1987
1991
|
"lime",
|
|
1988
1992
|
"green",
|
|
1989
1993
|
"emerald",
|
|
1990
1994
|
"teal",
|
|
1991
1995
|
"cyan",
|
|
1992
|
-
//
|
|
1993
|
-
// '
|
|
1994
|
-
// '
|
|
1996
|
+
// Omit colors similar to primary accent.
|
|
1997
|
+
// 'sky' as const,
|
|
1998
|
+
// 'blue' as const,
|
|
1999
|
+
// 'indigo' as const,
|
|
1995
2000
|
"violet",
|
|
1996
2001
|
"purple",
|
|
1997
2002
|
"fuchsia",
|
|
@@ -2470,7 +2475,6 @@ export {
|
|
|
2470
2475
|
exponentialBackoffInterval,
|
|
2471
2476
|
forEachAsync,
|
|
2472
2477
|
formatErrorWithCauses,
|
|
2473
|
-
get,
|
|
2474
2478
|
getAsyncProviderValue,
|
|
2475
2479
|
getDate,
|
|
2476
2480
|
getDebugName,
|
|
@@ -2534,7 +2538,7 @@ export {
|
|
|
2534
2538
|
safeParseInt,
|
|
2535
2539
|
safeParseJson,
|
|
2536
2540
|
safeStringify,
|
|
2537
|
-
|
|
2541
|
+
safeUrl,
|
|
2538
2542
|
setDeep,
|
|
2539
2543
|
sortKeys,
|
|
2540
2544
|
stringToArray,
|