atom.io 0.33.1 → 0.33.3

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.
Files changed (116) hide show
  1. package/dist/data/index.d.ts +3 -3
  2. package/dist/data/index.d.ts.map +1 -1
  3. package/dist/data/index.js.map +1 -1
  4. package/dist/eslint-plugin/index.d.ts.map +1 -1
  5. package/dist/internal/index.d.ts +111 -54
  6. package/dist/internal/index.d.ts.map +1 -1
  7. package/dist/internal/index.js +381 -128
  8. package/dist/internal/index.js.map +1 -1
  9. package/dist/introspection/index.d.ts +10 -10
  10. package/dist/introspection/index.d.ts.map +1 -1
  11. package/dist/introspection/index.js +4 -4
  12. package/dist/introspection/index.js.map +1 -1
  13. package/dist/json/index.d.ts +3 -3
  14. package/dist/json/index.d.ts.map +1 -1
  15. package/dist/json/index.js +2 -2
  16. package/dist/json/index.js.map +1 -1
  17. package/dist/main/index.d.ts +155 -36
  18. package/dist/main/index.d.ts.map +1 -1
  19. package/dist/main/index.js +15 -3
  20. package/dist/main/index.js.map +1 -1
  21. package/dist/react/index.d.ts.map +1 -1
  22. package/dist/{devtools-Jyn42mZm.css → react-devtools/index.css} +1 -1
  23. package/dist/react-devtools/index.css.map +1 -0
  24. package/dist/react-devtools/index.d.ts +0 -1
  25. package/dist/react-devtools/index.d.ts.map +1 -1
  26. package/dist/react-devtools/index.js +8 -3
  27. package/dist/react-devtools/index.js.map +1 -1
  28. package/dist/realtime/index.d.ts +2 -2
  29. package/dist/realtime/index.d.ts.map +1 -1
  30. package/dist/realtime/index.js.map +1 -1
  31. package/dist/realtime-client/index.d.ts +1 -1
  32. package/dist/realtime-client/index.d.ts.map +1 -1
  33. package/dist/realtime-client/index.js.map +1 -1
  34. package/dist/realtime-react/index.d.ts.map +1 -1
  35. package/dist/realtime-react/index.js.map +1 -1
  36. package/dist/realtime-server/index.d.ts +2 -2
  37. package/dist/realtime-server/index.d.ts.map +1 -1
  38. package/dist/realtime-server/index.js.map +1 -1
  39. package/dist/realtime-testing/index.d.ts.map +1 -1
  40. package/dist/transceivers/set-rtx/index.d.ts.map +1 -1
  41. package/dist/web/index.d.ts.map +1 -1
  42. package/package.json +21 -21
  43. package/src/data/dict.ts +5 -5
  44. package/src/data/struct-family.ts +2 -2
  45. package/src/data/struct.ts +1 -1
  46. package/src/internal/atom/create-regular-atom.ts +14 -17
  47. package/src/internal/caching.ts +1 -1
  48. package/src/internal/families/create-readonly-held-selector-family.ts +81 -0
  49. package/src/internal/families/{create-readonly-selector-family.ts → create-readonly-pure-selector-family.ts} +26 -23
  50. package/src/internal/families/create-selector-family.ts +39 -16
  51. package/src/internal/families/create-writable-held-selector-family.ts +80 -0
  52. package/src/internal/families/{create-writable-selector-family.ts → create-writable-pure-selector-family.ts} +26 -23
  53. package/src/internal/families/dispose-from-store.ts +4 -2
  54. package/src/internal/families/find-in-store.ts +8 -8
  55. package/src/internal/families/get-family-of-token.ts +8 -8
  56. package/src/internal/families/index.ts +3 -3
  57. package/src/internal/families/init-family-member.ts +12 -10
  58. package/src/internal/families/seek-in-store.ts +13 -11
  59. package/src/internal/get-state/get-from-store.ts +5 -2
  60. package/src/internal/get-state/read-or-compute-value.ts +4 -2
  61. package/src/internal/index.ts +97 -20
  62. package/src/internal/join/join-internal.ts +18 -18
  63. package/src/internal/keys.ts +1 -1
  64. package/src/internal/mutable/create-mutable-atom.ts +17 -15
  65. package/src/internal/mutable/get-json-family.ts +4 -4
  66. package/src/internal/mutable/get-json-token.ts +7 -7
  67. package/src/internal/selector/create-readonly-held-selector.ts +50 -0
  68. package/src/internal/selector/create-readonly-pure-selector.ts +51 -0
  69. package/src/internal/selector/create-standalone-selector.ts +48 -15
  70. package/src/internal/selector/create-writable-held-selector.ts +68 -0
  71. package/src/internal/selector/{create-writable-selector.ts → create-writable-pure-selector.ts} +18 -25
  72. package/src/internal/selector/dispose-selector.ts +37 -7
  73. package/src/internal/selector/get-selector-dependency-keys.ts +1 -1
  74. package/src/internal/selector/index.ts +4 -2
  75. package/src/internal/selector/register-selector.ts +17 -5
  76. package/src/internal/selector/trace-selector-atoms.ts +5 -5
  77. package/src/internal/selector/update-selector-atoms.ts +16 -10
  78. package/src/internal/set-state/emit-update.ts +4 -2
  79. package/src/internal/set-state/set-atom-or-selector.ts +2 -1
  80. package/src/internal/store/counterfeit.ts +13 -11
  81. package/src/internal/store/deposit.ts +18 -14
  82. package/src/internal/store/store.ts +9 -14
  83. package/src/internal/store/withdraw.ts +83 -7
  84. package/src/internal/subscribe/subscribe-in-store.ts +4 -2
  85. package/src/internal/subscribe/subscribe-to-state.ts +2 -1
  86. package/src/internal/timeline/create-timeline.ts +4 -2
  87. package/src/internal/transaction/build-transaction.ts +1 -1
  88. package/src/introspection/attach-atom-index.ts +2 -2
  89. package/src/introspection/attach-introspection-states.ts +9 -9
  90. package/src/introspection/attach-selector-index.ts +3 -3
  91. package/src/introspection/attach-timeline-family.ts +2 -2
  92. package/src/introspection/attach-timeline-index.ts +2 -2
  93. package/src/introspection/attach-transaction-index.ts +2 -2
  94. package/src/introspection/attach-transaction-logs.ts +2 -2
  95. package/src/introspection/attach-type-selectors.ts +5 -5
  96. package/src/introspection/auditor.ts +3 -3
  97. package/src/json/select-json-family.ts +5 -5
  98. package/src/json/select-json.ts +1 -1
  99. package/src/main/find-state.ts +8 -8
  100. package/src/main/index.ts +51 -6
  101. package/src/main/join.ts +13 -13
  102. package/src/main/logger.ts +32 -15
  103. package/src/main/selector.ts +164 -30
  104. package/src/main/transaction.ts +3 -3
  105. package/src/main/validators.ts +16 -12
  106. package/src/react-devtools/StateEditor.tsx +14 -4
  107. package/src/react-devtools/StateIndex.tsx +6 -4
  108. package/src/react-devtools/TimelineIndex.tsx +2 -2
  109. package/src/react-devtools/TransactionIndex.tsx +2 -2
  110. package/src/realtime/shared-room-store.ts +3 -3
  111. package/src/realtime-client/realtime-client-stores/client-main-store.ts +1 -1
  112. package/src/realtime-react/use-pull-selector-family-member.ts +1 -0
  113. package/src/realtime-server/realtime-server-stores/server-room-external-store.ts +2 -2
  114. package/dist/devtools-CAg2k57t.js +0 -0
  115. package/dist/devtools-Jyn42mZm.css.map +0 -1
  116. package/src/internal/selector/create-readonly-selector.ts +0 -55
@@ -5,7 +5,7 @@ import * as AtomIO$1 from "atom.io";
5
5
  import * as AtomIO from "atom.io";
6
6
 
7
7
  //#region src/data/dict.d.ts
8
- declare function dict<State, Key extends Canonical>(family: AtomIO$2.ReadonlySelectorFamilyToken<State, Key> | AtomIO$2.RegularAtomFamilyToken<State, Key> | AtomIO$2.WritableSelectorFamilyToken<State, Key>, index: AtomIO$2.ReadonlySelectorToken<Key[]> | AtomIO$2.RegularAtomToken<Key[]> | AtomIO$2.WritableSelectorToken<Key[]>, store?: Store): AtomIO$2.ReadonlySelectorToken<{ [K in stringified<Key>]: State }>;
8
+ declare function dict<State, Key extends Canonical>(family: AtomIO$2.ReadonlyPureSelectorFamilyToken<State, Key> | AtomIO$2.RegularAtomFamilyToken<State, Key> | AtomIO$2.WritablePureSelectorFamilyToken<State, Key>, index: AtomIO$2.ReadonlyPureSelectorToken<Key[]> | AtomIO$2.RegularAtomToken<Key[]> | AtomIO$2.WritablePureSelectorToken<Key[]>, store?: Store): AtomIO$2.ReadonlyPureSelectorToken<{ [K in stringified<Key>]: State }>;
9
9
 
10
10
  //#endregion
11
11
  //#region src/data/struct.d.ts
@@ -14,14 +14,14 @@ declare function struct<Struct extends {
14
14
  }, Key extends string>(options: {
15
15
  key: Key;
16
16
  default: Struct;
17
- }, store?: Store): [{ [K in keyof Struct as `${Key}${Capitalize<K & string>}State`]: AtomIO$1.RegularAtomToken<Struct[K]> }, AtomIO$1.ReadonlySelectorToken<Struct>];
17
+ }, store?: Store): [{ [K in keyof Struct as `${Key}${Capitalize<K & string>}State`]: AtomIO$1.RegularAtomToken<Struct[K]> }, AtomIO$1.ReadonlyPureSelectorToken<Struct>];
18
18
 
19
19
  //#endregion
20
20
  //#region src/data/struct-family.d.ts
21
21
  declare function structFamily<Struct extends object, Key extends string>(options: {
22
22
  key: Key;
23
23
  default: Struct;
24
- }): [{ [K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<K & string>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string> }, AtomIO.ReadonlySelectorFamilyToken<Struct, string>];
24
+ }): [{ [K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<K & string>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string> }, AtomIO.ReadonlyPureSelectorFamilyToken<Struct, string>];
25
25
 
26
26
  //#endregion
27
27
  export { dict, struct, structFamily };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["family:\n\t\t| AtomIO.ReadonlySelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritableSelectorFamilyToken<State, Key>","index:\n\t\t| AtomIO.ReadonlySelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritableSelectorToken<Key[]>","store: Store","options: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t}","store: Store","options: {\n\tkey: Key\n\tdefault: Struct\n}"],"sources":["../../src/data/dict.ts","../../src/data/struct.ts","../../src/data/struct-family.ts"],"sourcesContent":null,"mappings":";;;;;;;iBASgB,wBAAwB,mBAEpC,QAAA,CAAO,4BAA4B,OAAO,OAC1C,QAAA,CAAO,uBAAuB,OAAO,OACrC,QAAA,CAAO,4BAA4B,OAAO,aAE1C,QAAA,CAAO,sBAAsB,SAC7B,QAAA,CAAO,iBAAiB,SACxB,QAAA,CAAO,sBAAsB,gBACzB,QACL,QAAA,CAAO,8BAA8B,YAAY,OAAO;;;;iBCV3C;;sBDAhB,CAAA,OAAgB,EAAA;EAAA,GAAA,ECKT,GDLS;EAAA,OAAwB,ECM7B,MDN6B;CAAA,EAAA,KAED,CAAA,ECM/B,KDN+B,CAAA,EAAA,CAAA,QAAA,MCSzB,MDTyB,IAAA,GCSZ,GDTY,GCSN,UDTM,CCUpC,CDVoC,GAAA,MAAA,CAAA,OAAA,GCW1B,QAAA,CAAO,gBDXmB,CCWF,MDXE,CCWK,CDXL,CAAA,CAAA,EAAA,ECatC,QAAA,CAAO,qBDb+B,CCaT,MDbS,CAAA,CAAA;;;;iBEAvB;OAIV;WACI;AFPV,CAAA,CAAA,EAAgB,CAAA,QAAA,MEUF,MFVE,IAAA,OEUe,UFVf,CEU0B,GFV1B,GAAA,MAAA,CAAA,GEU0C,UFV1C,CEWb,CFXa,GAAA,MAAA,CAAA,OAAA,GEYH,MAAA,CAAO,sBFZJ,CEY2B,MFZ3B,CEYkC,CFZlC,CAAA,EAAA,MAAA,CAAA,EAAA,EEcf,MAAA,CAAO,2BFdQ,CEcoB,MFdpB,EAAA,MAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","names":["family:\n\t\t| AtomIO.ReadonlyPureSelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritablePureSelectorFamilyToken<State, Key>","index:\n\t\t| AtomIO.ReadonlyPureSelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritablePureSelectorToken<Key[]>","store: Store","options: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t}","store: Store","options: {\n\tkey: Key\n\tdefault: Struct\n}"],"sources":["../../src/data/dict.ts","../../src/data/struct.ts","../../src/data/struct-family.ts"],"sourcesContent":[],"mappings":";;;;;;;iBASgB,wBAAwB,mBAEpC,QAAA,CAAO,gCAAgC,OAAO,OAC9C,QAAA,CAAO,uBAAuB,OAAO,OACrC,QAAA,CAAO,gCAAgC,OAAO,aAE9C,QAAA,CAAO,0BAA0B,SACjC,QAAA,CAAO,iBAAiB,SACxB,QAAA,CAAO,0BAA0B,gBAC7B,QACL,QAAA,CAAO,kCAAkC,YAAY,OAAO;;;;iBCV/C;;sBDAhB,CAAA,OAAgB,EAAA;EAAA,GAAA,ECKT,GDLS;EAAA,OAAwB,ECM7B,MDN6B;CAAA,EAAA,KAEG,CAAA,ECMnC,KDNmC,CAAA,EAAA,CAAA,QAAA,MCS7B,MDT6B,IAAA,GCShB,GDTgB,GCSV,UDTU,CCUxC,CDVwC,GAAA,MAAA,CAAA,OAAA,GCW9B,QAAA,CAAO,gBDXuB,CCWN,MDXM,CCWC,CDXD,CAAA,CAAA,EAAA,ECa1C,QAAA,CAAO,yBDbmC,CCaT,MDbS,CAAA,CAAA;;;;iBEA3B;OAIV;WACI;AFPV,CAAA,CAAA,EAAgB,CAAA,QAAA,MEUF,MFVE,IAAA,OEUe,UFVf,CEU0B,GFV1B,GAAA,MAAA,CAAA,GEU0C,UFV1C,CEWb,CFXa,GAAA,MAAA,CAAA,OAAA,GEYH,MAAA,CAAO,sBFZJ,CEY2B,MFZ3B,CEYkC,CFZlC,CAAA,EAAA,MAAA,CAAA,EAAA,EEcf,MAAA,CAAO,+BFdQ,CEcwB,MFdxB,EAAA,MAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["family:\n\t\t| AtomIO.ReadonlySelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritableSelectorFamilyToken<State, Key>","index:\n\t\t| AtomIO.ReadonlySelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritableSelectorToken<Key[]>","store: Store","options: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t}","store: Store","atoms: {\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t}","topKey: string","subKey: string","options: {\n\tkey: Key\n\tdefault: Struct\n}","atoms: {\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t}","findStructState: AtomIO.ReadonlySelectorFamilyToken<Struct, string>"],"sources":["../../src/data/dict.ts","../../src/data/struct.ts","../../src/data/struct-family.ts"],"sourcesContent":["import type * as AtomIO from \"atom.io\"\nimport type { Store } from \"atom.io/internal\"\nimport {\n\tcreateStandaloneSelector,\n\tfindInStore,\n\tIMPLICIT,\n} from \"atom.io/internal\"\nimport type { Canonical, stringified } from \"atom.io/json\"\n\nexport function dict<State, Key extends Canonical>(\n\tfamily:\n\t\t| AtomIO.ReadonlySelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritableSelectorFamilyToken<State, Key>,\n\tindex:\n\t\t| AtomIO.ReadonlySelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritableSelectorToken<Key[]>,\n\tstore: Store = IMPLICIT.STORE,\n): AtomIO.ReadonlySelectorToken<{ [K in stringified<Key>]: State }> {\n\treturn createStandaloneSelector(store, {\n\t\tkey: `${family.key}Dict`,\n\t\tget: ({ get }) => {\n\t\t\tconst keys = get(index)\n\t\t\treturn keys.reduce((acc, key) => {\n\t\t\t\tacc[key] = get(findInStore(store, family, key))\n\t\t\t\treturn acc\n\t\t\t}, {} as any)\n\t\t},\n\t})\n}\n","import type * as AtomIO from \"atom.io\"\nimport type { Store } from \"atom.io/internal\"\nimport {\n\tcapitalize,\n\tcreateRegularAtom,\n\tcreateStandaloneSelector,\n\tIMPLICIT,\n} from \"atom.io/internal\"\n\nexport function struct<\n\tStruct extends { [key: string]: unknown },\n\tKey extends string,\n>(\n\toptions: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t},\n\tstore: Store = IMPLICIT.STORE,\n): [\n\t{\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t},\n\tAtomIO.ReadonlySelectorToken<Struct>,\n] {\n\tconst atoms: {\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t} = Object.keys(options.default).reduce((acc, key) => {\n\t\tconst atomName = options.key + capitalize(key) + `State`\n\t\tacc[atomName] = createRegularAtom(\n\t\t\tstore,\n\t\t\t{\n\t\t\t\tkey: `${options.key}.${key}`,\n\t\t\t\tdefault: options.default[key],\n\t\t\t},\n\t\t\tundefined,\n\t\t)\n\t\treturn acc\n\t}, {} as any)\n\tconst structState = createStandaloneSelector(store, {\n\t\tkey: options.key,\n\t\tget: ({ get }) => {\n\t\t\treturn Object.keys(options.default).reduce((acc, key) => {\n\t\t\t\t// @ts-expect-error finicky\n\t\t\t\tacc[key] = get(atoms[options.key + capitalize(key) + `State`])\n\t\t\t\treturn acc\n\t\t\t}, {} as any)\n\t\t},\n\t})\n\treturn [atoms, structState]\n}\n","import type * as AtomIO from \"atom.io\"\nimport {\n\tcapitalize,\n\tcreateRegularAtomFamily,\n\tcreateSelectorFamily,\n\tIMPLICIT,\n} from \"atom.io/internal\"\n\nconst nameFamily = (topKey: string, subKey: string) =>\n\t`find` + capitalize(topKey) + capitalize(subKey) + `State`\n\nexport function structFamily<\n\tStruct extends object,\n\tKey extends string,\n>(options: {\n\tkey: Key\n\tdefault: Struct\n}): [\n\t{\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t},\n\tAtomIO.ReadonlySelectorFamilyToken<Struct, string>,\n] {\n\tconst atoms: {\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t} = Object.keys(options.default).reduce((acc, subKey) => {\n\t\tconst atomFamilyName = nameFamily(options.key, subKey)\n\t\tacc[atomFamilyName] = createRegularAtomFamily(IMPLICIT.STORE, {\n\t\t\tkey: `${options.key}.${subKey}`,\n\t\t\tdefault: (options.default as any)[subKey],\n\t\t})\n\t\treturn acc\n\t}, {} as any)\n\tconst findStructState: AtomIO.ReadonlySelectorFamilyToken<Struct, string> =\n\t\tcreateSelectorFamily(IMPLICIT.STORE, {\n\t\t\tkey: options.key,\n\t\t\tget:\n\t\t\t\t(id) =>\n\t\t\t\t({ find, get }) => {\n\t\t\t\t\treturn Object.keys(options.default).reduce((acc, subKey) => {\n\t\t\t\t\t\tacc[subKey] = get(\n\t\t\t\t\t\t\tfind((atoms as any)[nameFamily(options.key, subKey)], id),\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn acc\n\t\t\t\t\t}, {} as any)\n\t\t\t\t},\n\t\t})\n\treturn [atoms, findStructState]\n}\n"],"mappings":";;;AASA,SAAgB,KACfA,QAIAC,OAIAC,QAAe,SAAS,OAC2C;AACnE,QAAO,yBAAyB,OAAO;EACtC,MAAM,EAAE,OAAO,IAAI;EACnB,KAAK,CAAC,EAAE,KAAK,KAAK;GACjB,MAAM,OAAO,IAAI,MAAM;AACvB,UAAO,KAAK,OAAO,CAAC,KAAK,QAAQ;AAChC,QAAI,OAAO,IAAI,YAAY,OAAO,QAAQ,IAAI,CAAC;AAC/C,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACD,EAAC;AACF;;;;ACrBD,SAAgB,OAIfC,SAIAC,QAAe,SAAS,OAQvB;CACD,MAAMC,QAIF,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,QAAQ;EACrD,MAAM,WAAW,QAAQ,MAAM,WAAW,IAAI,IAAI;AAClD,MAAI,YAAY,kBACf,OACA;GACC,MAAM,EAAE,QAAQ,IAAI,GAAG,IAAI;GAC3B,SAAS,QAAQ,QAAQ;EACzB,UAED;AACD,SAAO;CACP,GAAE,CAAE,EAAQ;CACb,MAAM,cAAc,yBAAyB,OAAO;EACnD,KAAK,QAAQ;EACb,KAAK,CAAC,EAAE,KAAK,KAAK;AACjB,UAAO,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,QAAQ;AAExD,QAAI,OAAO,IAAI,MAAM,QAAQ,MAAM,WAAW,IAAI,IAAI,QAAQ;AAC9D,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACD,EAAC;AACF,QAAO,CAAC,OAAO,WAAY;AAC3B;;;;AC7CD,MAAM,aAAa,CAACC,QAAgBC,YAClC,QAAQ,WAAW,OAAO,GAAG,WAAW,OAAO,IAAI;AAErD,SAAgB,aAGdC,SAUA;CACD,MAAMC,QAIF,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,WAAW;EACxD,MAAM,iBAAiB,WAAW,QAAQ,KAAK,OAAO;AACtD,MAAI,kBAAkB,wBAAwB,SAAS,OAAO;GAC7D,MAAM,EAAE,QAAQ,IAAI,GAAG,OAAO;GAC9B,SAAU,QAAQ,QAAgB;EAClC,EAAC;AACF,SAAO;CACP,GAAE,CAAE,EAAQ;CACb,MAAMC,kBACL,qBAAqB,SAAS,OAAO;EACpC,KAAK,QAAQ;EACb,KACC,CAAC,OACD,CAAC,EAAE,MAAM,KAAK,KAAK;AAClB,UAAO,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,WAAW;AAC3D,QAAI,UAAU,IACb,KAAM,MAAc,WAAW,QAAQ,KAAK,OAAO,GAAG,GAAG,CACzD;AACD,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACF,EAAC;AACH,QAAO,CAAC,OAAO,eAAgB;AAC/B"}
1
+ {"version":3,"file":"index.js","names":["family:\n\t\t| AtomIO.ReadonlyPureSelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritablePureSelectorFamilyToken<State, Key>","index:\n\t\t| AtomIO.ReadonlyPureSelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritablePureSelectorToken<Key[]>","store: Store","options: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t}","store: Store","atoms: {\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t}","topKey: string","subKey: string","options: {\n\tkey: Key\n\tdefault: Struct\n}","atoms: {\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t}","findStructState: AtomIO.ReadonlyPureSelectorFamilyToken<Struct, string>"],"sources":["../../src/data/dict.ts","../../src/data/struct.ts","../../src/data/struct-family.ts"],"sourcesContent":["import type * as AtomIO from \"atom.io\"\nimport type { Store } from \"atom.io/internal\"\nimport {\n\tcreateStandaloneSelector,\n\tfindInStore,\n\tIMPLICIT,\n} from \"atom.io/internal\"\nimport type { Canonical, stringified } from \"atom.io/json\"\n\nexport function dict<State, Key extends Canonical>(\n\tfamily:\n\t\t| AtomIO.ReadonlyPureSelectorFamilyToken<State, Key>\n\t\t| AtomIO.RegularAtomFamilyToken<State, Key>\n\t\t| AtomIO.WritablePureSelectorFamilyToken<State, Key>,\n\tindex:\n\t\t| AtomIO.ReadonlyPureSelectorToken<Key[]>\n\t\t| AtomIO.RegularAtomToken<Key[]>\n\t\t| AtomIO.WritablePureSelectorToken<Key[]>,\n\tstore: Store = IMPLICIT.STORE,\n): AtomIO.ReadonlyPureSelectorToken<{ [K in stringified<Key>]: State }> {\n\treturn createStandaloneSelector(store, {\n\t\tkey: `${family.key}Dict`,\n\t\tget: ({ get }) => {\n\t\t\tconst keys = get(index)\n\t\t\treturn keys.reduce((acc, key) => {\n\t\t\t\tacc[key] = get(findInStore(store, family, key))\n\t\t\t\treturn acc\n\t\t\t}, {} as any)\n\t\t},\n\t})\n}\n","import type * as AtomIO from \"atom.io\"\nimport type { Store } from \"atom.io/internal\"\nimport {\n\tcapitalize,\n\tcreateRegularAtom,\n\tcreateStandaloneSelector,\n\tIMPLICIT,\n} from \"atom.io/internal\"\n\nexport function struct<\n\tStruct extends { [key: string]: unknown },\n\tKey extends string,\n>(\n\toptions: {\n\t\tkey: Key\n\t\tdefault: Struct\n\t},\n\tstore: Store = IMPLICIT.STORE,\n): [\n\t{\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t},\n\tAtomIO.ReadonlyPureSelectorToken<Struct>,\n] {\n\tconst atoms: {\n\t\t[K in keyof Struct as `${Key}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomToken<Struct[K]>\n\t} = Object.keys(options.default).reduce((acc, key) => {\n\t\tconst atomName = options.key + capitalize(key) + `State`\n\t\tacc[atomName] = createRegularAtom(\n\t\t\tstore,\n\t\t\t{\n\t\t\t\tkey: `${options.key}.${key}`,\n\t\t\t\tdefault: options.default[key],\n\t\t\t},\n\t\t\tundefined,\n\t\t)\n\t\treturn acc\n\t}, {} as any)\n\tconst structState = createStandaloneSelector(store, {\n\t\tkey: options.key,\n\t\tget: ({ get }) => {\n\t\t\treturn Object.keys(options.default).reduce((acc, key) => {\n\t\t\t\t// @ts-expect-error finicky\n\t\t\t\tacc[key] = get(atoms[options.key + capitalize(key) + `State`])\n\t\t\t\treturn acc\n\t\t\t}, {} as any)\n\t\t},\n\t})\n\treturn [atoms, structState]\n}\n","import type * as AtomIO from \"atom.io\"\nimport {\n\tcapitalize,\n\tcreateRegularAtomFamily,\n\tcreateSelectorFamily,\n\tIMPLICIT,\n} from \"atom.io/internal\"\n\nconst nameFamily = (topKey: string, subKey: string) =>\n\t`find` + capitalize(topKey) + capitalize(subKey) + `State`\n\nexport function structFamily<\n\tStruct extends object,\n\tKey extends string,\n>(options: {\n\tkey: Key\n\tdefault: Struct\n}): [\n\t{\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t},\n\tAtomIO.ReadonlyPureSelectorFamilyToken<Struct, string>,\n] {\n\tconst atoms: {\n\t\t[K in keyof Struct as `find${Capitalize<Key & string>}${Capitalize<\n\t\t\tK & string\n\t\t>}State`]: AtomIO.RegularAtomFamilyToken<Struct[K], string>\n\t} = Object.keys(options.default).reduce((acc, subKey) => {\n\t\tconst atomFamilyName = nameFamily(options.key, subKey)\n\t\tacc[atomFamilyName] = createRegularAtomFamily(IMPLICIT.STORE, {\n\t\t\tkey: `${options.key}.${subKey}`,\n\t\t\tdefault: (options.default as any)[subKey],\n\t\t})\n\t\treturn acc\n\t}, {} as any)\n\tconst findStructState: AtomIO.ReadonlyPureSelectorFamilyToken<Struct, string> =\n\t\tcreateSelectorFamily(IMPLICIT.STORE, {\n\t\t\tkey: options.key,\n\t\t\tget:\n\t\t\t\t(id) =>\n\t\t\t\t({ find, get }) => {\n\t\t\t\t\treturn Object.keys(options.default).reduce((acc, subKey) => {\n\t\t\t\t\t\tacc[subKey] = get(\n\t\t\t\t\t\t\tfind((atoms as any)[nameFamily(options.key, subKey)], id),\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn acc\n\t\t\t\t\t}, {} as any)\n\t\t\t\t},\n\t\t})\n\treturn [atoms, findStructState]\n}\n"],"mappings":";;;AASA,SAAgB,KACfA,QAIAC,OAIAC,QAAe,SAAS,OAC+C;AACvE,QAAO,yBAAyB,OAAO;EACtC,MAAM,EAAE,OAAO,IAAI;EACnB,KAAK,CAAC,EAAE,KAAK,KAAK;GACjB,MAAM,OAAO,IAAI,MAAM;AACvB,UAAO,KAAK,OAAO,CAAC,KAAK,QAAQ;AAChC,QAAI,OAAO,IAAI,YAAY,OAAO,QAAQ,IAAI,CAAC;AAC/C,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACD,EAAC;AACF;;;;ACrBD,SAAgB,OAIfC,SAIAC,QAAe,SAAS,OAQvB;CACD,MAAMC,QAIF,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,QAAQ;EACrD,MAAM,WAAW,QAAQ,MAAM,WAAW,IAAI,IAAI;AAClD,MAAI,YAAY,kBACf,OACA;GACC,MAAM,EAAE,QAAQ,IAAI,GAAG,IAAI;GAC3B,SAAS,QAAQ,QAAQ;EACzB,UAED;AACD,SAAO;CACP,GAAE,CAAE,EAAQ;CACb,MAAM,cAAc,yBAAyB,OAAO;EACnD,KAAK,QAAQ;EACb,KAAK,CAAC,EAAE,KAAK,KAAK;AACjB,UAAO,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,QAAQ;AAExD,QAAI,OAAO,IAAI,MAAM,QAAQ,MAAM,WAAW,IAAI,IAAI,QAAQ;AAC9D,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACD,EAAC;AACF,QAAO,CAAC,OAAO,WAAY;AAC3B;;;;AC7CD,MAAM,aAAa,CAACC,QAAgBC,YAClC,QAAQ,WAAW,OAAO,GAAG,WAAW,OAAO,IAAI;AAErD,SAAgB,aAGdC,SAUA;CACD,MAAMC,QAIF,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,WAAW;EACxD,MAAM,iBAAiB,WAAW,QAAQ,KAAK,OAAO;AACtD,MAAI,kBAAkB,wBAAwB,SAAS,OAAO;GAC7D,MAAM,EAAE,QAAQ,IAAI,GAAG,OAAO;GAC9B,SAAU,QAAQ,QAAgB;EAClC,EAAC;AACF,SAAO;CACP,GAAE,CAAE,EAAQ;CACb,MAAMC,kBACL,qBAAqB,SAAS,OAAO;EACpC,KAAK,QAAQ;EACb,KACC,CAAC,OACD,CAAC,EAAE,MAAM,KAAK,KAAK;AAClB,UAAO,OAAO,KAAK,QAAQ,QAAQ,CAAC,OAAO,CAAC,KAAK,WAAW;AAC3D,QAAI,UAAU,IACb,KAAM,MAAc,WAAW,QAAQ,KAAK,OAAO,GAAG,GAAG,CACzD;AACD,WAAO;GACP,GAAE,CAAE,EAAQ;EACb;CACF,EAAC;AACH,QAAO,CAAC,OAAO,eAAgB;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","synchronousSelectorDependencies: {\n\tmeta: {\n\t\ttype: RuleType\n\t\tdocs: {\n\t\t\tdescription: string\n\t\t\tcategory: string\n\t\t\trecommended: boolean\n\t\t\turl: string\n\t\t}\n\t\tschema: never[]\n\t}\n\tcreate(context: Rule.RuleContext): Rule.NodeListener\n}","context: Rule.RuleContext","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/synchronous-selector-dependencies.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":null,"mappings":";;;;;;cASaA,oBAAoB,WAAA,CAAY,0CAI5C,WAAA,CAAY;;;;cCNAC;;UAEL;;MDAR,WAAaD,EAAAA,MAAAA;MAIA,QAAA,EAAA,MAAA;MAAA,WAAZ,EAAA,OAAY;MAAA,GAAA,EAJoB,MAAA;IAAY,CAAA;;;kBCS5B,IAAA,CAAK,cAAc,IAAA,CAAK;AAXzC,CAAA;;;;;;;;;cEDMG,QAAQ,MAAA,CAAO"}
1
+ {"version":3,"file":"index.d.ts","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","synchronousSelectorDependencies: {\n\tmeta: {\n\t\ttype: RuleType\n\t\tdocs: {\n\t\t\tdescription: string\n\t\t\tcategory: string\n\t\t\trecommended: boolean\n\t\t\turl: string\n\t\t}\n\t\tschema: never[]\n\t}\n\tcreate(context: Rule.RuleContext): Rule.NodeListener\n}","context: Rule.RuleContext","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/synchronous-selector-dependencies.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":[],"mappings":";;;;;;cASaA,oBAAoB,WAAA,CAAY,0CAI5C,WAAA,CAAY;;;;cCNAC;;UAEL;;MDAR,WAAaD,EAAAA,MAAAA;MAIA,QAAA,EAAA,MAAA;MAAA,WAAZ,EAAA,OAAY;MAAA,GAAA,EAJoB,MAAA;IAAY,CAAA;;;kBCS5B,IAAA,CAAK,cAAc,IAAA,CAAK;AAXzC,CAAA;;;;;;;;;cEDMG,QAAQ,MAAA,CAAO"}
@@ -1,6 +1,6 @@
1
1
  import { Func as Func$1, Store as Store$1 } from "atom.io/internal";
2
2
  import { Canonical, Json, JsonInterface, stringified } from "atom.io/json";
3
- import { Above, ActorToolkit, Anarchy, AtomFamilyToken, AtomIOLogger, AtomIOToken, AtomToken, Claim, CompoundFrom, CompoundTypedKey, FamilyMetadata, Hierarchy, JoinOptions, JoinStates, JoinToken, KeyedStateUpdate, Logger, MoleculeCreation, MoleculeDisposal, MoleculeTransfer, MutableAtomFamilyOptions, MutableAtomFamilyToken, MutableAtomOptions, MutableAtomToken, ReadableFamilyToken, ReadableToken, ReadonlySelectorFamilyOptions, ReadonlySelectorFamilyToken, ReadonlySelectorOptions, ReadonlySelectorToken, RegularAtomFamilyOptions, RegularAtomFamilyToken, RegularAtomOptions, RegularAtomToken, SelectorFamilyToken, SelectorToken, SetterToolkit, SingularTypedKey, StateCreation, StateDisposal, StateUpdate, TimelineManageable, TimelineOptions, TimelineToken, TimelineUpdate, TokenType, TransactionOptions, TransactionToken, TransactionUpdate, TransactionUpdateHandler, UpdateHandler, Vassal, WritableFamilyToken, WritableSelectorFamilyOptions, WritableSelectorFamilyToken, WritableSelectorOptions, WritableSelectorToken, WritableToken } from "atom.io";
3
+ import { Above, ActorToolkit, Anarchy, AtomFamilyToken, AtomIOLogger, AtomIOToken, AtomToken, Claim, CompoundFrom, CompoundTypedKey, FamilyMetadata, HeldSelectorFamilyToken, HeldSelectorToken, Hierarchy, JoinOptions, JoinStates, JoinToken, KeyedStateUpdate, Logger, MoleculeCreation, MoleculeDisposal, MoleculeTransfer, MutableAtomFamilyOptions, MutableAtomFamilyToken, MutableAtomOptions, MutableAtomToken, PureSelectorFamilyToken, PureSelectorToken, ReadableFamilyToken, ReadableToken, ReadonlyHeldSelectorFamilyOptions, ReadonlyHeldSelectorFamilyToken, ReadonlyHeldSelectorOptions, ReadonlyHeldSelectorToken, ReadonlyPureSelectorFamilyOptions, ReadonlyPureSelectorFamilyToken, ReadonlyPureSelectorOptions, ReadonlyPureSelectorToken, ReadonlySelectorFamilyToken, ReadonlySelectorToken, RegularAtomFamilyOptions, RegularAtomFamilyToken, RegularAtomOptions, RegularAtomToken, SelectorFamilyToken, SelectorToken, SetterToolkit, SingularTypedKey, StateCreation, StateDisposal, StateUpdate, TimelineManageable, TimelineOptions, TimelineToken, TimelineUpdate, TokenType, TransactionOptions, TransactionToken, TransactionUpdate, TransactionUpdateHandler, UpdateHandler, Vassal, WritableFamilyToken, WritableHeldSelectorFamilyOptions, WritableHeldSelectorFamilyToken, WritableHeldSelectorOptions, WritableHeldSelectorToken, WritablePureSelectorFamilyOptions, WritablePureSelectorFamilyToken, WritablePureSelectorOptions, WritablePureSelectorToken, WritableSelectorFamilyToken, WritableSelectorToken, WritableToken } from "atom.io";
4
4
  import { SetRTX, SetRTXJson } from "atom.io/transceivers/set-rtx";
5
5
 
6
6
  //#region src/internal/store/circular-buffer.d.ts
@@ -19,16 +19,18 @@ declare class CircularBuffer<T> {
19
19
  //#region src/internal/store/counterfeit.d.ts
20
20
  declare const FAMILY_MEMBER_TOKEN_TYPES: {
21
21
  readonly atom_family: "atom";
22
- readonly mutable_atom_family: "mutable_atom";
23
- readonly selector_family: "selector";
24
- readonly readonly_selector_family: "readonly_selector";
25
22
  readonly molecule_family: "molecule";
23
+ readonly mutable_atom_family: "mutable_atom";
24
+ readonly readonly_held_selector_family: "readonly_held_selector";
25
+ readonly readonly_pure_selector_family: "readonly_pure_selector";
26
+ readonly writable_held_selector_family: "writable_held_selector";
27
+ readonly writable_pure_selector_family: "writable_pure_selector";
26
28
  };
27
29
  declare function counterfeit<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J>;
28
30
  declare function counterfeit<T, K extends Canonical, Key extends K>(token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T>;
29
31
  declare function counterfeit<T, K extends Canonical, Key extends K>(token: AtomFamilyToken<T, K>, key: Key): AtomToken<T>;
30
- declare function counterfeit<T, K extends Canonical, Key extends K>(token: WritableSelectorFamilyToken<T, K>, key: Key): WritableSelectorToken<T>;
31
- declare function counterfeit<T, K extends Canonical, Key extends K>(token: ReadonlySelectorFamilyToken<T, K>, key: Key): ReadonlySelectorToken<T>;
32
+ declare function counterfeit<T, K extends Canonical, Key extends K>(token: WritablePureSelectorFamilyToken<T, K>, key: Key): WritablePureSelectorToken<T>;
33
+ declare function counterfeit<T, K extends Canonical, Key extends K>(token: ReadonlyPureSelectorFamilyToken<T, K>, key: Key): ReadonlyPureSelectorToken<T>;
32
34
  declare function counterfeit<T, K extends Canonical, Key extends K>(token: SelectorFamilyToken<T, K>, key: Key): SelectorToken<T>;
33
35
  declare function counterfeit<T, K extends Canonical, Key extends K>(token: WritableFamilyToken<T, K>, key: Key): WritableToken<T>;
34
36
  declare function counterfeit<T, K extends Canonical, Key extends K>(token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T>;
@@ -77,7 +79,7 @@ type JunctionAdvancedConfiguration<AType extends string, BType extends string, C
77
79
  makeContentKey?: (a: AType, b: BType) => string;
78
80
  };
79
81
  type JunctionJSON<ASide extends string, AType extends string, BSide extends string, BType extends string, Content extends Json.Object | null> = JunctionEntries<AType, BType, Content> & JunctionSchema<ASide, BSide>;
80
- declare class Junction<ASide extends string, AType extends string, BSide extends string, BType extends string, Content extends Json.Object | null = null> {
82
+ declare class Junction<const ASide extends string, const AType extends string, const BSide extends string, const BType extends string, const Content extends Json.Object | null = null> {
81
83
  readonly a: ASide;
82
84
  readonly b: BSide;
83
85
  readonly cardinality: `1:1` | `1:n` | `n:n`;
@@ -213,16 +215,16 @@ type TransactionEpoch = {
213
215
  declare function deposit<T>(state: RegularAtom<T>): RegularAtomToken<T>;
214
216
  declare function deposit<T extends Transceiver<any>>(state: MutableAtom<T, any>): MutableAtomToken<T, any>;
215
217
  declare function deposit<T>(state: Atom<T>): AtomToken<T>;
216
- declare function deposit<T>(state: WritableSelector<T>): WritableSelectorToken<T>;
217
- declare function deposit<T>(state: ReadonlySelector<T>): ReadonlySelectorToken<T>;
218
+ declare function deposit<T>(state: WritablePureSelector<T>): WritablePureSelectorToken<T>;
219
+ declare function deposit<T>(state: ReadonlyPureSelector<T>): ReadonlyPureSelectorToken<T>;
218
220
  declare function deposit<T>(state: Selector<T>): SelectorToken<T>;
219
221
  declare function deposit<T>(state: WritableState<T>): WritableToken<T>;
220
222
  declare function deposit<T>(state: ReadableState<T>): ReadableToken<T>;
221
223
  declare function deposit<T, K extends Canonical>(state: RegularAtomFamily<T, K>): RegularAtomFamilyToken<T, K>;
222
224
  declare function deposit<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical>(state: MutableAtomFamily<T, J, K>): MutableAtomFamilyToken<T, J, K>;
223
225
  declare function deposit<T>(state: AtomFamily<T, any>): AtomFamilyToken<T, any>;
224
- declare function deposit<T>(state: WritableSelectorFamily<T, any>): WritableSelectorFamilyToken<T, any>;
225
- declare function deposit<T>(state: ReadonlySelectorFamily<T, any>): ReadonlySelectorFamilyToken<T, any>;
226
+ declare function deposit<T>(state: WritablePureSelectorFamily<T, any>): WritablePureSelectorFamilyToken<T, any>;
227
+ declare function deposit<T>(state: ReadonlyPureSelectorFamily<T, any>): ReadonlyPureSelectorFamilyToken<T, any>;
226
228
  declare function deposit<T>(state: SelectorFamily<T, any>): SelectorFamilyToken<T, any>;
227
229
  declare function deposit<T>(state: WritableFamily<T, any>): WritableFamilyToken<T, any>;
228
230
  declare function deposit<T>(state: ReadableFamily<T, any>): ReadableFamilyToken<T, any>;
@@ -257,8 +259,8 @@ declare function claimWithinStore<H extends Hierarchy, V extends Exclude<Vassal<
257
259
 
258
260
  //#endregion
259
261
  //#region src/internal/join/join-internal.d.ts
260
- type JoinStateFamilies<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null> = Cardinality extends `1:1` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntryOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content] | null, AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeyOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType | null, AType> } : Cardinality extends `1:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType> } : Cardinality extends `n:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntriesOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content][], BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeysOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType[], BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType> } : never;
261
- declare class Join<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null = null, ContentKey extends CompoundTypedKey<`content`, ASide, BSide> = CompoundTypedKey<`content`, ASide, BSide>> {
262
+ type JoinStateFamilies<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null> = Cardinality extends `1:1` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntryOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<[BType, Content] | null, AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeyOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<BType | null, AType> } : Cardinality extends `1:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<BType[], AType> } : Cardinality extends `n:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntriesOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<[AType, Content][], BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeysOf${Capitalize<BSide>}`]: ReadonlyPureSelectorFamilyToken<AType[], BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlyPureSelectorFamilyToken<BType[], AType> } : never;
263
+ declare class Join<const ASide extends string, const AType extends string, const BSide extends string, const BType extends string, const Cardinality extends `1:1` | `1:n` | `n:n`, const Content extends Json.Object | null = null, const ContentKey extends CompoundTypedKey<`content`, ASide, BSide> = CompoundTypedKey<`content`, ASide, BSide>> {
262
264
  private toolkit;
263
265
  options: JoinOptions<ASide, AType, BSide, BType, Cardinality, Content>;
264
266
  defaultContent: Content | undefined;
@@ -361,7 +363,7 @@ declare class Store implements Lineage {
361
363
  valueMap: Map<string, any>;
362
364
  defaults: Map<string, any>;
363
365
  atoms: Map<string, Atom<any>>;
364
- selectors: Map<string, WritableSelector<any>>;
366
+ writableSelectors: Map<string, WritableSelector<any>>;
365
367
  readonlySelectors: Map<string, ReadonlySelector<any>>;
366
368
  atomsThatAreDefault: Set<string>;
367
369
  selectorAtoms: Junction<`selectorKey`, string, `atomKey`, string>;
@@ -369,7 +371,7 @@ declare class Store implements Lineage {
369
371
  source: string;
370
372
  }>;
371
373
  trackers: Map<string, Tracker<Transceiver<any>>>;
372
- families: Map<string, MutableAtomFamily<any, any, any> | ReadonlySelectorFamily<any, any> | RegularAtomFamily<any, any> | WritableSelectorFamily<any, any>>;
374
+ families: Map<string, HeldSelectorFamily<any, any> | MutableAtomFamily<any, any, any> | PureSelectorFamily<any, any> | RegularAtomFamily<any, any>>;
373
375
  joins: Map<string, Join<any, any, any, any, any, any>>;
374
376
  transactions: Map<string, Transaction<Func>>;
375
377
  transactionMeta: TransactionEpoch | TransactionProgress<Func>;
@@ -401,8 +403,8 @@ declare class Store implements Lineage {
401
403
  type StoreEventCarrier = {
402
404
  atomCreation: Subject<AtomToken<unknown>>;
403
405
  atomDisposal: Subject<AtomToken<unknown>>;
404
- selectorCreation: Subject<ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>>;
405
- selectorDisposal: Subject<ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>>;
406
+ selectorCreation: Subject<SelectorToken<unknown>>;
407
+ selectorDisposal: Subject<SelectorToken<unknown>>;
406
408
  timelineCreation: Subject<TimelineToken<unknown>>;
407
409
  transactionCreation: Subject<TransactionToken<Func>>;
408
410
  transactionApplying: StatefulSubject<TransactionProgress<Func> | null>;
@@ -423,16 +425,28 @@ declare const clearStore: (store: Store) => void;
423
425
  declare function withdraw<T>(store: Store, token: RegularAtomToken<T>): RegularAtom<T>;
424
426
  declare function withdraw<T extends Transceiver<any>>(store: Store, token: MutableAtomToken<T, any>): MutableAtom<T, any>;
425
427
  declare function withdraw<T>(store: Store, token: AtomToken<T>): Atom<T>;
426
- declare function withdraw<T>(store: Store, token: WritableSelectorToken<T>): WritableSelector<T>;
428
+ declare function withdraw<T>(store: Store, token: WritableHeldSelectorToken<T>): WritableHeldSelector<T>;
429
+ declare function withdraw<T>(store: Store, token: ReadonlyHeldSelectorToken<T>): ReadonlyHeldSelector<T>;
430
+ declare function withdraw<T>(store: Store, token: WritablePureSelectorToken<T>): WritablePureSelector<T>;
431
+ declare function withdraw<T>(store: Store, token: ReadonlyPureSelectorToken<T>): ReadonlyPureSelector<T>;
427
432
  declare function withdraw<T>(store: Store, token: ReadonlySelectorToken<T>): ReadonlySelector<T>;
433
+ declare function withdraw<T>(store: Store, token: WritableSelectorToken<T>): WritableSelector<T>;
434
+ declare function withdraw<T>(store: Store, token: HeldSelectorToken<T>): HeldSelector<T>;
435
+ declare function withdraw<T>(store: Store, token: PureSelectorToken<T>): PureSelector<T>;
428
436
  declare function withdraw<T>(store: Store, token: SelectorToken<T>): Selector<T>;
429
437
  declare function withdraw<T>(store: Store, token: WritableToken<T>): WritableState<T>;
430
438
  declare function withdraw<T>(store: Store, token: ReadableToken<T>): ReadableState<T>;
431
439
  declare function withdraw<T, K extends Canonical>(store: Store, token: RegularAtomFamilyToken<T, K>): RegularAtomFamily<T, K>;
432
440
  declare function withdraw<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical>(store: Store, token: MutableAtomFamilyToken<T, J, K>): MutableAtomFamily<T, J, K>;
433
441
  declare function withdraw<T, K extends Canonical>(store: Store, token: AtomFamilyToken<T>): AtomFamily<T, any>;
442
+ declare function withdraw<T, K extends Canonical>(store: Store, token: ReadonlyHeldSelectorFamilyToken<T, K>): ReadonlyHeldSelectorFamily<T, any>;
443
+ declare function withdraw<T, K extends Canonical>(store: Store, token: WritableHeldSelectorFamilyToken<T, K>): WritableHeldSelectorFamily<T, any>;
444
+ declare function withdraw<T, K extends Canonical>(store: Store, token: ReadonlyPureSelectorFamilyToken<T, K>): ReadonlyPureSelectorFamily<T, any>;
445
+ declare function withdraw<T, K extends Canonical>(store: Store, token: WritablePureSelectorFamilyToken<T, K>): WritablePureSelectorFamily<T, any>;
434
446
  declare function withdraw<T, K extends Canonical>(store: Store, token: ReadonlySelectorFamilyToken<T, K>): ReadonlySelectorFamily<T, any>;
435
447
  declare function withdraw<T, K extends Canonical>(store: Store, token: WritableSelectorFamilyToken<T, K>): WritableSelectorFamily<T, any>;
448
+ declare function withdraw<T, K extends Canonical>(store: Store, token: HeldSelectorFamilyToken<T, K>): HeldSelectorFamily<T, any>;
449
+ declare function withdraw<T, K extends Canonical>(store: Store, token: PureSelectorFamilyToken<T, K>): PureSelectorFamily<T, any>;
436
450
  declare function withdraw<T, K extends Canonical>(store: Store, token: SelectorFamilyToken<T, K>): SelectorFamily<T, any>;
437
451
  declare function withdraw<T, K extends Canonical>(store: Store, token: ReadableFamilyToken<T, K>): ReadableFamily<T, any>;
438
452
  declare function withdraw<T, K extends Canonical>(store: Store, token: WritableFamilyToken<T, K>): WritableFamily<T, any>;
@@ -465,11 +479,11 @@ declare function createMutableAtomFamily<T extends Transceiver<any>, J extends J
465
479
 
466
480
  //#endregion
467
481
  //#region src/internal/mutable/get-json-family.d.ts
468
- declare const getJsonFamily: <Core extends Transceiver<Json.Serializable>, SerializableCore extends Json.Serializable, Key extends Canonical>(mutableAtomFamily: MutableAtomFamilyToken<Core, SerializableCore, Key>, store: Store) => WritableSelectorFamily<SerializableCore, Key>;
482
+ declare const getJsonFamily: <Core extends Transceiver<Json.Serializable>, SerializableCore extends Json.Serializable, Key extends Canonical>(mutableAtomFamily: MutableAtomFamilyToken<Core, SerializableCore, Key>, store: Store) => WritablePureSelectorFamily<SerializableCore, Key>;
469
483
 
470
484
  //#endregion
471
485
  //#region src/internal/mutable/get-json-token.d.ts
472
- declare const getJsonToken: <Core extends Transceiver<any>, SerializableCore extends Json.Serializable>(store: Store, mutableAtomToken: MutableAtomToken<Core, SerializableCore>) => WritableSelectorToken<SerializableCore>;
486
+ declare const getJsonToken: <Core extends Transceiver<any>, SerializableCore extends Json.Serializable>(store: Store, mutableAtomToken: MutableAtomToken<Core, SerializableCore>) => WritablePureSelectorToken<SerializableCore>;
473
487
 
474
488
  //#endregion
475
489
  //#region src/internal/mutable/get-update-family.d.ts
@@ -569,8 +583,8 @@ declare function createAtomFamily<T extends Transceiver<any>, J extends Json.Ser
569
583
  declare function createAtomFamily<T, K extends Canonical>(store: Store, options: RegularAtomFamilyOptions<T, K>): RegularAtomFamilyToken<T, K>;
570
584
 
571
585
  //#endregion
572
- //#region src/internal/families/create-readonly-selector-family.d.ts
573
- declare function createReadonlySelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlySelectorFamilyOptions<T, K>, internalRoles?: string[]): ReadonlySelectorFamilyToken<T, K>;
586
+ //#region src/internal/families/create-readonly-pure-selector-family.d.ts
587
+ declare function createReadonlyPureSelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlyPureSelectorFamilyOptions<T, K>, internalRoles?: string[]): ReadonlyPureSelectorFamilyToken<T, K>;
574
588
 
575
589
  //#endregion
576
590
  //#region src/internal/families/create-regular-atom-family.d.ts
@@ -578,12 +592,14 @@ declare function createRegularAtomFamily<T, K extends Canonical>(store: Store, o
578
592
 
579
593
  //#endregion
580
594
  //#region src/internal/families/create-selector-family.d.ts
581
- declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: WritableSelectorFamilyOptions<T, K>): WritableSelectorFamilyToken<T, K>;
582
- declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlySelectorFamilyOptions<T, K>): ReadonlySelectorFamilyToken<T, K>;
595
+ declare function createSelectorFamily<T extends object, K extends Canonical>(store: Store, options: WritableHeldSelectorFamilyOptions<T, K>): WritableHeldSelectorFamilyToken<T, K>;
596
+ declare function createSelectorFamily<T extends object, K extends Canonical>(store: Store, options: ReadonlyHeldSelectorFamilyOptions<T, K>): ReadonlyHeldSelectorFamilyToken<T, K>;
597
+ declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: WritablePureSelectorFamilyOptions<T, K>): WritablePureSelectorFamilyToken<T, K>;
598
+ declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlyPureSelectorFamilyOptions<T, K>): ReadonlyPureSelectorFamilyToken<T, K>;
583
599
 
584
600
  //#endregion
585
- //#region src/internal/families/create-writable-selector-family.d.ts
586
- declare function createWritableSelectorFamily<T, K extends Canonical>(store: Store, options: WritableSelectorFamilyOptions<T, K>, internalRoles?: string[]): WritableSelectorFamilyToken<T, K>;
601
+ //#region src/internal/families/create-writable-pure-selector-family.d.ts
602
+ declare function createWritablePureSelectorFamily<T, K extends Canonical>(store: Store, options: WritablePureSelectorFamilyOptions<T, K>, internalRoles?: string[]): WritablePureSelectorFamilyToken<T, K>;
587
603
 
588
604
  //#endregion
589
605
  //#region src/internal/families/dispose-from-store.d.ts
@@ -595,8 +611,8 @@ declare function disposeFromStore<K extends Canonical>(store: Store, token: Read
595
611
  declare function findInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K>;
596
612
  declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K>;
597
613
  declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K>;
598
- declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableSelectorFamilyToken<T, K>, key: Key): WritableSelectorToken<T, K>;
599
- declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlySelectorFamilyToken<T, K>, key: Key): ReadonlySelectorToken<T, K>;
614
+ declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritablePureSelectorFamilyToken<T, K>, key: Key): WritablePureSelectorToken<T, K>;
615
+ declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlyPureSelectorFamilyToken<T, K>, key: Key): ReadonlyPureSelectorToken<T, K>;
600
616
  declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: SelectorFamilyToken<T, K>, key: Key): SelectorToken<T, K>;
601
617
  declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K>;
602
618
  declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K>;
@@ -606,8 +622,8 @@ declare function findInStore<T, K extends Canonical, Key extends K>(store: Store
606
622
  declare function initFamilyMemberInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K>;
607
623
  declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K>;
608
624
  declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K>;
609
- declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableSelectorFamilyToken<T, K>, key: Key): WritableSelectorToken<T, K>;
610
- declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlySelectorFamilyToken<T, K>, key: Key): ReadonlySelectorToken<T, K>;
625
+ declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritablePureSelectorFamilyToken<T, K>, key: Key): WritablePureSelectorToken<T, K>;
626
+ declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlyPureSelectorFamilyToken<T, K>, key: Key): ReadonlyPureSelectorToken<T, K>;
611
627
  declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: SelectorFamilyToken<T, K>, key: Key): SelectorToken<T, K>;
612
628
  declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K>;
613
629
  declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K>;
@@ -617,8 +633,8 @@ declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(
617
633
  declare function seekInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K> | undefined;
618
634
  declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K> | undefined;
619
635
  declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K> | undefined;
620
- declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableSelectorFamilyToken<T, K>, key: Key): WritableSelectorToken<T, K> | undefined;
621
- declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlySelectorFamilyToken<T, K>, key: Key): ReadonlySelectorToken<T, K> | undefined;
636
+ declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritablePureSelectorFamilyToken<T, K>, key: Key): WritablePureSelectorToken<T, K> | undefined;
637
+ declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadonlyPureSelectorFamilyToken<T, K>, key: Key): ReadonlyPureSelectorToken<T, K> | undefined;
622
638
  declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: SelectorFamilyToken<T, K>, key: Key): SelectorToken<T, K> | undefined;
623
639
  declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K> | undefined;
624
640
  declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K> | undefined;
@@ -724,17 +740,27 @@ type ReservedIntrospectionKey = `🔍 ${string}`;
724
740
  declare function isReservedIntrospectionKey(value: string): value is ReservedIntrospectionKey;
725
741
 
726
742
  //#endregion
727
- //#region src/internal/selector/create-readonly-selector.d.ts
728
- declare const createReadonlySelector: <T>(store: Store, options: ReadonlySelectorOptions<T>, family: FamilyMetadata | undefined) => ReadonlySelectorToken<T>;
743
+ //#region src/internal/selector/create-readonly-held-selector.d.ts
744
+ declare const createReadonlyHeldSelector: <T extends object>(store: Store, options: ReadonlyHeldSelectorOptions<T>, family: FamilyMetadata | undefined) => ReadonlyHeldSelectorToken<T>;
745
+
746
+ //#endregion
747
+ //#region src/internal/selector/create-readonly-pure-selector.d.ts
748
+ declare const createReadonlyPureSelector: <T>(store: Store, options: ReadonlyPureSelectorOptions<T>, family: FamilyMetadata | undefined) => ReadonlyPureSelectorToken<T>;
729
749
 
730
750
  //#endregion
731
751
  //#region src/internal/selector/create-standalone-selector.d.ts
732
- declare function createStandaloneSelector<T>(store: Store, options: WritableSelectorOptions<T>): WritableSelectorToken<T>;
733
- declare function createStandaloneSelector<T>(store: Store, options: ReadonlySelectorOptions<T>): ReadonlySelectorToken<T>;
752
+ declare function createStandaloneSelector<T extends object>(store: Store, options: WritableHeldSelectorOptions<T>): WritableHeldSelectorToken<T>;
753
+ declare function createStandaloneSelector<T extends object>(store: Store, options: ReadonlyHeldSelectorOptions<T>): ReadonlyHeldSelectorToken<T>;
754
+ declare function createStandaloneSelector<T>(store: Store, options: WritablePureSelectorOptions<T>): WritablePureSelectorToken<T>;
755
+ declare function createStandaloneSelector<T>(store: Store, options: ReadonlyPureSelectorOptions<T>): ReadonlyPureSelectorToken<T>;
734
756
 
735
757
  //#endregion
736
- //#region src/internal/selector/create-writable-selector.d.ts
737
- declare const createWritableSelector: <T>(store: Store, options: WritableSelectorOptions<T>, family: FamilyMetadata | undefined) => WritableSelectorToken<T>;
758
+ //#region src/internal/selector/create-writable-held-selector.d.ts
759
+ declare const createWritableHeldSelector: <T extends object>(store: Store, options: WritableHeldSelectorOptions<T>, family: FamilyMetadata | undefined) => WritableHeldSelectorToken<T>;
760
+
761
+ //#endregion
762
+ //#region src/internal/selector/create-writable-pure-selector.d.ts
763
+ declare const createWritablePureSelector: <T>(store: Store, options: WritablePureSelectorOptions<T>, family: FamilyMetadata | undefined) => WritablePureSelectorToken<T>;
738
764
 
739
765
  //#endregion
740
766
  //#region src/internal/selector/dispose-selector.d.ts
@@ -742,20 +768,20 @@ declare function disposeSelector(store: Store, selectorToken: SelectorToken<unkn
742
768
 
743
769
  //#endregion
744
770
  //#region src/internal/selector/get-selector-dependency-keys.d.ts
745
- declare const getSelectorDependencyKeys: (key: string, store: Store) => (AtomKey<unknown> | ReadonlySelectorKey<unknown> | SelectorKey<unknown>)[];
771
+ declare const getSelectorDependencyKeys: (store: Store, key: string) => (AtomKey<unknown> | ReadonlySelectorKey<unknown> | SelectorKey<unknown>)[];
746
772
 
747
773
  //#endregion
748
774
  //#region src/internal/selector/register-selector.d.ts
749
- declare const registerSelector: (selectorKey: string, covered: Set<string>, store: Store) => SetterToolkit;
775
+ declare const registerSelector: (store: Store, selectorType: `readonly_held_selector` | `readonly_pure_selector` | `writable_held_selector` | `writable_pure_selector`, selectorKey: string, covered: Set<string>) => SetterToolkit;
750
776
 
751
777
  //#endregion
752
778
  //#region src/internal/selector/trace-selector-atoms.d.ts
753
- declare const traceSelectorAtoms: (directDependencyKey: StateKey<unknown>, covered: Set<string>, store: Store) => AtomKey<unknown>[];
779
+ declare const traceSelectorAtoms: (store: Store, directDependencyKey: StateKey<unknown>, covered: Set<string>) => AtomKey<unknown>[];
754
780
  declare const traceAllSelectorAtoms: (selector: Selector<any>, store: Store) => AtomKey<unknown>[];
755
781
 
756
782
  //#endregion
757
783
  //#region src/internal/selector/update-selector-atoms.d.ts
758
- declare const updateSelectorAtoms: (selectorKey: string, dependency: ReadonlySelectorToken<unknown> | WritableToken<unknown>, covered: Set<string>, store: Store) => void;
784
+ declare const updateSelectorAtoms: (store: Store, selectorType: `readonly_held_selector` | `readonly_pure_selector` | `writable_held_selector` | `writable_pure_selector`, selectorKey: string, dependency: ReadonlyPureSelectorToken<unknown> | WritableToken<unknown>, covered: Set<string>) => void;
759
785
 
760
786
  //#endregion
761
787
  //#region src/internal/set-state/become.d.ts
@@ -820,16 +846,31 @@ type MutableAtom<T extends Transceiver<any>, J extends Json.Serializable> = Atom
820
846
  cleanup?: () => void;
821
847
  };
822
848
  type Atom<T> = RegularAtom<T> | (T extends Transceiver<any> ? MutableAtom<T, any> : never);
823
- type WritableSelector<T> = AtomIOState & {
824
- type: `selector`;
849
+ type WritableHeldSelector<T> = AtomIOState & {
850
+ type: `writable_held_selector`;
851
+ const: T;
825
852
  get: () => T;
826
853
  set: (newValue: T | ((oldValue: T) => T)) => void;
827
854
  };
828
- type ReadonlySelector<T> = AtomIOState & {
829
- type: `readonly_selector`;
855
+ type ReadonlyHeldSelector<T> = AtomIOState & {
856
+ type: `readonly_held_selector`;
857
+ const: T;
830
858
  get: () => T;
831
859
  };
832
- type Selector<T> = ReadonlySelector<T> | WritableSelector<T>;
860
+ type WritablePureSelector<T> = AtomIOState & {
861
+ type: `writable_pure_selector`;
862
+ get: () => T;
863
+ set: (newValue: T | ((oldValue: T) => T)) => void;
864
+ };
865
+ type ReadonlyPureSelector<T> = AtomIOState & {
866
+ type: `readonly_pure_selector`;
867
+ get: () => T;
868
+ };
869
+ type ReadonlySelector<T> = ReadonlyHeldSelector<T> | ReadonlyPureSelector<T>;
870
+ type WritableSelector<T> = WritableHeldSelector<T> | WritablePureSelector<T>;
871
+ type HeldSelector<T> = ReadonlyHeldSelector<T> | WritableHeldSelector<T>;
872
+ type PureSelector<T> = ReadonlyPureSelector<T> | WritablePureSelector<T>;
873
+ type Selector<T> = ReadonlyHeldSelector<T> | ReadonlyPureSelector<T> | WritableHeldSelector<T> | WritablePureSelector<T>;
833
874
  type WritableState<T> = Atom<T> | WritableSelector<T>;
834
875
  type ReadableState<T> = Atom<T> | Selector<T>;
835
876
  type RegularAtomFamily<T, K extends Canonical> = RegularAtomFamilyToken<T, K> & {
@@ -845,23 +886,39 @@ type MutableAtomFamily<T extends Transceiver<any>, J extends Json.Serializable,
845
886
  internalRoles: string[] | undefined;
846
887
  };
847
888
  type AtomFamily<T, K extends Canonical = Canonical> = MutableAtomFamily<T extends Transceiver<any> ? T : never, any, K> | RegularAtomFamily<T, K>;
848
- type WritableSelectorFamily<T, K extends Canonical> = WritableSelectorFamilyToken<T, K> & ((key: K) => WritableSelectorToken<T>) & {
889
+ type WritablePureSelectorFamily<T, K extends Canonical> = WritablePureSelectorFamilyToken<T, K> & ((key: K) => WritablePureSelectorToken<T>) & {
890
+ default: (key: K) => T;
891
+ subject: Subject<StateCreation<WritablePureSelectorToken<T>> | StateDisposal<WritablePureSelectorToken<T>>>;
892
+ install: (store: Store) => void;
893
+ internalRoles: string[] | undefined;
894
+ };
895
+ type WritableHeldSelectorFamily<T, K extends Canonical> = WritableHeldSelectorFamilyToken<T, K> & ((key: K) => WritableHeldSelectorToken<T>) & {
896
+ default: (key: K) => T;
897
+ subject: Subject<StateCreation<WritableHeldSelectorToken<T>> | StateDisposal<WritableHeldSelectorToken<T>>>;
898
+ install: (store: Store) => void;
899
+ internalRoles: string[] | undefined;
900
+ };
901
+ type ReadonlyPureSelectorFamily<T, K extends Canonical> = ReadonlyPureSelectorFamilyToken<T, K> & ((key: K) => ReadonlyPureSelectorToken<T>) & {
849
902
  default: (key: K) => T;
850
- subject: Subject<StateCreation<WritableSelectorToken<T>> | StateDisposal<WritableSelectorToken<T>>>;
903
+ subject: Subject<StateCreation<ReadonlyPureSelectorToken<T>> | StateDisposal<ReadonlyPureSelectorToken<T>>>;
851
904
  install: (store: Store) => void;
852
905
  internalRoles: string[] | undefined;
853
906
  };
854
- type ReadonlySelectorFamily<T, K extends Canonical> = ReadonlySelectorFamilyToken<T, K> & ((key: K) => ReadonlySelectorToken<T>) & {
907
+ type ReadonlyHeldSelectorFamily<T, K extends Canonical> = ReadonlyHeldSelectorFamilyToken<T, K> & ((key: K) => ReadonlyHeldSelectorToken<T>) & {
855
908
  default: (key: K) => T;
856
- subject: Subject<StateCreation<ReadonlySelectorToken<T>> | StateDisposal<ReadonlySelectorToken<T>>>;
909
+ subject: Subject<StateCreation<ReadonlyHeldSelectorToken<T>> | StateDisposal<ReadonlyHeldSelectorToken<T>>>;
857
910
  install: (store: Store) => void;
858
911
  internalRoles: string[] | undefined;
859
912
  };
860
- type SelectorFamily<T, K extends Canonical> = ReadonlySelectorFamily<T, K> | WritableSelectorFamily<T, K>;
861
- type WritableFamily<T, K extends Canonical> = AtomFamily<T, K> | WritableSelectorFamily<T, K>;
913
+ type PureSelectorFamily<T, K extends Canonical> = ReadonlyPureSelectorFamily<T, K> | WritablePureSelectorFamily<T, K>;
914
+ type HeldSelectorFamily<T, K extends Canonical> = ReadonlyHeldSelectorFamily<T, K> | WritableHeldSelectorFamily<T, K>;
915
+ type ReadonlySelectorFamily<T, K extends Canonical> = ReadonlyHeldSelectorFamily<T, K> | ReadonlyPureSelectorFamily<T, K>;
916
+ type WritableSelectorFamily<T, K extends Canonical> = WritableHeldSelectorFamily<T, K> | WritablePureSelectorFamily<T, K>;
917
+ type SelectorFamily<T, K extends Canonical> = HeldSelectorFamily<T, K> | PureSelectorFamily<T, K>;
918
+ type WritableFamily<T, K extends Canonical> = AtomFamily<T, K> | WritablePureSelectorFamily<T, K>;
862
919
  type ReadableFamily<T, K extends Canonical> = AtomFamily<T, K> | SelectorFamily<T, K>;
863
920
  type AtomIOInternalResource = ReadableFamily<any, any> | ReadableState<any> | Timeline<any> | Transaction<any>;
864
921
 
865
922
  //#endregion
866
- export { Atom, AtomFamily, AtomIOInternalResource, AtomIOState, AtomKey, BaseExternalStoreConfiguration, ChildStore, CircularBuffer, Count, Each, Empty, EnvironmentData, ExternalStoreConfiguration, ExternalStoreWithContentConfiguration, FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Flat, Func, Future, IMPLICIT, Join, JoinStateFamilies, Junction, JunctionAdvancedConfiguration, JunctionEntries, JunctionEntriesBase, JunctionJSON, JunctionSchema, JunctionSchemaBase, LazyMap, Lineage, Modify, Molecule, MutableAtom, MutableAtomFamily, NotFoundError, OperationProgress, ReadableFamily, ReadableState, ReadonlySelector, ReadonlySelectorFamily, ReadonlySelectorKey, Refinement, RegularAtom, RegularAtomFamily, ReservedIntrospectionKey, RootStore, Selector, SelectorFamily, SelectorKey, Signal$1 as Signal, StateKey, StatefulSubject, Store, StoreEventCarrier, Subject, TRANSACTION_PHASES, Timeline, TimelineAtomUpdate, TimelineMoleculeCreation, TimelineMoleculeDisposal, TimelineSelectorUpdate, TimelineStateCreation, TimelineStateDisposal, TimelineTransactionUpdate, Tracker, Transaction, TransactionEpoch, TransactionPhase, TransactionProgress, Transceiver, TransceiverMode, WritableFamily, WritableSelector, WritableSelectorFamily, WritableState, abortTransaction, actUponStore, allocateIntoStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, capitalize, claimWithinStore, clearStore, closeOperation, counterfeit, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, createWritableSelectorFamily, deallocateFromStore, deposit, disposeAtom, disposeFromStore, disposeSelector, editRelationsInStore, evictCachedValue, findInStore, findRelationsInStore, fuseWithinStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getInternalRelationsFromStore, getJoin, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getTrace, getUpdateFamily, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestMoleculeTransferEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, installIntoStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isReservedIntrospectionKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeRootMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, prettyPrintTokenType, readCachedValue, readOrComputeValue, recallState, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeInStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
923
+ export { Atom, AtomFamily, AtomIOInternalResource, AtomIOState, AtomKey, BaseExternalStoreConfiguration, ChildStore, CircularBuffer, Count, Each, Empty, EnvironmentData, ExternalStoreConfiguration, ExternalStoreWithContentConfiguration, FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Flat, Func, Future, HeldSelector, HeldSelectorFamily, IMPLICIT, Join, JoinStateFamilies, Junction, JunctionAdvancedConfiguration, JunctionEntries, JunctionEntriesBase, JunctionJSON, JunctionSchema, JunctionSchemaBase, LazyMap, Lineage, Modify, Molecule, MutableAtom, MutableAtomFamily, NotFoundError, OperationProgress, PureSelector, PureSelectorFamily, ReadableFamily, ReadableState, ReadonlyHeldSelector, ReadonlyHeldSelectorFamily, ReadonlyPureSelector, ReadonlyPureSelectorFamily, ReadonlySelector, ReadonlySelectorFamily, ReadonlySelectorKey, Refinement, RegularAtom, RegularAtomFamily, ReservedIntrospectionKey, RootStore, Selector, SelectorFamily, SelectorKey, Signal$1 as Signal, StateKey, StatefulSubject, Store, StoreEventCarrier, Subject, TRANSACTION_PHASES, Timeline, TimelineAtomUpdate, TimelineMoleculeCreation, TimelineMoleculeDisposal, TimelineSelectorUpdate, TimelineStateCreation, TimelineStateDisposal, TimelineTransactionUpdate, Tracker, Transaction, TransactionEpoch, TransactionPhase, TransactionProgress, Transceiver, TransceiverMode, WritableFamily, WritableHeldSelector, WritableHeldSelectorFamily, WritablePureSelector, WritablePureSelectorFamily, WritableSelector, WritableSelectorFamily, WritableState, abortTransaction, actUponStore, allocateIntoStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, capitalize, claimWithinStore, clearStore, closeOperation, counterfeit, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlyHeldSelector, createReadonlyPureSelector, createReadonlyPureSelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableHeldSelector, createWritablePureSelector, createWritablePureSelectorFamily, deallocateFromStore, deposit, disposeAtom, disposeFromStore, disposeSelector, editRelationsInStore, evictCachedValue, findInStore, findRelationsInStore, fuseWithinStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getInternalRelationsFromStore, getJoin, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getTrace, getUpdateFamily, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestMoleculeTransferEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, installIntoStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isReservedIntrospectionKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeRootMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, prettyPrintTokenType, readCachedValue, readOrComputeValue, recallState, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeInStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
867
924
  //# sourceMappingURL=index.d.ts.map