atom.io 0.44.12 → 0.44.13

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 (38) hide show
  1. package/dist/internal/index.js +8 -8
  2. package/dist/internal/index.js.map +1 -1
  3. package/dist/introspection/index.d.ts.map +1 -1
  4. package/dist/main/index.d.ts +6 -4
  5. package/dist/main/index.d.ts.map +1 -1
  6. package/dist/main/index.js +4 -3
  7. package/dist/main/index.js.map +1 -1
  8. package/dist/realtime/index.d.ts +94 -31
  9. package/dist/realtime/index.d.ts.map +1 -1
  10. package/dist/realtime/index.js +34 -1
  11. package/dist/realtime/index.js.map +1 -1
  12. package/dist/realtime-react/index.d.ts +3 -1
  13. package/dist/realtime-react/index.d.ts.map +1 -1
  14. package/dist/realtime-react/index.js +7 -4
  15. package/dist/realtime-react/index.js.map +1 -1
  16. package/dist/realtime-server/index.d.ts +43 -13
  17. package/dist/realtime-server/index.d.ts.map +1 -1
  18. package/dist/realtime-server/index.js +120 -63
  19. package/dist/realtime-server/index.js.map +1 -1
  20. package/package.json +10 -10
  21. package/src/internal/families/create-readonly-held-selector-family.ts +2 -2
  22. package/src/internal/families/create-readonly-pure-selector-family.ts +2 -2
  23. package/src/internal/families/create-regular-atom-family.ts +2 -2
  24. package/src/internal/families/create-writable-held-selector-family.ts +2 -2
  25. package/src/internal/families/create-writable-pure-selector-family.ts +2 -2
  26. package/src/internal/mutable/create-mutable-atom-family.ts +2 -2
  27. package/src/internal/not-found-error.ts +2 -2
  28. package/src/main/logger.ts +8 -4
  29. package/src/realtime/cast-socket.ts +73 -0
  30. package/src/realtime/index.ts +2 -0
  31. package/src/realtime/socket-interface.ts +1 -1
  32. package/src/realtime/standard-schema.ts +72 -0
  33. package/src/realtime-react/index.ts +1 -0
  34. package/src/realtime-react/realtime-context.tsx +0 -9
  35. package/src/realtime-react/use-realtime-rooms.ts +13 -0
  36. package/src/realtime-server/realtime-server-stores/index.ts +1 -1
  37. package/src/realtime-server/realtime-server-stores/provide-rooms.ts +368 -0
  38. package/src/realtime-server/realtime-server-stores/server-room-external-store.ts +0 -227
@@ -1,4 +1,4 @@
1
- import { AtomIOLogger, PRETTY_TOKEN_TYPES, decomposeCompound, simpleCompound } from "atom.io";
1
+ import { AtomIOLogger, PRETTY_ENTITY_NAMES, decomposeCompound, simpleCompound } from "atom.io";
2
2
  import { parseJson, stringifyJson } from "atom.io/json";
3
3
  import { UList } from "atom.io/transceivers/u-list";
4
4
 
@@ -1204,7 +1204,7 @@ const clearStore = (store) => {
1204
1204
  //#region src/internal/not-found-error.ts
1205
1205
  var NotFoundError = class extends Error {
1206
1206
  constructor(token, store) {
1207
- super(`${PRETTY_TOKEN_TYPES[token.type]} ${stringifyJson(token.key)} not found in store "${store.config.name}".`);
1207
+ super(`${PRETTY_ENTITY_NAMES[token.type]} ${stringifyJson(token.key)} not found in store "${store.config.name}".`);
1208
1208
  }
1209
1209
  };
1210
1210
 
@@ -1550,7 +1550,7 @@ function createReadonlyPureSelectorFamily(store, options, internalRoles) {
1550
1550
  type
1551
1551
  };
1552
1552
  const existing = store.families.get(familyKey);
1553
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1553
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1554
1554
  const subject = new Subject();
1555
1555
  const create = (key) => {
1556
1556
  const subKey = stringifyJson(key);
@@ -1593,7 +1593,7 @@ function createRegularAtomFamily(store, options, internalRoles) {
1593
1593
  type: `atom_family`
1594
1594
  };
1595
1595
  const existing = store.families.get(options.key);
1596
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, `atom_family`, options.key, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1596
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, `atom_family`, options.key, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1597
1597
  const subject = new Subject();
1598
1598
  const create = (key) => {
1599
1599
  const subKey = stringifyJson(key);
@@ -1635,7 +1635,7 @@ function createReadonlyHeldSelectorFamily(store, options, internalRoles) {
1635
1635
  type
1636
1636
  };
1637
1637
  const existing = store.families.get(familyKey);
1638
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1638
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1639
1639
  const subject = new Subject();
1640
1640
  const create = (key) => {
1641
1641
  const subKey = stringifyJson(key);
@@ -1672,7 +1672,7 @@ function createWritableHeldSelectorFamily(store, options, internalRoles) {
1672
1672
  type
1673
1673
  };
1674
1674
  const existing = store.families.get(familyKey);
1675
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1675
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1676
1676
  const subject = new Subject();
1677
1677
  const create = (key) => {
1678
1678
  const subKey = stringifyJson(key);
@@ -1710,7 +1710,7 @@ function createWritablePureSelectorFamily(store, options, internalRoles) {
1710
1710
  type
1711
1711
  };
1712
1712
  const existing = store.families.get(familyKey);
1713
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1713
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, type, familyKey, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
1714
1714
  const subject = new Subject();
1715
1715
  const create = (key) => {
1716
1716
  const subKey = stringifyJson(key);
@@ -2732,7 +2732,7 @@ function createMutableAtomFamily(store, options, internalRoles) {
2732
2732
  type: `mutable_atom_family`
2733
2733
  };
2734
2734
  const existing = store.families.get(options.key);
2735
- if (existing && store.config.isProduction === true) store.logger.error(`❗`, `mutable_atom_family`, options.key, `Overwriting an existing ${PRETTY_TOKEN_TYPES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
2735
+ if (existing && store.config.isProduction === true) store.logger.error(`❗`, `mutable_atom_family`, options.key, `Overwriting an existing ${PRETTY_ENTITY_NAMES[existing.type]} "${existing.key}" in store "${store.config.name}". You can safely ignore this warning if it is due to hot module replacement.`);
2736
2736
  const subject = new Subject();
2737
2737
  const create = (key) => {
2738
2738
  const subKey = stringifyJson(key);