@wovin/core 0.0.5 → 0.0.7
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/applog/applog-helpers.d.ts +4 -4
- package/dist/applog/applog-helpers.d.ts.map +1 -1
- package/dist/applog.min.js +1 -1
- package/dist/chunk-5O6HLH5H.min.js +2 -0
- package/dist/chunk-5O6HLH5H.min.js.map +1 -0
- package/dist/chunk-6WLDICQ6.min.js +2 -0
- package/dist/chunk-6WLDICQ6.min.js.map +1 -0
- package/dist/chunk-O7KDPKK2.min.js +2 -0
- package/dist/chunk-O7KDPKK2.min.js.map +1 -0
- package/dist/chunk-XQUJRFOK.min.js +45 -0
- package/dist/{chunk-FPUMKLJ4.min.js.map → chunk-XQUJRFOK.min.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/mobx/mobx-utils.d.ts +19 -12
- package/dist/mobx/mobx-utils.d.ts.map +1 -1
- package/dist/pubsub/publication.d.ts +2 -2
- package/dist/pubsub/publication.d.ts.map +1 -1
- package/dist/pubsub.min.js +1 -1
- package/dist/query/basic.d.ts +28 -26
- package/dist/query/basic.d.ts.map +1 -1
- package/dist/query/divergences.d.ts +5 -5
- package/dist/query/divergences.d.ts.map +1 -1
- package/dist/query.min.js +1 -1
- package/dist/thread/basic.d.ts +36 -0
- package/dist/thread/basic.d.ts.map +1 -0
- package/dist/thread/filters.d.ts +40 -0
- package/dist/thread/filters.d.ts.map +1 -0
- package/dist/thread/mapped.d.ts +19 -0
- package/dist/thread/mapped.d.ts.map +1 -0
- package/dist/thread/writeable.d.ts +17 -0
- package/dist/thread/writeable.d.ts.map +1 -0
- package/dist/thread.d.ts +5 -0
- package/dist/thread.d.ts.map +1 -0
- package/dist/thread.min.js +2 -0
- package/dist/types/typescript-utils.d.ts +2 -2
- package/dist/types/typescript-utils.d.ts.map +1 -1
- package/dist/types.min.js +1 -1
- package/package.json +83 -83
- package/dist/chunk-3DTRPG63.min.js +0 -2
- package/dist/chunk-3DTRPG63.min.js.map +0 -1
- package/dist/chunk-FPUMKLJ4.min.js +0 -45
- package/dist/chunk-MBXUXVXG.min.js +0 -2
- package/dist/chunk-MBXUXVXG.min.js.map +0 -1
- package/dist/chunk-PMJNK5VR.min.js +0 -2
- package/dist/chunk-PMJNK5VR.min.js.map +0 -1
- package/dist/stream/basic.d.ts +0 -36
- package/dist/stream/basic.d.ts.map +0 -1
- package/dist/stream/filters.d.ts +0 -38
- package/dist/stream/filters.d.ts.map +0 -1
- package/dist/stream/mapped.d.ts +0 -19
- package/dist/stream/mapped.d.ts.map +0 -1
- package/dist/stream/writeable.d.ts +0 -17
- package/dist/stream/writeable.d.ts.map +0 -1
- package/dist/stream.d.ts +0 -5
- package/dist/stream.d.ts.map +0 -1
- package/dist/stream.min.js +0 -2
- /package/dist/{stream.min.js.map → thread.min.js.map} +0 -0
package/dist/index.d.ts
CHANGED
package/dist/index.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-7IDQIMQO.min.js";import"./chunk-RPPZKO5L.min.js";import{a as
|
|
1
|
+
import"./chunk-7IDQIMQO.min.js";import"./chunk-RPPZKO5L.min.js";import{a as Io,b as Jo,c as Ko,d as Lo,e as Mo,f as No}from"./chunk-O7KDPKK2.min.js";import{a as Eo,b as Fo,c as Go,d as Ho}from"./chunk-J5PGGKKW.min.js";import{a as Oo,b as Po,c as Qo}from"./chunk-6WLDICQ6.min.js";import{a as Ro,b as So,c as Uo,d as Vo,e as Wo,f as Xo,g as Yo,h as Zo,i as _o,j as $o,k as or,l as rr}from"./chunk-5O6HLH5H.min.js";import{$ as W,A as l,Aa as Ao,B as q,Ba as Bo,C as u,Ca as Do,D as y,E as z,F as A,G as B,H as D,I as E,J as F,K as G,L as H,M as I,N as J,O as K,P as L,Q as M,R as N,S as O,T as P,U as Q,X as R,Y as S,Z as U,_ as V,aa as X,ba as Y,ca as Z,d as o,da as _,e as r,ea as xo,f as e,fa as fo,g as t,ga as mo,h as p,ha as no,i as x,ia as so,j as f,ja as co,k as m,ka as io,l as n,la as vo,m as s,ma as wo,n as c,na as Co,o as i,oa as To,p as v,pa as ao,q as w,qa as bo,r as C,ra as go,s as T,sa as ho,t as a,ta as jo,u as b,ua as ko,v as d,va as lo,w as g,wa as qo,x as h,xa as uo,y as j,ya as yo,z as k,za as zo}from"./chunk-XQUJRFOK.min.js";import{l as $,m as oo,n as ro,o as eo,p as to,q as po}from"./chunk-G3GOAFHU.min.js";var er=12345.78;export{X as AppLogTB,Y as AppLogTBC,_o as BOOL,Xo as Bool,V as CIDTB,or as DefaultFalse,$o as DefaultTrue,U as EntityID,S as EntityID_LENGTH,H as MappedThread,Zo as NUM,R as Nullable,Uo as Num,Vo as Obj,Wo as Opt,mo as QueryNode,no as QueryResult,Yo as STR,So as Str,F as Thread,fo as ThreadInMemory,Ro as ThreadTB,W as URL,xo as WriteableThread,T as actualize,No as agentToShortHash,bo as agentsOfThread,q as applogThreadComparer,x as areApplogsEqual,a as arrStats,g as arraysContainSameElements,Q as assertOnlyCurrent,P as assertRaw,A as autorunButAlsoImmediately,rr as checkParityTB,r as compareApplogsByTs,B as computedFnDeepCompare,l as computedStructuralComparer,j as createDebugName,k as createDebugNameObj,d as cyrb53hash,h as dateNowIso,Fo as decodeCar,Eo as decodeCarToApplogs,ro as encodeApplog,oo as encodeApplogAndGetCid,Ko as encodeApplogsAsCar,to as encodeBlock,po as encodeBlockOriginal,Jo as encodePubAsCar,go as entityOverlap,ho as entityOverlapCount,Co as filterAndMap,Z as getApplogTypeErrors,eo as getCidSync,m as getHashID,G as getLogsFromThread,N as getUntrackedFilterResults,L as getUntrackedPattern,uo as hasAg,O as hasFilter,zo as hasPv,yo as hasTs,Qo as includedIn,Po as includes,E as isInitEvent,Lo as isPublication,c as isStaticPattern,Mo as isSubscription,t as isTsBefore,_ as isValidApplog,n as isVariable,o as isoDateStrCompare,Do as joinThreads,so as lastWriteWins,Ho as makeCarBlob,Go as makeCarOut,M as makeFilter,jo as mapTo,w as matchPart,v as matchPartStatic,C as matchPattern,y as observableArrayMap,z as observableMapMap,qo as prefixAt,lo as prefixAttrs,$ as prepareForPub,Io as preparePubForPush,D as prettifyThreadName,io as query,To as queryAndMap,Oo as queryDivergencesByPrev,ao as queryEntity,u as queryNodesComparer,wo as queryNot,vo as queryStep,f as removeDuplicateAppLogs,i as resolveOrRemoveVariables,K as rollingAcc,I as rollingFilter,J as rollingMapper,e as sortApplogsByTs,ko as startsWith,b as tsNearlySame,p as uniqueEnFromAppLogs,s as variableNameWithoutQuestionmark,Bo as withPv,Ao as withTs,co as withoutDeleted,er as wovinCoreTest};
|
|
2
2
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const wovinCoreTest = 12345.78\n\nexport * from './applog'\nexport * from './ipfs'\nexport * from './pubsub'\nexport * from './query'\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const wovinCoreTest = 12345.78\n\nexport * from './applog'\nexport * from './ipfs'\nexport * from './pubsub'\nexport * from './query'\nexport * from './thread'\nexport * from './types'\n// export * from './utils'\n"],"mappings":"6mCAAO,IAAMA,GAAgB","names":["wovinCoreTest"]}
|
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import { comparer, IComputedValue, IObservableArray } from 'mobx';
|
|
1
|
+
import { comparer, IComputedValue, IObservableArray, ObservableMap } from 'mobx';
|
|
2
2
|
import { IComputedFnOptions } from 'mobx-utils/lib/computedFn';
|
|
3
3
|
import { DatalogQueryPattern } from '../applog/datom-types';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export declare const createDebugName: ({ caller,
|
|
4
|
+
import { QueryResult } from '../query/basic';
|
|
5
|
+
import { Thread } from '../thread';
|
|
6
|
+
export declare const createDebugName: ({ caller, thread, pattern, args }: {
|
|
7
7
|
caller?: string;
|
|
8
|
-
|
|
9
|
-
pattern?: DatalogQueryPattern | string;
|
|
8
|
+
thread?: Thread;
|
|
9
|
+
pattern?: DatalogQueryPattern | DatalogQueryPattern[] | string;
|
|
10
|
+
args?: any;
|
|
10
11
|
}) => string;
|
|
11
12
|
export declare const createDebugNameObj: (args: Parameters<typeof createDebugName>[0]) => {
|
|
12
13
|
readonly name: string;
|
|
13
14
|
};
|
|
14
15
|
export declare function computedStructuralComparer<T>(a: IComputedValue<T>, b: IComputedValue<T>): boolean;
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function queryNodesComparer(a:
|
|
16
|
+
export declare function applogThreadComparer(a: Thread, b: Thread): boolean;
|
|
17
|
+
export declare function queryNodesComparer(a: QueryResult, b: QueryResult): boolean;
|
|
17
18
|
export declare function observableArrayMap<T>(fn: () => T[], { name, equals }?: {
|
|
18
19
|
name?: string;
|
|
19
20
|
equals?: typeof comparer.structural;
|
|
20
21
|
}): IObservableArray<T>;
|
|
22
|
+
export declare function observableMapMap<K, V>(fn: () => Array<readonly [K, V]>, { name, equals }?: {
|
|
23
|
+
name?: string;
|
|
24
|
+
equals?: typeof comparer.structural;
|
|
25
|
+
}): ObservableMap<K, V>;
|
|
26
|
+
export declare function autorunButAlsoImmediately<T>(fn: () => T, init: (T: any) => any, update: (T: any) => any, { name }?: {
|
|
27
|
+
name?: string;
|
|
28
|
+
}): () => void;
|
|
21
29
|
/**
|
|
22
30
|
* ADAPTED from https://github.com/mobxjs/mobx-utils/blob/362cbbfb384820d416f253eddc532ebecba89bcb/src/computedFn.ts#L50 to
|
|
23
31
|
* - deep-compare arguments
|
|
24
32
|
* - allow dynamic/optional args
|
|
25
33
|
* - not be so friggin complicated... DeepMap... closest... why?!
|
|
26
34
|
*
|
|
27
|
-
* // TODO: PR
|
|
35
|
+
* // TODO: PR upthread
|
|
28
36
|
*
|
|
29
37
|
* computedFnDeepCompare takes a function with an arbitrary amount of arguments,
|
|
30
38
|
* and memoizes the output of the function based on the arguments passed in.
|
|
@@ -59,9 +67,8 @@ export declare function observableArrayMap<T>(fn: () => T[], { name, equals }?:
|
|
|
59
67
|
* @param fn
|
|
60
68
|
* @param keepAliveOrOptions
|
|
61
69
|
*/
|
|
62
|
-
export declare function computedFnDeepCompare<T extends (...args: any[]) => any>(fn: T, keepAliveOrOptions?: (IComputedFnOptions<T> & {
|
|
63
|
-
name?: string;
|
|
70
|
+
export declare function computedFnDeepCompare<T extends (...args: any[]) => any>(name: string, fn: T, keepAliveOrOptions?: (IComputedFnOptions<T> & {
|
|
64
71
|
argsDebugName?: (...args: Parameters<T>) => string;
|
|
65
72
|
}) | boolean): T;
|
|
66
|
-
export declare function
|
|
73
|
+
export declare function prettifyThreadName(input: string): string;
|
|
67
74
|
//# sourceMappingURL=mobx-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobx-utils.d.ts","sourceRoot":"","sources":["../../src/mobx/mobx-utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"mobx-utils.d.ts","sourceRoot":"","sources":["../../src/mobx/mobx-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,QAAQ,EAOR,cAAc,EACd,gBAAgB,EAGhB,aAAa,EAQb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAyClC,eAAO,MAAM,eAAe;aAClB,MAAM;aACN,MAAM;cACL,mBAAmB,GAAG,mBAAmB,EAAE,GAAG,MAAM;WACvD,GAAG;YAOV,CAAA;AACD,eAAO,MAAM,kBAAkB,SAAU,WAAW,sBAAsB,CAAC,CAAC,CAAC,CAAC;;CAE7E,CAAA;A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AAkB,CAAC,CAAC,CAAC,GAAG;IAAE,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;CAAE,CAAC,GAAG,OAAe,GACpH,CAAC,CAqEH;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgCxD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Applog } from '../applog/datom-types';
|
|
2
|
-
import {
|
|
2
|
+
import { ApplogsOrThread, Thread } from '../thread';
|
|
3
3
|
import { AppAgent, IPublication } from './pubsub-types';
|
|
4
|
-
export declare function preparePubForPush(agent: AppAgent,
|
|
4
|
+
export declare function preparePubForPush(agent: AppAgent, appThread: Thread, threadToPublish: ApplogsOrThread, publication: IPublication): Promise<Blob>;
|
|
5
5
|
/**
|
|
6
6
|
* @param applogs Encrypted or plain applogs
|
|
7
7
|
* @returns Car file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../src/pubsub/publication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAA6B,MAAM,uBAAuB,CAAA;AAIzE,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../src/pubsub/publication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAA6B,MAAM,uBAAuB,CAAA;AAIzE,OAAO,EAAE,eAAe,EAAqB,MAAM,EAAE,MAAM,WAAW,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAWvD,wBAAsB,iBAAiB,CACtC,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,YAAY,iBA4EzB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CACnC,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,MAAM,EAAE,EAClD,QAAQ,EAAE,SAAS,MAAM,EAAE,iBAqB3B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,MAAM,EAAE,iBAQlD"}
|
package/dist/pubsub.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-O7KDPKK2.min.js";import"./chunk-J5PGGKKW.min.js";import"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{f as agentToShortHash,c as encodeApplogsAsCar,b as encodePubAsCar,d as isPublication,e as isSubscription,a as preparePubForPush};
|
|
2
2
|
//# sourceMappingURL=pubsub.min.js.map
|
package/dist/query/basic.d.ts
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import { Applog, ApplogValue, DatalogQueryPattern, EntityID, SearchContext } from '../applog/datom-types';
|
|
2
|
-
import {
|
|
2
|
+
import { Thread } from '../thread';
|
|
3
3
|
export declare class QueryNode {
|
|
4
|
-
logsOfThisNode:
|
|
5
|
-
variables: SearchContext;
|
|
6
|
-
|
|
7
|
-
constructor(logsOfThisNode:
|
|
4
|
+
readonly logsOfThisNode: Thread;
|
|
5
|
+
readonly variables: SearchContext;
|
|
6
|
+
readonly prevNode: QueryNode | null;
|
|
7
|
+
constructor(logsOfThisNode: Thread, variables: SearchContext, prevNode?: QueryNode | null);
|
|
8
8
|
get record(): SearchContext;
|
|
9
|
-
get
|
|
9
|
+
get threadOfTrail(): Thread;
|
|
10
|
+
get trailLogs(): any;
|
|
10
11
|
}
|
|
11
|
-
export declare class
|
|
12
|
+
export declare class QueryResult {
|
|
12
13
|
nodes: Array<QueryNode>;
|
|
13
14
|
constructor(nodes: Array<QueryNode>);
|
|
14
15
|
get size(): number;
|
|
15
16
|
get isEmpty(): boolean;
|
|
16
17
|
get untrackedSize(): number;
|
|
17
18
|
get records(): SearchContext[];
|
|
18
|
-
get
|
|
19
|
-
get
|
|
20
|
-
get
|
|
19
|
+
get leafNodeLogs(): (readonly Applog[])[];
|
|
20
|
+
get threadOfAllTrails(): Thread;
|
|
21
|
+
get thread(): Thread;
|
|
22
|
+
get allApplogs(): readonly Applog[];
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Keep only the latest logs for each en&at (= last write wins)
|
|
24
26
|
*/
|
|
25
|
-
export declare const
|
|
27
|
+
export declare const lastWriteWins: (thread: Thread, { inverseToOnlyReturnFirstLogs, tolerateAlreadyFiltered }?: {
|
|
26
28
|
inverseToOnlyReturnFirstLogs?: boolean;
|
|
27
29
|
tolerateAlreadyFiltered?: boolean;
|
|
28
|
-
}) =>
|
|
30
|
+
}) => Thread;
|
|
29
31
|
/**
|
|
30
32
|
* Remove all applogs for entities that have an applog: { at: `isDeleted`, val: true }
|
|
31
|
-
* ! WARNING: If not based on
|
|
33
|
+
* ! WARNING: If not based on lastWriteWins, it will not respect un-deletions yet (isDeleted: false)
|
|
32
34
|
*/
|
|
33
|
-
export declare const withoutDeleted: (
|
|
34
|
-
export declare const query: (
|
|
35
|
+
export declare const withoutDeleted: (thread: Thread) => import("../thread").MappedThread;
|
|
36
|
+
export declare const query: (thread: Thread, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], startVariables?: SearchContext, opts?: {
|
|
35
37
|
debug?: boolean;
|
|
36
|
-
}) =>
|
|
37
|
-
export declare const queryStep: (
|
|
38
|
+
}) => QueryResult;
|
|
39
|
+
export declare const queryStep: (thread: Thread, nodeSet: QueryResult | null, pattern: DatalogQueryPattern, opts?: {
|
|
38
40
|
debug?: boolean;
|
|
39
|
-
}) =>
|
|
40
|
-
export declare const queryNot: (
|
|
41
|
+
}) => QueryResult;
|
|
42
|
+
export declare const queryNot: (thread: Thread, startNodes: QueryResult, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], opts?: {
|
|
41
43
|
debug?: boolean;
|
|
42
|
-
}) =>
|
|
43
|
-
export declare const filterAndMap: <R>(
|
|
44
|
+
}) => QueryResult;
|
|
45
|
+
export declare const filterAndMap: <R>(thread: Thread, pattern: DatalogQueryPattern, mapper: keyof Applog | Partial<{
|
|
44
46
|
cid: string;
|
|
45
47
|
pv?: string;
|
|
46
48
|
ts: string;
|
|
@@ -49,13 +51,13 @@ export declare const filterAndMap: <R>(stream: ApplogStream, pattern: DatalogQue
|
|
|
49
51
|
at: string;
|
|
50
52
|
vl: string;
|
|
51
53
|
}> | ((applog: Applog) => R)) => import("mobx").IObservableArray<any>;
|
|
52
|
-
export declare const queryAndMap: <R>(
|
|
53
|
-
export declare const queryEntity: <R>(
|
|
54
|
+
export declare const queryAndMap: <R>(thread: Thread, patternOrPatterns: DatalogQueryPattern | DatalogQueryPattern[], map: string | ((record: SearchContext) => R), variables?: SearchContext) => import("mobx").IObservableArray<any>;
|
|
55
|
+
export declare const queryEntity: <R>(thread: Thread, name: string, entityID: EntityID, attributes: string[]) => import("mobx").IComputedValue<{
|
|
54
56
|
[k: string]: ApplogValue;
|
|
55
57
|
}>;
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const entityOverlap: (
|
|
58
|
-
export declare const entityOverlapCount: (
|
|
58
|
+
export declare const agentsOfThread: <R>(thread: Thread) => import("mobx").ObservableMap<string, number>;
|
|
59
|
+
export declare const entityOverlap: (threadA: Thread, threadB: Thread) => import("mobx").IComputedValue<string[]>;
|
|
60
|
+
export declare const entityOverlapCount: (threadA: Thread, threadB: Thread) => import("mobx").IComputedValue<number>;
|
|
59
61
|
export declare function mapTo(applogFieldMap: Partial<{
|
|
60
62
|
[key in keyof Applog]: string;
|
|
61
63
|
}>): (applog: any) => SearchContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/query/basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,m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F,eAAO,MAAM,SAAS,WACb,MAAM,WACL,WAAW,GAAG,IAAI,WAClB,mBAAmB,SAEtB;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,gBAgE+G,CAAA;AAEzI,eAAO,MAAM,QAAQ,WACZ,MAAM,cACF,WAAW,qBACJ,mBAAmB,GAAG,mBAAmB,EAAE,SACxD;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,gBAoB6G,CAAA;AA8BvI,eAAO,MAAM,YAAY,cAChB,MAAM,WACL,mBAAmB;;;;;;;;eACsD,MAAM,gDAqB4C,CAAA;AAErI,eAAO,MAAM,WAAW,cACf,MAAM,qBACK,mBAAmB,GAAG,mBAAmB,EAAE,0BACtC,aAAa,qBAC1B,aAAa,yCAqB2G,CAAA;AAEpI,eAAO,MAAM,WAAW,cACf,MAAM,QACR,MAAM,YACF,QAAQ,cACN,MAAM,EAAE;;EAcnB,CAAA;AAEF,eAAO,MAAM,cAAc,cAClB,MAAM,iDAsBb,CAAA;AAEF,eAAO,MAAM,aAAa,YAChB,MAAM,WACN,MAAM,4CASd,CAAA;AAEF,eAAO,MAAM,kBAAkB,YAEO,MAAM,WAAW,MAAM,0CAG5D,CAAA;AAMD,wBAAgB,KAAK,CAAC,cAAc,EAAE,OAAO,CAAC;KAAG,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM;CAAE,CAAC,kCAO/E;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,uBAErC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAE1D;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAEpD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Applog } from '../applog/datom-types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Thread } from '../thread';
|
|
3
|
+
import { ThreadInMemory } from '../thread/writeable';
|
|
4
4
|
export interface DivergenceLeaf {
|
|
5
5
|
log: Applog;
|
|
6
|
-
|
|
6
|
+
thread: Thread;
|
|
7
7
|
}
|
|
8
|
-
export declare const queryDivergencesByPrev: (
|
|
8
|
+
export declare const queryDivergencesByPrev: (sourceThread: Thread) => import("mobx").IObservableArray<{
|
|
9
9
|
log: Applog;
|
|
10
|
-
|
|
10
|
+
thread: ThreadInMemory;
|
|
11
11
|
}>;
|
|
12
12
|
//# sourceMappingURL=divergences.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divergences.d.ts","sourceRoot":"","sources":["../../src/query/divergences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"divergences.d.ts","sourceRoot":"","sources":["../../src/query/divergences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIpD,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,sBAAsB,iBACpB,MAAM;;;EAqCc,CAAA"}
|
package/dist/query.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as B,b as C,c as D}from"./chunk-6WLDICQ6.min.js";import{A as c,B as d,C as e,D as f,E as g,F as h,G as i,H as j,ga as k,ha as l,ia as m,ja as n,ka as o,la as p,ma as q,na as r,oa as s,pa as t,qa as u,ra as v,sa as w,ta as x,ua as y,va as z,wa as A,y as a,z as b}from"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{k as QueryNode,l as QueryResult,u as agentsOfThread,d as applogThreadComparer,h as autorunButAlsoImmediately,i as computedFnDeepCompare,c as computedStructuralComparer,a as createDebugName,b as createDebugNameObj,v as entityOverlap,w as entityOverlapCount,r as filterAndMap,D as includedIn,C as includes,m as lastWriteWins,x as mapTo,f as observableArrayMap,g as observableMapMap,A as prefixAt,z as prefixAttrs,j as prettifyThreadName,o as query,s as queryAndMap,B as queryDivergencesByPrev,t as queryEntity,e as queryNodesComparer,q as queryNot,p as queryStep,y as startsWith,n as withoutDeleted};
|
|
2
2
|
//# sourceMappingURL=query.min.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type Applog, ApplogForInsert } from '../applog/datom-types';
|
|
2
|
+
export type ThreadEvent = {
|
|
3
|
+
added: readonly Applog[];
|
|
4
|
+
removed: readonly Applog[] | null;
|
|
5
|
+
} | {
|
|
6
|
+
init: readonly Applog[];
|
|
7
|
+
};
|
|
8
|
+
export declare function isInitEvent(event: ThreadEvent): event is {
|
|
9
|
+
init: readonly Applog[];
|
|
10
|
+
};
|
|
11
|
+
export type ApplogsOrThread = Thread | readonly Applog[];
|
|
12
|
+
export declare abstract class Thread {
|
|
13
|
+
protected _applogs: Applog[];
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly filters: string[];
|
|
16
|
+
readonly parents: Thread[] | null;
|
|
17
|
+
protected _subscribers: ((event: ThreadEvent) => void)[];
|
|
18
|
+
constructor(parents: Thread | Thread[] | null, filters: string[], _applogs: Applog[], name: string);
|
|
19
|
+
abstract get readOnly(): boolean;
|
|
20
|
+
subscribe(callback: (event: ThreadEvent) => void): () => void;
|
|
21
|
+
unsubscribe(callback: (event: ThreadEvent) => void): void;
|
|
22
|
+
protected notifySubscribers(event: ThreadEvent): void;
|
|
23
|
+
get applogs(): readonly Applog[];
|
|
24
|
+
map<R>(fn: (applog: Applog) => R): R[];
|
|
25
|
+
get firstLog(): Applog;
|
|
26
|
+
get latestLog(): Applog;
|
|
27
|
+
hasApplog(applog: Applog, byRef: boolean): boolean;
|
|
28
|
+
hasApplogWithDiffTs(applog: ApplogForInsert): Applog;
|
|
29
|
+
get isEmpty(): boolean;
|
|
30
|
+
get size(): number;
|
|
31
|
+
get untrackedSize(): number;
|
|
32
|
+
get nameAndSizeUntracked(): string;
|
|
33
|
+
get prettyName(): string;
|
|
34
|
+
}
|
|
35
|
+
export declare const getLogsFromThread: (logsOrThread: ApplogsOrThread) => readonly Applog[];
|
|
36
|
+
//# sourceMappingURL=basic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/thread/basic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAKpE,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAA;AACvH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,IAAI;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAEpF;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;AAExD,8BAAsB,MAAM;IAQ1B,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM;IARtB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IACjC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,EAAE,CAAK;gBAG5D,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EACjC,OAAO,EAAE,MAAM,EAAE,EACP,QAAQ,EAAE,MAAM,EAAO,EACxB,IAAI,EAAE,MAAM;IAiBtB,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAA;IAEhC,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI;IAKhD,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI;IAOlD,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,WAAW;IAO9C,IAAI,OAAO,IAAI,SAAS,MAAM,EAAE,CAG/B;IAEM,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC;IAKvC,IAAI,QAAQ,WAEX;IACD,IAAI,SAAS,WAEZ;IACM,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAcxC,mBAAmB,CAAC,MAAM,EAAE,eAAe;IAUlD,IAAI,OAAO,YAEV;IACD,IAAI,IAAI,WAEP;IACD,IAAI,aAAa,WAEhB;IACD,IAAI,oBAAoB,WAEvB;IACD,IAAI,UAAU,WAEb;CACD;AAED,eAAO,MAAM,iBAAiB,iBAAkB,eAAe,sBAAyE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IObservableArray, ObservableMap, ObservableSet } from 'mobx';
|
|
2
|
+
import { Applog, ApplogValue, DatalogQueryPattern } from '../applog/datom-types';
|
|
3
|
+
import { Thread, ThreadEvent } from './basic';
|
|
4
|
+
import { ApplogEventMapper, MappedThread } from './mapped';
|
|
5
|
+
export declare const rollingFilter: (thread: Thread, pattern: DatalogQueryPattern, opts?: {
|
|
6
|
+
name?: string;
|
|
7
|
+
extraFilterName?: string;
|
|
8
|
+
}) => MappedThread;
|
|
9
|
+
export declare const rollingMapper: (thread: Thread, eventMapper: ApplogEventMapper, opts?: {
|
|
10
|
+
name?: string;
|
|
11
|
+
extraFilterName?: string;
|
|
12
|
+
}) => MappedThread;
|
|
13
|
+
export declare const rollingAcc: <ACC extends IObservableArray<any> | ObservableMap<any, any> | ObservableSet<any>>(thread: Thread, acc: ACC, eventMapper: (event: ThreadEvent, acc: ACC) => void, opts?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
}) => ACC;
|
|
16
|
+
export declare const getUntrackedPattern: (pattern: DatalogQueryPattern) => {
|
|
17
|
+
[k: string]: string | boolean | Number | import("../applog/datom-types").CidString | readonly import("../applog/datom-types").CidString[] | ((value: import("../applog/datom-types").CidString) => boolean) | readonly string[] | ((value: string) => boolean) | import("../applog/datom-types").AgentHash | readonly import("../applog/datom-types").AgentHash[] | ((value: import("../applog/datom-types").AgentHash) => boolean) | readonly ApplogValue[] | ((value: ApplogValue) => boolean);
|
|
18
|
+
};
|
|
19
|
+
export declare function makeFilter(pattern: DatalogQueryPattern): (logs: readonly Applog[]) => Applog[];
|
|
20
|
+
/**
|
|
21
|
+
* // ! think twice before using
|
|
22
|
+
*/
|
|
23
|
+
export declare const getUntrackedFilterResults: (thread: Thread, pattern: DatalogQueryPattern, opts?: {
|
|
24
|
+
name?: string;
|
|
25
|
+
}) => Applog[];
|
|
26
|
+
export type ThreadWithFilter<T extends string> = Thread & {
|
|
27
|
+
filters: T[];
|
|
28
|
+
};
|
|
29
|
+
export declare function hasFilter<T extends string>(thread: Thread, filter: T): thread is ThreadWithFilter<T>;
|
|
30
|
+
export declare function assertRaw(thread: Thread): ThreadWithoutFilters;
|
|
31
|
+
export declare function assertOnlyCurrent(thread: Thread): Thread & {
|
|
32
|
+
filters: "lastWriteWins"[];
|
|
33
|
+
} & {
|
|
34
|
+
filters: "withoutDeleted"[];
|
|
35
|
+
};
|
|
36
|
+
export type ThreadOnlyCurrent = ThreadWithFilter<'lastWriteWins' | 'withoutDeleted'>;
|
|
37
|
+
export type ThreadWithoutFilters = Thread & {
|
|
38
|
+
filters: [];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","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I,gBAAgB,CAAC,CAAC,CAAC,CAEpG;AACD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,wBAKvC;AACD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM;;;;EAM/C;AACD,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,eAAe,GAAG,gBAAgB,CAAC,CAAA;AACpF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Applog } from '../applog/datom-types';
|
|
2
|
+
import { Thread, ThreadEvent } from './basic';
|
|
3
|
+
export type ApplogEventMapper = (this: MappedThread, event: ThreadEvent, sourceThread: Thread) => ThreadEvent;
|
|
4
|
+
export declare class MappedThread extends Thread {
|
|
5
|
+
readonly _initialLogs: readonly Applog[];
|
|
6
|
+
private _eventMapper;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
private _parentSubscriptions;
|
|
9
|
+
constructor(parents: Thread | Thread[], filters: string[], _initialLogs: readonly Applog[], _eventMapper: ApplogEventMapper, name: string);
|
|
10
|
+
get readOnly(): boolean;
|
|
11
|
+
private subscribeToParent;
|
|
12
|
+
/**
|
|
13
|
+
* // HACK to trigger remap on pattern change in rollingFilter
|
|
14
|
+
* should not be used lightly
|
|
15
|
+
*/
|
|
16
|
+
triggerRemap(): void;
|
|
17
|
+
protected onParentUpdate(thread: Thread, event: ThreadEvent): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=mapped.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapped.d.ts","sourceRoot":"","sources":["../../src/thread/mapped.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAe,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,KAAK,WAAW,CAAA;AAE7G,qBAAa,YAAa,SAAQ,MAAM;IAMtC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE;IACxC,OAAO,CAAC,YAAY;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAPtB,OAAO,CAAC,oBAAoB,CAAyD;gBAGpF,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,MAAM,EAAE,EACR,YAAY,EAAE,SAAS,MAAM,EAAE,EAChC,YAAY,EAAE,iBAAiB,EAC9B,IAAI,EAAE,MAAM;IAkBtB,IAAI,QAAQ,YAGX;IAED,OAAO,CAAC,iBAAiB;IA0BzB;;;OAGG;IACH,YAAY;IAOZ,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;CA8B3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Applog, ApplogForInsert } from '../applog/datom-types';
|
|
2
|
+
import { Thread } from './basic';
|
|
3
|
+
export declare abstract class WriteableThread extends Thread {
|
|
4
|
+
constructor(parents: Thread | Thread[] | null, filters: string[], applogs: Applog[], name: string);
|
|
5
|
+
insert(appLogsToInsert: ApplogForInsert[]): Applog[];
|
|
6
|
+
get readOnly(): boolean;
|
|
7
|
+
protected abstract persist(logs: Applog[]): any;
|
|
8
|
+
}
|
|
9
|
+
export declare class ThreadInMemory extends WriteableThread {
|
|
10
|
+
readonly _readOnly: boolean;
|
|
11
|
+
static empty(name?: string): ThreadInMemory;
|
|
12
|
+
static fromArray(applogs: Applog[], name?: string, readOnly?: boolean): ThreadInMemory;
|
|
13
|
+
constructor(applogs: Applog[], filters: string[], name: string, _readOnly: boolean, parents?: Thread | Thread[] | null);
|
|
14
|
+
get readOnly(): boolean;
|
|
15
|
+
protected persist(logs: Applog[]): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=writeable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeable.d.ts","sourceRoot":"","sources":["../../src/thread/writeable.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAAE,eAAe,EAAsC,MAAM,uBAAuB,CAAA;AAExG,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIhC,8BAAsB,eAAgB,SAAQ,MAAM;gBAElD,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EACjC,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAO,EACtB,IAAI,EAAE,MAAM;IASN,MAAM,CAAC,eAAe,EAAE,eAAe,EAAE;IAoChD,IAAI,QAAQ,YAEX;IAED,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;CACzC;AACD,qBAAa,cAAe,SAAQ,eAAe;IAYjD,QAAQ,CAAC,SAAS,EAAE,OAAO;IAX5B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM;IAG1B,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,UAAQ;gBAKlE,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,MAAM,EACH,SAAS,EAAE,OAAO,EAC3B,OAAO,GAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAW;IAUzC,IAAI,QAAQ,YAEX;IAED,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE;CAMhC"}
|
package/dist/thread.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{I as a,J as b,K as c,L as d,M as e,N as f,O as g,P as h,Q as i,R as j,S as k,T as l,U as m,ea as n,fa as o}from"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{d as MappedThread,b as Thread,o as ThreadInMemory,n as WriteableThread,m as assertOnlyCurrent,l as assertRaw,c as getLogsFromThread,j as getUntrackedFilterResults,h as getUntrackedPattern,k as hasFilter,a as isInitEvent,i as makeFilter,g as rollingAcc,e as rollingFilter,f as rollingMapper};
|
|
2
|
+
//# sourceMappingURL=thread.min.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type as T } from '@sinclair/typebox';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { Thread } from '../thread';
|
|
3
|
+
export declare const ThreadTB: import("@sinclair/typebox").TUnsafe<Thread>;
|
|
4
4
|
declare const StringTB: (options?: import("@sinclair/typebox").StringOptions) => import("@sinclair/typebox").TString, OptionalTB: <T extends import("@sinclair/typebox").TSchema>(schema: T) => import("@sinclair/typebox").TOptional<T>, BooleanTB: (options?: import("@sinclair/typebox").SchemaOptions) => import("@sinclair/typebox").TBoolean, ObjectTB: <T extends import("@sinclair/typebox").TProperties>(properties: T, options?: import("@sinclair/typebox").ObjectOptions) => import("@sinclair/typebox").TObject<T>, NumberTB: (options?: import("@sinclair/typebox").NumericOptions<number>) => import("@sinclair/typebox").TNumber;
|
|
5
5
|
export declare const Str: typeof StringTB;
|
|
6
6
|
export declare const Num: typeof NumberTB;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-utils.d.ts","sourceRoot":"","sources":["../../src/types/typescript-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"typ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,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC9E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAExF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,KAAK,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAU9C,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,SAAS,SAAS,CAAC,GAAG,OAAO,EAAE,EAAE,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAEtH,wBAAgB,aAAa,SAS5B;AAED,uEAAuE;AACvE,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAA"}
|
package/dist/types.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-5O6HLH5H.min.js";import"./chunk-XQUJRFOK.min.js";import"./chunk-G3GOAFHU.min.js";export{i as BOOL,f as Bool,k as DefaultFalse,j as DefaultTrue,h as NUM,c as Num,d as Obj,e as Opt,g as STR,b as Str,a as ThreadTB,l as checkParityTB};
|
|
2
2
|
//# sourceMappingURL=types.min.js.map
|