@spearwolf/shadow-objects 0.33.0 → 0.34.0

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 (210) hide show
  1. package/CHANGELOG.md +320 -61
  2. package/README.md +57 -13
  3. package/bundle.js +5 -54
  4. package/package.json +7 -3
  5. package/src/ChangeTrailRefusedError.d.ts +27 -0
  6. package/src/ChangeTrailRefusedError.d.ts.map +1 -0
  7. package/src/ChangeTrailRefusedError.js +12 -0
  8. package/src/ChangeTrailRefusedError.js.map +7 -0
  9. package/src/EntityUuidInUseError.d.ts +19 -0
  10. package/src/EntityUuidInUseError.d.ts.map +1 -0
  11. package/src/EntityUuidInUseError.js +11 -0
  12. package/src/EntityUuidInUseError.js.map +7 -0
  13. package/src/WorkerTimeoutError.d.ts +25 -0
  14. package/src/WorkerTimeoutError.d.ts.map +1 -0
  15. package/src/WorkerTimeoutError.js +12 -0
  16. package/src/WorkerTimeoutError.js.map +7 -0
  17. package/src/bundle.d.ts +1 -1
  18. package/src/bundle.d.ts.map +1 -1
  19. package/src/bundle.js +1 -1
  20. package/src/bundle.js.map +2 -2
  21. package/src/constants.d.ts +9 -2
  22. package/src/constants.d.ts.map +1 -1
  23. package/src/constants.js +1 -1
  24. package/src/constants.js.map +2 -2
  25. package/src/create-worker.bundle.d.ts +1 -1
  26. package/src/create-worker.bundle.d.ts.map +1 -1
  27. package/src/create-worker.bundle.js.map +1 -1
  28. package/src/create-worker.d.ts +1 -1
  29. package/src/create-worker.d.ts.map +1 -1
  30. package/src/create-worker.js.map +1 -1
  31. package/src/elements/ShaeElement.d.ts +70 -2
  32. package/src/elements/ShaeElement.d.ts.map +1 -1
  33. package/src/elements/ShaeElement.js +129 -25
  34. package/src/elements/ShaeElement.js.map +3 -3
  35. package/src/elements/ShaeEntElement.d.ts +39 -1
  36. package/src/elements/ShaeEntElement.d.ts.map +1 -1
  37. package/src/elements/ShaeEntElement.js +397 -167
  38. package/src/elements/ShaeEntElement.js.map +2 -2
  39. package/src/elements/ShaeLifecycleElement.d.ts +71 -0
  40. package/src/elements/ShaeLifecycleElement.d.ts.map +1 -0
  41. package/src/elements/ShaeLifecycleElement.js +83 -0
  42. package/src/elements/ShaeLifecycleElement.js.map +7 -0
  43. package/src/elements/ShaePropElement.d.ts +52 -2
  44. package/src/elements/ShaePropElement.d.ts.map +1 -1
  45. package/src/elements/ShaePropElement.js +240 -219
  46. package/src/elements/ShaePropElement.js.map +2 -2
  47. package/src/elements/ShaeWorkerElement.d.ts +49 -5
  48. package/src/elements/ShaeWorkerElement.d.ts.map +1 -1
  49. package/src/elements/ShaeWorkerElement.js +204 -73
  50. package/src/elements/ShaeWorkerElement.js.map +2 -2
  51. package/src/elements/constants.d.ts +6 -0
  52. package/src/elements/constants.d.ts.map +1 -1
  53. package/src/elements/constants.js +12 -0
  54. package/src/elements/constants.js.map +2 -2
  55. package/src/elements/deferredTeardown.d.ts +24 -0
  56. package/src/elements/deferredTeardown.d.ts.map +1 -0
  57. package/src/elements/deferredTeardown.js +30 -0
  58. package/src/elements/deferredTeardown.js.map +7 -0
  59. package/src/elements/displayContentsRule.d.ts +25 -0
  60. package/src/elements/displayContentsRule.d.ts.map +1 -0
  61. package/src/elements/displayContentsRule.js +37 -0
  62. package/src/elements/displayContentsRule.js.map +7 -0
  63. package/src/elements/events.d.ts +10 -7
  64. package/src/elements/events.d.ts.map +1 -1
  65. package/src/elements/forwardCustomEvents.d.ts +19 -0
  66. package/src/elements/forwardCustomEvents.d.ts.map +1 -0
  67. package/src/elements/forwardCustomEvents.js +47 -0
  68. package/src/elements/forwardCustomEvents.js.map +7 -0
  69. package/src/elements/hostedSlots.d.ts +36 -0
  70. package/src/elements/hostedSlots.d.ts.map +1 -0
  71. package/src/elements/hostedSlots.js +118 -0
  72. package/src/elements/hostedSlots.js.map +7 -0
  73. package/src/elements/parentRemoval.d.ts +18 -0
  74. package/src/elements/parentRemoval.d.ts.map +1 -0
  75. package/src/elements/parentRemoval.js +60 -0
  76. package/src/elements/parentRemoval.js.map +7 -0
  77. package/src/elements/propValueConverters.d.ts +3 -0
  78. package/src/elements/propValueConverters.d.ts.map +1 -0
  79. package/src/elements/propValueConverters.js +54 -0
  80. package/src/elements/propValueConverters.js.map +7 -0
  81. package/src/elements/requestEntAncestor.d.ts +32 -0
  82. package/src/elements/requestEntAncestor.d.ts.map +1 -0
  83. package/src/elements/requestEntAncestor.js +16 -0
  84. package/src/elements/requestEntAncestor.js.map +7 -0
  85. package/src/elements.js.map +1 -1
  86. package/src/in-the-dark/Entity.d.ts +113 -3
  87. package/src/in-the-dark/Entity.d.ts.map +1 -1
  88. package/src/in-the-dark/Entity.js +292 -63
  89. package/src/in-the-dark/Entity.js.map +3 -3
  90. package/src/in-the-dark/Kernel.d.ts +76 -17
  91. package/src/in-the-dark/Kernel.d.ts.map +1 -1
  92. package/src/in-the-dark/Kernel.js +410 -378
  93. package/src/in-the-dark/Kernel.js.map +3 -3
  94. package/src/in-the-dark/Registry.d.ts.map +1 -1
  95. package/src/in-the-dark/Registry.js +83 -14
  96. package/src/in-the-dark/Registry.js.map +2 -2
  97. package/src/in-the-dark/ShadowObject.d.ts.map +1 -1
  98. package/src/in-the-dark/ShadowObject.js +1 -0
  99. package/src/in-the-dark/ShadowObject.js.map +2 -2
  100. package/src/in-the-dark/ShadowObjectCreationScope.d.ts +126 -0
  101. package/src/in-the-dark/ShadowObjectCreationScope.d.ts.map +1 -0
  102. package/src/in-the-dark/ShadowObjectCreationScope.js +596 -0
  103. package/src/in-the-dark/ShadowObjectCreationScope.js.map +7 -0
  104. package/src/in-the-dark/SignalsPath.d.ts.map +1 -1
  105. package/src/in-the-dark/SignalsPath.js +2 -2
  106. package/src/in-the-dark/SignalsPath.js.map +2 -2
  107. package/src/in-the-dark/events.js.map +1 -1
  108. package/src/in-the-dark/importModule.d.ts +7 -0
  109. package/src/in-the-dark/importModule.d.ts.map +1 -1
  110. package/src/in-the-dark/importModule.js +5 -2
  111. package/src/in-the-dark/importModule.js.map +2 -2
  112. package/src/index.d.ts +7 -1
  113. package/src/index.d.ts.map +1 -1
  114. package/src/index.js +5 -1
  115. package/src/index.js.map +2 -2
  116. package/src/shadow-objects.d.ts +2 -0
  117. package/src/shadow-objects.d.ts.map +1 -1
  118. package/src/shadow-objects.js +2 -0
  119. package/src/shadow-objects.js.map +2 -2
  120. package/src/shadow-objects.worker.js +0 -1
  121. package/src/shadow-objects.worker.js.map +2 -2
  122. package/src/shae-ent.js.map +1 -1
  123. package/src/shae-prop.js +2 -2
  124. package/src/shae-prop.js.map +2 -2
  125. package/src/shae-worker.js.map +1 -1
  126. package/src/types.d.ts +35 -4
  127. package/src/types.d.ts.map +1 -1
  128. package/src/utils/ConsoleLogger.d.ts +45 -10
  129. package/src/utils/ConsoleLogger.d.ts.map +1 -1
  130. package/src/utils/ConsoleLogger.js +51 -26
  131. package/src/utils/ConsoleLogger.js.map +2 -2
  132. package/src/utils/FrameLoop.d.ts +42 -3
  133. package/src/utils/FrameLoop.d.ts.map +1 -1
  134. package/src/utils/FrameLoop.js +71 -10
  135. package/src/utils/FrameLoop.js.map +2 -2
  136. package/src/utils/MicrotaskCollector.d.ts +45 -0
  137. package/src/utils/MicrotaskCollector.d.ts.map +1 -0
  138. package/src/utils/MicrotaskCollector.js +33 -0
  139. package/src/utils/MicrotaskCollector.js.map +7 -0
  140. package/src/utils/MicrotaskGate.d.ts +17 -0
  141. package/src/utils/MicrotaskGate.d.ts.map +1 -0
  142. package/src/utils/MicrotaskGate.js +20 -0
  143. package/src/utils/MicrotaskGate.js.map +7 -0
  144. package/src/utils/array-utils.js.map +1 -1
  145. package/src/utils/attr-utils.d.ts +6 -0
  146. package/src/utils/attr-utils.d.ts.map +1 -1
  147. package/src/utils/attr-utils.js +3 -1
  148. package/src/utils/attr-utils.js.map +2 -2
  149. package/src/utils/constants.js.map +1 -1
  150. package/src/utils/generateUUID.d.ts +11 -0
  151. package/src/utils/generateUUID.d.ts.map +1 -1
  152. package/src/utils/generateUUID.js +31 -266
  153. package/src/utils/generateUUID.js.map +2 -2
  154. package/src/utils/props-utils.d.ts +3 -2
  155. package/src/utils/props-utils.d.ts.map +1 -1
  156. package/src/utils/props-utils.js +13 -24
  157. package/src/utils/props-utils.js.map +2 -2
  158. package/src/utils/runGuarded.d.ts +27 -0
  159. package/src/utils/runGuarded.d.ts.map +1 -0
  160. package/src/utils/runGuarded.js +11 -0
  161. package/src/utils/runGuarded.js.map +7 -0
  162. package/src/utils/toMaybe.d.ts.map +1 -1
  163. package/src/utils/toMaybe.js.map +1 -1
  164. package/src/utils/toNamespace.d.ts.map +1 -1
  165. package/src/utils/toNamespace.js.map +1 -1
  166. package/src/utils/toUrlString.d.ts +12 -0
  167. package/src/utils/toUrlString.d.ts.map +1 -1
  168. package/src/utils/toUrlString.js.map +2 -2
  169. package/src/utils/waitForMessageOfType.d.ts +12 -1
  170. package/src/utils/waitForMessageOfType.d.ts.map +1 -1
  171. package/src/utils/waitForMessageOfType.js +16 -1
  172. package/src/utils/waitForMessageOfType.js.map +2 -2
  173. package/src/view/ComponentChanges.d.ts +88 -1
  174. package/src/view/ComponentChanges.d.ts.map +1 -1
  175. package/src/view/ComponentChanges.js +243 -73
  176. package/src/view/ComponentChanges.js.map +2 -2
  177. package/src/view/ComponentContext.d.ts +206 -16
  178. package/src/view/ComponentContext.d.ts.map +1 -1
  179. package/src/view/ComponentContext.js +548 -91
  180. package/src/view/ComponentContext.js.map +2 -2
  181. package/src/view/ComponentMemory.d.ts +3 -3
  182. package/src/view/ComponentMemory.d.ts.map +1 -1
  183. package/src/view/ComponentMemory.js.map +1 -1
  184. package/src/view/IShadowObjectEnvProxy.d.ts +29 -3
  185. package/src/view/IShadowObjectEnvProxy.d.ts.map +1 -1
  186. package/src/view/LocalShadowObjectEnv.d.ts +1 -1
  187. package/src/view/LocalShadowObjectEnv.d.ts.map +1 -1
  188. package/src/view/LocalShadowObjectEnv.js +8 -6
  189. package/src/view/LocalShadowObjectEnv.js.map +2 -2
  190. package/src/view/RemoteWorkerEnv.d.ts +89 -5
  191. package/src/view/RemoteWorkerEnv.d.ts.map +1 -1
  192. package/src/view/RemoteWorkerEnv.js +195 -77
  193. package/src/view/RemoteWorkerEnv.js.map +2 -2
  194. package/src/view/ShadowEnv.d.ts +49 -2
  195. package/src/view/ShadowEnv.d.ts.map +1 -1
  196. package/src/view/ShadowEnv.js +223 -60
  197. package/src/view/ShadowEnv.js.map +2 -2
  198. package/src/view/ViewComponent.d.ts +78 -14
  199. package/src/view/ViewComponent.d.ts.map +1 -1
  200. package/src/view/ViewComponent.js +90 -14
  201. package/src/view/ViewComponent.js.map +2 -2
  202. package/src/view/cloneChangeTrail.js.map +2 -2
  203. package/src/worker/MessageRouter.d.ts +14 -0
  204. package/src/worker/MessageRouter.d.ts.map +1 -1
  205. package/src/worker/MessageRouter.js +75 -15
  206. package/src/worker/MessageRouter.js.map +2 -2
  207. package/src/worker/WorkerRuntime.d.ts +22 -1
  208. package/src/worker/WorkerRuntime.d.ts.map +1 -1
  209. package/src/worker/WorkerRuntime.js +60 -8
  210. package/src/worker/WorkerRuntime.js.map +2 -2
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/in-the-dark/ShadowObjectCreationScope.ts"],
4
+ "sourcesContent": ["import {emit, on, once, Priority} from '@spearwolf/eventize';\nimport {\n type CompareFunc,\n createEffect,\n createMemo,\n createSignal,\n destroySignal,\n isSignal,\n link,\n type Signal,\n type SignalReader,\n} from '@spearwolf/signalize';\nimport type {Maybe, ProvideContextOptions, ShadowObjectCreationAPI, ShadowObjectType, SignalValueOptions} from '../types.js';\nimport type {ConsoleLogger} from '../utils/ConsoleLogger.js';\nimport {runGuarded} from '../utils/runGuarded.js';\nimport {toMaybe} from '../utils/toMaybe.js';\nimport type {Entity} from './Entity.js';\nimport {onDestroy, onViewEvent} from './events.js';\n\n/**\n * What a creation-API call gets once the scope has closed: a real `Signal`, created and destroyed\n * on the spot. Reading it gives `undefined` and writing to it reaches nobody -- a destroyed signal\n * keeps its value but has neither effect nor link left on it. It belongs to whoever asked for it\n * and goes when they do, so a scope that is asked again and again after its end holds nothing.\n */\nconst inertSignal = (): Signal<any> => {\n const sig = createSignal<any>(undefined);\n destroySignal(sig);\n return sig;\n};\n\n/** The same for `createEffect()`: a real `Effect`, never run, already destroyed. */\nconst inertEffect = (): ReturnType<typeof createEffect> => {\n const effect = createEffect(() => {}, {autorun: false});\n effect.destroy();\n return effect;\n};\n\n/** The handle a late `on()` or `once()` gets: there is no subscription behind it. */\nconst noSubscription = (): void => {};\n\n/**\n * Everything a single shadow-object was given at construction time, and the end of all of it.\n *\n * The scope holds the signals, links and subscriptions the creation API hands out, and it hands the API\n * itself to the kernel through `createAPI()`. The instance stays with the kernel: a shadow-object only ever\n * sees the API object, never the scope behind it.\n *\n * One scope belongs to exactly one shadow-object, and it ends with it -- or, where the constructor throws,\n * without it: a scope that never reached `bindTo()` is torn down by the kernel on the spot, and everything the\n * constructor registered before the throw is released, although no shadow-object came out of it.\n *\n * Eight methods share their name with a module-level import: `on`, `once`, `emit`, `onDestroy`,\n * `onViewEvent`, `createSignal`, `createEffect` and `createMemo`. They are named that way deliberately,\n * because those names are part of the `ShadowObjectCreationAPI` contract a shadow-object destructures by\n * name. Seven of them call or reference their namesake inside their own body; `onDestroy` is the exception,\n * as its import is the entity event that `bindTo()` subscribes to. A bare name inside one of these eight\n * bodies is therefore always the import, and a call on the method of the same name always carries `this.`\n * -- `inertSignal`, `inertEffect` and `noSubscription` are bare names of a different kind, module-level\n * functions with no method of the same name to tell them apart from.\n */\nexport class ShadowObjectCreationScope {\n readonly #entity: Entity;\n readonly #logger: ConsoleLogger;\n readonly #displayName: string;\n\n // The kernel's list of member names whose deprecation report has already been made. Shared by\n // every scope of one kernel, which is what makes the report fall once per kernel and name.\n readonly #shownDeprecations: Set<string>;\n\n // The cleanup callbacks of the shadow-object itself, registered through `onDestroy()`.\n readonly #unsubscribePrimary = new Set<() => any>();\n\n // The cleanup callbacks the creation API registered on its own behalf. A `Set` iterating in\n // insertion order: which cleanup runs before which is observable behaviour.\n readonly #unsubscribeSecondary = new Set<() => any>();\n\n // The releases of the provider feeds, one per context name this shadow-object provides. The\n // entity hands each of them out when the provider is attached to it, and they fall after every\n // other cleanup callback, so a write the teardown still makes -- the `undefined` of a\n // `clearOnDestroy`, or one from an `onDestroy` callback -- reaches the entity-side signal instead\n // of stopping at the provider. Where the entity lives on, that is what makes the write count: the\n // entity hands it on to its own context signal one microtask later, and from there to its readers\n // and to the entities below it. The order matters in the other direction as well, because a\n // release also lets a provider that stays on the entity write its value once more, and that\n // hand-over may only happen once the write of the leaving provider is through.\n //\n // Where the entity is destroyed, the two kinds of target part ways. The signal behind\n // `provideContext()` takes the write and keeps it: the microtask that would hand it on falls\n // after the entity has cleared and destroyed its context signals, and the children that outlive\n // it were re-bound before the teardown even began. The signal behind `provideGlobalContext()`\n // stays a member of the kernel-wide chain of its name until the entity's own destruction runs at\n // `Priority.Min`, so the write does travel on to the inherited signals of other entities -- with\n // no observable difference, because the entity takes its signal out of that chain in the same run,\n // and what the chain resolves to without it is what those readers were going to see anyway: the\n // contribution of the next entity that holds the name, or nothing where there is none. The\n // ordering is kept for the paths on which it is observable.\n readonly #unsubscribeContextFeeds = new Set<() => any>();\n\n readonly #contextReaders = new Map<string | symbol, SignalReader<any>>();\n readonly #contextReaderCompares = new Map<string | symbol, CompareFunc<any> | undefined>();\n readonly #contextParentReaders = new Map<string | symbol, SignalReader<any>>();\n readonly #contextParentReaderCompares = new Map<string | symbol, CompareFunc<any> | undefined>();\n readonly #contextProviders = new Map<string | symbol, Signal<any>>();\n readonly #contextRootProviders = new Map<string | symbol, Signal<any>>();\n\n // The provider signals that already have their `clearOnDestroy` write registered in\n // `#unsubscribeSecondary`. Keyed by the signal itself rather than by name, because a\n // `provideContext(name)` and a `provideGlobalContext(name)` call can share one name while landing\n // in two different maps above -- a name-keyed set would conflate the two providers.\n readonly #clearOnDestroyRegistered = new Set<Signal<any>>();\n\n readonly #propertyReaders = new Map<string, SignalReader<any>>();\n readonly #propertyCompares = new Map<string, CompareFunc<any> | undefined>();\n\n #shadowObject: ShadowObjectType | undefined;\n #releaseScope: (() => void) | undefined;\n #forgetShadowObject: (() => void) | undefined;\n #unsubscribeFromEntityDestroy: (() => void) | undefined;\n\n #isTornDown = false;\n\n // Armed at the *end* of `tearDown()`, not at its start, and the difference is the whole point:\n // the teardown runs the shadow-object's own cleanup callbacks, and those are allowed the creation\n // API -- a goodbye to the view, a last write. What they register there is still swept up by the\n // steps behind them. What arrives after the teardown has returned is not, which is what this\n // closes.\n #isCreationApiClosed = false;\n\n // The member names whose late call has already been reported, at most as many as the API has\n // members. Lazy, because a scope that is used correctly never allocates it.\n #lateCallsReported: Set<string> | undefined;\n\n /**\n * The name the kernel gave this scope, taken from the constructor it belongs to rather than from\n * the shadow-object that came out of it. The two agree for most forms -- a class and a function\n * that returns nothing both leave their own name on the instance's `constructor` -- but not for a\n * function that returns an object literal: `new` hands that literal back, and it reports `Object`.\n * Reports about the shadow-object are keyed by this name, so the kernel reads it here instead of\n * asking the instance.\n */\n get displayName(): string {\n return this.#displayName;\n }\n\n /**\n * The four teardown handles, read without waiting on a garbage collector: a test can check that\n * `tearDown()` let go of them by comparing this before and after, rather than by proving the\n * absence of a reference through a `WeakRef`.\n *\n * @internal\n */\n get debugHandles(): {\n shadowObject: ShadowObjectType | undefined;\n releaseScope: (() => void) | undefined;\n forgetShadowObject: (() => void) | undefined;\n unsubscribeFromEntityDestroy: (() => void) | undefined;\n } {\n return {\n shadowObject: this.#shadowObject,\n releaseScope: this.#releaseScope,\n forgetShadowObject: this.#forgetShadowObject,\n unsubscribeFromEntityDestroy: this.#unsubscribeFromEntityDestroy,\n };\n }\n\n /**\n * How many cleanup callbacks the scope is holding, one count per set, read without waiting on a\n * garbage collector: a test can subscribe and unsubscribe n times and see that the scope let go\n * of each handle as it went, rather than inferring it from what a collector happened to do.\n *\n * @internal\n */\n get debugCleanupCounts(): {primary: number; secondary: number; contextFeeds: number} {\n return {\n primary: this.#unsubscribePrimary.size,\n secondary: this.#unsubscribeSecondary.size,\n contextFeeds: this.#unsubscribeContextFeeds.size,\n };\n }\n\n constructor(entity: Entity, logger: ConsoleLogger, displayName: string, shownDeprecations: Set<string>) {\n this.#entity = entity;\n this.#logger = logger;\n this.#displayName = displayName;\n this.#shownDeprecations = shownDeprecations;\n }\n\n /**\n * The object that goes into `new construct(\u2026)`.\n *\n * Every member is a bound function, because a shadow-object constructor is expected to destructure the\n * API in its parameter list \u2014 a member that took its receiver from the call site would lose it there.\n */\n createAPI(): ShadowObjectCreationAPI {\n return {\n entity: this.#entity,\n\n provideContext: this.provideContext.bind(this),\n provideGlobalContext: this.provideGlobalContext.bind(this),\n useContext: this.useContext.bind(this),\n useParentContext: this.useParentContext.bind(this),\n\n dispatchMessageToView: this.dispatchMessageToView.bind(this),\n\n useProperty: this.useProperty.bind(this),\n useProperties: this.useProperties.bind(this),\n\n createResource: this.createResource.bind(this),\n createEffect: this.createEffect.bind(this),\n createSignal: this.createSignal.bind(this),\n createMemo: this.createMemo.bind(this),\n\n on: this.on.bind(this),\n once: this.once.bind(this),\n emit: this.emit.bind(this),\n onViewEvent: this.onViewEvent.bind(this),\n onDestroy: this.onDestroy.bind(this),\n };\n }\n\n /**\n * Binds the scope to the shadow-object it made the API for and subscribes to the destruction of the entity.\n *\n * A shadow-object reaches its end on two independent paths: the entity is destroyed, or the shadow-object\n * leaves the constructor set of a still living entity (token or route change). Both run the same teardown,\n * and each path reaches it through a handle of its own.\n *\n * The kernel keeps two releases rather than one, because they belong to opposite ends of the teardown:\n * `releaseScope` runs at its start, `forgetShadowObject` at its end.\n *\n * One scope serves one shadow-object, once: the call is part of the contract, and both ways of breaking\n * it are refused below.\n */\n bindTo(shadowObject: ShadowObjectType, releaseScope: () => void, forgetShadowObject: () => void): void {\n // Refused rather than quietly returned, unlike `tearDown()`, where a second call is two teardown paths\n // legitimately meeting. A second binding is nothing of the sort -- it would mean one scope serving two\n // shadow-objects. It would replace the handles of the first: the release of the kernel's map entry and\n // the unsubscribe from the entity's `onDestroy`, leaving the first shadow-object standing in the kernel\n // and on the entity with nothing left to take it out.\n //\n // The teardown is asked about first, because it is the only one of the two checks that still applies to\n // a torn-down scope: `tearDown()` lets go of `#shadowObject` at its own end, so a scope that has already\n // torn down would otherwise sail straight past the second check below and rebind. Once a scope carries a\n // shadow-object, it is the second check that tells a live scope's first binding from its second -- the\n // two never overlap on a scope that is still live.\n if (this.#isTornDown) {\n throw new Error(`the creation scope of \"${this.#displayName}\" has torn down and cannot be bound`);\n }\n if (this.#shadowObject !== undefined) {\n throw new Error(`the creation scope of \"${this.#displayName}\" is already bound to a shadow-object`);\n }\n\n this.#shadowObject = shadowObject;\n this.#releaseScope = releaseScope;\n this.#forgetShadowObject = forgetShadowObject;\n\n this.#logger.info('create shadow-object', this.#displayName, {shadowObject, entity: this.#entity});\n\n this.#unsubscribeFromEntityDestroy = once(this.#entity, onDestroy, Priority.Low, () => {\n this.tearDown();\n });\n }\n\n /**\n * Runs once, whichever path reaches it first.\n *\n * Three lead here. Two belong to a shadow-object that lived: its entity is destroyed, or it leaves the\n * constructor set of an entity that stays. On the third, the kernel calls this directly on a scope that\n * `bindTo()` never saw, because the constructor threw -- there is no shadow-object then, and three of the\n * handles below are still unset (`#releaseScope` and `#unsubscribeFromEntityDestroy` at the start,\n * `#forgetShadowObject` at the end), which is why all three are called optionally.\n *\n * The provider feeds are released after everything else, so that a write made on the way out reaches the\n * entity-side signal rather than stopping at the provider, and so that the entity hands the context over to\n * a provider that stays only once that write is through.\n *\n * The flag makes the teardown a one-time act: a destroy callback reaching back into the kernel finds no\n * way to start it a second time. Releasing both handles right after ends the retention in both directions\n * -- the kernel's map points from the shadow-object to this scope, the subscription points from the entity\n * to the same scope.\n *\n * The kernel is told to forget the shadow-object at the very end, so a destroy callback that reaches back\n * into the kernel still finds its shadow-object listed among the ones the constructor created. Once that\n * call is through, the four handles above are let go of as well -- the shadow-object, both kernel releases\n * and the entity subscription -- so a scope past this point holds none of the four through these fields.\n *\n * Every step below runs behind its own guard, so a callback or signal teardown that throws does not stop\n * the ones after it: the remaining callbacks, the remaining signal releases, and the provider feed\n * hand-over all still happen. A caught error goes to the logger by displayName and the label of the step\n * that failed, and is not re-thrown -- neither `changeToken()` nor `destroyEntity()` deliver it to their\n * caller, nor does it stop the destroy notification the entity is still delivering to whatever comes after\n * this shadow-object in the same run.\n *\n * The creation API is closed as the very last step, after everything above has run. Until then it\n * is open, because the cleanup callbacks of the shadow-object run inside this method and are\n * entitled to it -- a last message to the view, a last write to a context. What such a callback\n * registers is still reached by the steps behind it. The two sets of cleanup callbacks are run\n * in rounds until neither has anything left, so a callback that another one registers is reached\n * whichever of the two it lands in. The context feed releases follow all of them. What arrives\n * once this method has returned is not, and is turned away by `#refuseAfterTearDown()`.\n */\n tearDown(): void {\n if (this.#isTornDown) return;\n this.#isTornDown = true;\n\n this.#runGuarded('scope release', () => this.#releaseScope?.());\n this.#runGuarded('entity destroy subscription', () => this.#unsubscribeFromEntityDestroy?.());\n\n // Without a shadow-object there is nothing to report here: none ever came to be, because the\n // constructor threw before it could.\n if (this.#shadowObject !== undefined) {\n this.#logger.info('destroy shadow-object', this.#displayName, {shadowObject: this.#shadowObject, entity: this.#entity});\n }\n\n // The two callback sets are run in rounds, and the rounds are what a cleanup that books into a\n // set which has already had its turn needs. A `for\u2026of` over a `Set` reaches what is added to it\n // while it runs, so a callback that registers another one of its own kind is caught by the pass\n // it stands in. Across the two sets there is no such reach: a creation-api cleanup that calls\n // `onDestroy()` books into the first set, which is through, and a callback pulled along that way\n // may take a subscription or create a signal, which books back into the second. Each of them gets\n // its turn here, and the teardown ends when neither set has anything left to run. A pass skips\n // what has already run, so a callback that hands itself in again is not called twice; one that\n // hands in a new callback every time does not terminate.\n const alreadyRun = new Set<() => any>();\n\n const runCleanups = (callbacks: Set<() => any>, step: string): boolean => {\n let ranAny = false;\n for (const callback of callbacks) {\n if (alreadyRun.has(callback)) continue;\n alreadyRun.add(callback);\n ranAny = true;\n this.#runGuarded(step, callback);\n }\n return ranAny;\n };\n\n let ranAnything = true;\n while (ranAnything) {\n const ranPrimary = runCleanups(this.#unsubscribePrimary, 'onDestroy callback');\n const ranSecondary = runCleanups(this.#unsubscribeSecondary, 'creation-api cleanup');\n ranAnything = ranPrimary || ranSecondary;\n }\n\n for (const callback of this.#unsubscribeContextFeeds) {\n this.#runGuarded('context feed release', callback);\n }\n\n for (const sig of this.#contextReaders.values()) {\n this.#runGuarded('context reader', () => destroySignal(sig));\n }\n\n for (const sig of this.#contextParentReaders.values()) {\n this.#runGuarded('parent context reader', () => destroySignal(sig));\n }\n\n for (const sig of this.#propertyReaders.values()) {\n this.#runGuarded('property reader', () => destroySignal(sig));\n }\n\n for (const sig of this.#contextProviders.values()) {\n this.#runGuarded('context provider', () => destroySignal(sig));\n }\n\n for (const sig of this.#contextRootProviders.values()) {\n this.#runGuarded('global context provider', () => destroySignal(sig));\n }\n\n this.#unsubscribePrimary.clear();\n this.#unsubscribeSecondary.clear();\n this.#unsubscribeContextFeeds.clear();\n this.#contextReaders.clear();\n this.#contextReaderCompares.clear();\n this.#contextParentReaders.clear();\n this.#contextParentReaderCompares.clear();\n this.#propertyReaders.clear();\n this.#propertyCompares.clear();\n this.#contextProviders.clear();\n this.#contextRootProviders.clear();\n this.#clearOnDestroyRegistered.clear();\n\n this.#runGuarded('forget shadow-object', () => this.#forgetShadowObject?.());\n\n // Let go of the shadow-object and both kernel handles: nothing reads them past this point --\n // the info line above already ran, `#releaseScope` and `#unsubscribeFromEntityDestroy` were\n // called at the start of this method, and `#forgetShadowObject` was just called above. A scope\n // past this point holds neither the shadow-object nor either kernel handle through these\n // fields. `#entity` is a separate, `readonly` field the scope carries for its whole life --\n // it stays set here, and the entity, with the kernel behind it, stays reachable through it\n // whether or not the scope has torn down.\n this.#shadowObject = undefined;\n this.#releaseScope = undefined;\n this.#forgetShadowObject = undefined;\n this.#unsubscribeFromEntityDestroy = undefined;\n\n this.#isCreationApiClosed = true;\n }\n\n /**\n * Isolates one teardown step from the ones around it: a step that throws is reported through the\n * logger -- ungated, so the report stays visible outside localhost -- and does not stop `tearDown()`\n * from reaching the steps that follow. The report goes out through the shared `runGuarded()`;\n * what this wrapper adds is the label of the step and the display name it belongs to.\n */\n #runGuarded(step: string, run: () => void): void {\n runGuarded(this.#logger, run, `shadow-object teardown failed (${step}):`, this.#displayName);\n }\n\n /**\n * Books an `on()` or `once()` subscription into the cleanup set and hands back a handle that takes\n * it out again. Unsubscribing releases the callback there and then rather than at the teardown, so\n * a shadow-object that subscribes and unsubscribes over the whole life of its entity holds one\n * handle at a time instead of one per call. The target makes no difference to that: a subscription\n * on the entity ends the same way one on any other object does.\n */\n #trackSubscription(unsubscribe: () => void): () => void {\n this.#unsubscribeSecondary.add(unsubscribe);\n\n return Object.assign(() => {\n this.#unsubscribeSecondary.delete(unsubscribe);\n unsubscribe();\n }, unsubscribe);\n }\n\n /**\n * The body the three cached readers share: one reader per name, created on the first call and fed\n * from the entity-side source, plus a warning when a later call brings a different {compare}\n * function than the one the reader was created with.\n *\n * `linkSource` is a thunk because the source may only be read when a reader is actually created.\n */\n #cachedReader<K extends string | symbol>(\n name: K,\n readers: Map<K, SignalReader<any>>,\n compares: Map<K, CompareFunc<any> | undefined>,\n linkSource: () => SignalReader<any>,\n opts: SignalValueOptions<any> | undefined,\n apiName: string,\n subject: string,\n ): SignalReader<any> {\n let reader = readers.get(name);\n\n if (reader === undefined) {\n reader = createSignal<any>(undefined, opts).get;\n readers.set(name, reader);\n compares.set(name, opts?.compare);\n // Destroying this link is what ends the feed: the entity-side signal must not go on writing\n // into a reader that the teardown has already destroyed.\n const ln = link(linkSource(), reader);\n this.#unsubscribeSecondary.add(ln.destroy.bind(ln));\n } else if (opts?.compare != null && compares.get(name) !== opts.compare) {\n // Through `error` for the same reason as the deprecation report below: the options of this\n // call are being dropped, and the caller has to hear that outside `localhost` too, where the\n // shared `enable` behind `isWarn` is off.\n this.#logger.error(\n `[shadow-objects] ${apiName}(\"${String(name)}\"): the cached signal already exists with a different (or no) {compare} function \u2014 the new options are ignored. Pass options only on the first call per ${subject}.`,\n );\n }\n\n return reader;\n }\n\n /**\n * Reports the deprecated call form in which a bare compare function stands where the options\n * object belongs, at most once per kernel and member name.\n *\n * Through `error` rather than `warn`: this names a mistake in the calling code, and its author\n * has to see it wherever the application runs. `logger.warn` is asked `isWarn` first, and the\n * shared `enable` behind that getter is off anywhere but `localhost` -- a deprecation notice\n * that goes silent everywhere the code actually ships is no notice at all. See the table of\n * call against getter under \"Console Logger\" in `docs/api-reference.md`.\n *\n * One line per kernel and member name: a shadow-object calling a deprecated member inside a\n * loop would otherwise fill the console.\n */\n #reportDeprecatedIsEqualOption(options: unknown, apiName: string): void {\n if (typeof options !== 'function' || this.#shownDeprecations.has(apiName)) return;\n this.#logger.error(\n `[shadow-objects] Deprecation Warning: The \"isEqual\" option of \"${apiName}()\" is now passed as {compare} argument. Please update your code accordingly.`,\n );\n this.#shownDeprecations.add(apiName);\n }\n\n /**\n * Answers whether the creation API still has anything to give, and reports it where it has not.\n *\n * Past the teardown the scope has released what it held and cleared what it tracked. A call\n * arriving now would fill those maps again with entries no second teardown ever reaches -- the\n * teardown runs once, and it has run. Such a call is therefore turned away rather than served.\n *\n * Turned away quietly: the callers that arrive late are the ones with nobody to catch a throw --\n * a timer, a continuation behind an `await`, a callback of some other object that outlived this\n * one. It is reported instead, through `error` for the same reason the deprecation report above\n * uses it: this names a mistake in the calling code, and its author has to see it wherever the\n * application runs. Once per member name and scope, because a stale timer comes back on its next\n * tick and a line per tick would bury the first one.\n */\n #refuseAfterTearDown(apiName: string): boolean {\n if (!this.#isCreationApiClosed) return false;\n\n if (!this.#lateCallsReported?.has(apiName)) {\n (this.#lateCallsReported ??= new Set()).add(apiName);\n this.#logger.error(\n `[shadow-objects] ${apiName}(): the creation scope of \"${this.#displayName}\" has torn down \u2014 the call does nothing. Something is still holding the creation API past the end of its shadow-object.`,\n );\n }\n\n return true;\n }\n\n useProperty<T = unknown>(name: string, options?: SignalValueOptions<T> | CompareFunc<T | undefined>): SignalReader<Maybe<T>> {\n if (this.#refuseAfterTearDown('useProperty')) return inertSignal().get;\n\n this.#reportDeprecatedIsEqualOption(options, 'useProperty');\n\n const opts = typeof options === 'function' ? {compare: options} : options;\n\n return this.#cachedReader(\n name,\n this.#propertyReaders,\n this.#propertyCompares,\n () => this.#entity.getPropertyReader(name),\n opts,\n 'useProperty',\n 'property',\n );\n }\n\n useProperties<T extends Record<string, unknown> = Record<string, unknown>>(\n props: {[K in keyof T]: string},\n ): {\n [K in keyof T]: SignalReader<Maybe<T[K]>>;\n } {\n const result = {} as {[K in keyof T]: SignalReader<Maybe<T[K]>>};\n for (const key in props) {\n if (Object.hasOwn(props, key)) {\n result[key] = this.useProperty<T[typeof key]>(props[key]);\n }\n }\n return result;\n }\n\n /**\n * The body the two context providers share: one provider signal per name, created on the first\n * call, attached to the entity-side context signal, and cleared on teardown unless the caller\n * opted out -- a clearing that finds the way to the entity side still open. A source signal handed\n * in instead of an initial value feeds the provider through a link of its own.\n *\n * The entity keeps every provider of a name together and answers the attachment with the release\n * that detaches this one again. Releasing it does more than cut the feed: the entity then lets a\n * provider that stays write its value once more, so the name ends up with a value that is actually\n * still being provided rather than with what this shadow-object left behind on its way out.\n *\n * `attachToEntity` is called inside the creation branch only, so the entity-side signal is\n * requested when a provider is actually created. The `clearOnDestroy` check sits outside that\n * branch: every call is allowed to ask for the clearing, not only the one that created the signal.\n * The request is booked once per provider, though -- a repeated ask does not queue a second write,\n * and once a provider has one on file, an opt-out on a later call does not take it back.\n */\n #provideContextSignal(\n name: string | symbol,\n providers: Map<string | symbol, Signal<any>>,\n attachToEntity: (provider: Signal<any>) => () => void,\n sourceOrInitialValue: unknown,\n opts: ProvideContextOptions<any> | undefined,\n ): Signal<any> {\n let ctxProvider = providers.get(name);\n\n if (ctxProvider == null) {\n const isSig = isSignal(sourceOrInitialValue);\n const initialValue = isSig ? undefined : toMaybe(sourceOrInitialValue);\n\n ctxProvider = createSignal(initialValue, opts?.compare ? {compare: opts.compare} : undefined);\n\n if (isSig) {\n const ln = link(sourceOrInitialValue as SignalReader<any>, ctxProvider);\n this.#unsubscribeSecondary.add(ln.destroy.bind(ln));\n }\n\n // The release runs after every `clearOnDestroy` callback below, so a write to `undefined`\n // still reaches the context signal on the entity side before the feed is cut.\n this.#unsubscribeContextFeeds.add(attachToEntity(ctxProvider));\n providers.set(name, ctxProvider);\n }\n\n if ((opts?.clearOnDestroy ?? true) && !this.#clearOnDestroyRegistered.has(ctxProvider)) {\n this.#clearOnDestroyRegistered.add(ctxProvider);\n this.#unsubscribeSecondary.add(() => {\n ctxProvider.set(undefined);\n });\n }\n\n return ctxProvider;\n }\n\n provideContext<T = unknown>(\n name: string | symbol,\n sourceOrInitialValue?: T | SignalReader<T> | SignalReader<T | undefined>,\n options?: ProvideContextOptions<T> | CompareFunc<T | undefined>,\n ) {\n if (this.#refuseAfterTearDown('provideContext')) return inertSignal();\n\n this.#reportDeprecatedIsEqualOption(options, 'provideContext');\n\n const opts = typeof options === 'function' ? {compare: options} : options;\n\n return this.#provideContextSignal(\n name,\n this.#contextProviders,\n (provider) => this.#entity.attachContextProvider(name, provider),\n sourceOrInitialValue,\n opts,\n );\n }\n\n provideGlobalContext<T = unknown>(\n name: string | symbol,\n sourceOrInitialValue?: T | SignalReader<T> | SignalReader<T | undefined>,\n options?: ProvideContextOptions<T> | CompareFunc<T | undefined>,\n ) {\n if (this.#refuseAfterTearDown('provideGlobalContext')) return inertSignal();\n\n this.#reportDeprecatedIsEqualOption(options, 'provideGlobalContext');\n\n const opts = typeof options === 'function' ? {compare: options} : options;\n\n return this.#provideContextSignal(\n name,\n this.#contextRootProviders,\n (provider) => this.#entity.attachGlobalContextProvider(name, provider),\n sourceOrInitialValue,\n opts,\n );\n }\n\n useContext<T = unknown>(name: string | symbol, options?: SignalValueOptions<T> | CompareFunc<T | undefined>) {\n if (this.#refuseAfterTearDown('useContext')) return inertSignal().get;\n\n this.#reportDeprecatedIsEqualOption(options, 'useContext');\n\n const opts = typeof options === 'function' ? {compare: options} : options;\n\n return this.#cachedReader(\n name,\n this.#contextReaders,\n this.#contextReaderCompares,\n () => this.#entity.useContext(name),\n opts,\n 'useContext',\n 'context',\n );\n }\n\n useParentContext<T = unknown>(name: string | symbol, options?: SignalValueOptions<T> | CompareFunc<T | undefined>) {\n if (this.#refuseAfterTearDown('useParentContext')) return inertSignal().get;\n\n this.#reportDeprecatedIsEqualOption(options, 'useParentContext');\n\n const opts = typeof options === 'function' ? {compare: options} : options;\n\n return this.#cachedReader(\n name,\n this.#contextParentReaders,\n this.#contextParentReaderCompares,\n () => this.#entity.useParentContext(name),\n opts,\n 'useParentContext',\n 'parent context',\n );\n }\n\n createSignal(...args: any[]): any {\n if (this.#refuseAfterTearDown('createSignal')) return inertSignal();\n\n // @ts-ignore\n const sig = createSignal(...args);\n this.#unsubscribeSecondary.add(() => {\n destroySignal(sig);\n });\n return sig;\n }\n\n createEffect(...args: any[]): ReturnType<typeof createEffect> {\n if (this.#refuseAfterTearDown('createEffect')) return inertEffect();\n\n // @ts-ignore\n const effect = createEffect(...args);\n this.#unsubscribeSecondary.add(effect.destroy);\n return effect;\n }\n\n createMemo<T = unknown>(...args: Parameters<typeof createMemo<T>>): SignalReader<T> {\n if (this.#refuseAfterTearDown('createMemo')) return inertSignal().get;\n\n const sig = createMemo<T>(...args);\n this.#unsubscribeSecondary.add(() => {\n destroySignal(sig);\n });\n return sig;\n }\n\n createResource<T = unknown>(factory: () => T | undefined, cleanup?: (resource: NonNullable<T>) => unknown): Signal<Maybe<T>> {\n if (this.#refuseAfterTearDown('createResource')) return inertSignal();\n\n const resourceSignal = createSignal<Maybe<T>>();\n\n const effect = createEffect(() => {\n const resource = toMaybe(factory());\n resourceSignal.set(resource);\n\n if (resource !== undefined && cleanup) {\n return () => {\n cleanup(resource);\n resourceSignal.set(undefined);\n };\n }\n\n return () => {\n resourceSignal.set(undefined);\n };\n });\n\n this.#unsubscribeSecondary.add(() => {\n // `effect.destroy()` runs the consumer's `cleanup`, which may throw. The two releases below\n // still have to run in that case -- a `finally` reaches them without swallowing the throw, so\n // `#runGuarded()` in `tearDown()` still sees and reports it.\n try {\n effect.destroy();\n } finally {\n resourceSignal.set(undefined);\n destroySignal(resourceSignal);\n }\n });\n\n return resourceSignal;\n }\n\n on(...args: any[]): ReturnType<typeof on> {\n if (this.#refuseAfterTearDown('on')) return noSubscription;\n\n const [firstArg] = args;\n const unsubscribe =\n typeof firstArg === 'string' || typeof firstArg === 'symbol' || Array.isArray(firstArg)\n ? // @ts-ignore\n on(this.#entity, ...args)\n : // @ts-ignore\n on(...args);\n\n return this.#trackSubscription(unsubscribe);\n }\n\n once(...args: any[]): ReturnType<typeof once> {\n if (this.#refuseAfterTearDown('once')) return noSubscription;\n\n const [firstArg] = args;\n const unsubscribe =\n typeof firstArg === 'string' || typeof firstArg === 'symbol' || Array.isArray(firstArg)\n ? // @ts-ignore\n once(this.#entity, ...args)\n : // @ts-ignore\n once(...args);\n\n return this.#trackSubscription(unsubscribe);\n }\n\n /**\n * The plain `emit()`, deliberately, where every notification the framework sends out of its own\n * accord runs on the guarded dispatch. This one is outbound and belongs to the Shadow Object: it\n * owns the listeners, a throw from one of them is its own bug, and letting it surface where it\n * happened is the fastest way to find it. A listener that needs a policy of its own carries a\n * `try`/`catch` in its own body, which is where that decision belongs.\n */\n emit(...args: any[]): void {\n if (this.#refuseAfterTearDown('emit')) return;\n\n const [firstArg] = args;\n if (typeof firstArg === 'string' || typeof firstArg === 'symbol' || Array.isArray(firstArg)) {\n // @ts-ignore\n emit(this.#entity, ...args);\n } else {\n // @ts-ignore\n emit(...args);\n }\n }\n\n onViewEvent(callback: (type: string, data: unknown) => any): void {\n if (this.#refuseAfterTearDown('onViewEvent')) return;\n\n const unsub = on(this.#entity, onViewEvent, (type: string, data: unknown) => {\n callback(type, data);\n });\n this.#unsubscribeSecondary.add(unsub);\n }\n\n onDestroy(callback: () => any): void {\n if (this.#refuseAfterTearDown('onDestroy')) return;\n\n this.#unsubscribePrimary.add(callback);\n }\n\n dispatchMessageToView(type: string, data?: unknown, transferables?: Transferable[], traverseChildren = false): void {\n if (this.#refuseAfterTearDown('dispatchMessageToView')) return;\n\n this.#entity.dispatchMessageToView(type, data, transferables, traverseChildren);\n }\n}\n"],
5
+ "mappings": "AAAA,SAAQ,MAAM,IAAI,MAAM,gBAAe;AACvC;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAGP,SAAQ,kBAAiB;AACzB,SAAQ,eAAc;AAEtB,SAAQ,WAAW,mBAAkB;AAQrC,MAAM,cAAc,MAAmB;AACrC,QAAM,MAAM,aAAkB,MAAS;AACvC,gBAAc,GAAG;AACjB,SAAO;AACT;AAGA,MAAM,cAAc,MAAuC;AACzD,QAAM,SAAS,aAAa,MAAM;AAAA,EAAC,GAAG,EAAC,SAAS,MAAK,CAAC;AACtD,SAAO,QAAQ;AACf,SAAO;AACT;AAGA,MAAM,iBAAiB,MAAY;AAAC;AAsB7B,MAAM,0BAA0B;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA,EAGA,sBAAsB,oBAAI,IAAe;AAAA;AAAA;AAAA,EAIzC,wBAAwB,oBAAI,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsB3C,2BAA2B,oBAAI,IAAe;AAAA,EAE9C,kBAAkB,oBAAI,IAAwC;AAAA,EAC9D,yBAAyB,oBAAI,IAAmD;AAAA,EAChF,wBAAwB,oBAAI,IAAwC;AAAA,EACpE,+BAA+B,oBAAI,IAAmD;AAAA,EACtF,oBAAoB,oBAAI,IAAkC;AAA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AAE5C,SAAK,oBAAoB,IAAI,QAAQ;AAAA,EACvC;AAAA,EAEA,sBAAsB,MAAc,MAAgB,eAAgC,mBAAmB,OAAa;AAClH,QAAI,KAAK,qBAAqB,uBAAuB,EAAG;AAExD,SAAK,QAAQ,sBAAsB,MAAM,MAAM,eAAe,gBAAgB;AAAA,EAChF;AACF;",
6
+ "names": []
7
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"SignalsPath.d.ts","sourceRoot":"","sources":["../../../src/in-the-dark/SignalsPath.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AAK9B,qBAAa,WAAW;;IACtB,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAS;IAKP,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAa;IAEvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;gBAEjB,OAAO,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE;IAavC,GAAG,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE;IAMjD,OAAO,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE;IAMrC,MAAM,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE;IAIpC,KAAK;IAKL,OAAO;CA6CR"}
1
+ {"version":3,"file":"SignalsPath.d.ts","sourceRoot":"","sources":["../../../src/in-the-dark/SignalsPath.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AAK9B,qBAAa,WAAW;;IACtB,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAS;IAKP,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAa;IAEvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAE7B,YAAY,OAAO,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAetC;IAED,GAAG,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,cAIhD;IAED,OAAO,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,cAIpC;IAED,MAAM,CAAC,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,QAEnC;IAED,KAAK,SAGJ;IAED,OAAO,SAWN;CAkCF"}
@@ -47,7 +47,7 @@ var __privateAdd = (obj, member, value2) => member.has(obj) ? __typeError("Canno
47
47
  var __privateSet = (obj, member, value2, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value2) : member.set(obj, value2), value2);
48
48
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
49
49
  var _value_dec, _signals, _effect, _init, _value, _SignalsPath_instances, makeRemoveFunc_fn, updateGetValueFromSignalsEffect_fn;
50
- import { emit, off, retain, retainClear } from "@spearwolf/eventize";
50
+ import { emitSafe, off, retain, retainClear } from "@spearwolf/eventize";
51
51
  import {
52
52
  createEffect,
53
53
  destroyObjectSignals,
@@ -67,7 +67,7 @@ class SignalsPath {
67
67
  this.value$ = void 0;
68
68
  retain(this, VALUE);
69
69
  this.value$ = findObjectSignalByName(this, VALUE);
70
- this.value$.onChange((val) => emit(this, VALUE, val));
70
+ this.value$.onChange((val) => emitSafe(this, VALUE, val));
71
71
  if (signals) {
72
72
  this.add(...signals);
73
73
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/in-the-dark/SignalsPath.ts"],
4
- "sourcesContent": ["import {emit, off, retain, retainClear} from '@spearwolf/eventize';\nimport {\n createEffect,\n destroyObjectSignals,\n Effect,\n findObjectSignalByName,\n type Signal,\n type SignalLike,\n value,\n} from '@spearwolf/signalize';\nimport {signal} from '@spearwolf/signalize/decorators';\n\nconst VALUE = 'value';\n\nexport class SignalsPath {\n static readonly Value = VALUE;\n\n #signals: SignalLike<any>[] = [];\n #effect?: Effect;\n\n @signal({name: VALUE}) accessor value: any = undefined;\n\n readonly value$: Signal<any>;\n\n constructor(signals?: SignalLike<any>[]) {\n retain(this as SignalsPath, VALUE);\n\n // the @signal accessor above creates this signal during field initialization,\n // so the lookup by that name always resolves once the constructor body runs\n this.value$ = findObjectSignalByName(this, VALUE)!;\n this.value$.onChange((val) => emit(this as SignalsPath, VALUE, val));\n\n if (signals) {\n this.add(...signals);\n }\n }\n\n add(...signals: (Signal<any> | SignalLike<any>)[]) {\n this.#signals.push(...signals);\n this.#updateGetValueFromSignalsEffect();\n return this.#makeRemoveFunc(signals);\n }\n\n unshift(...signals: SignalLike<any>[]) {\n this.#signals.unshift(...signals);\n this.#updateGetValueFromSignalsEffect();\n return this.#makeRemoveFunc(signals);\n }\n\n remove(...signals: SignalLike<any>[]) {\n this.#makeRemoveFunc(signals)();\n }\n\n clear() {\n this.#signals.length = 0;\n this.#updateGetValueFromSignalsEffect();\n }\n\n dispose() {\n this.clear();\n\n this.#effect?.destroy();\n this.#effect = undefined;\n\n retainClear(this as SignalsPath, VALUE);\n off(this);\n\n this.value$.destroy();\n destroyObjectSignals(this);\n }\n\n #makeRemoveFunc(signals: SignalLike<any>[]) {\n return () => {\n for (const sig of signals) {\n const idx = this.#signals.indexOf(sig);\n if (idx !== -1) {\n this.#signals.splice(idx, 1);\n }\n }\n this.#updateGetValueFromSignalsEffect();\n };\n }\n\n #updateGetValueFromSignalsEffect() {\n this.#effect?.destroy();\n if (this.#signals.length === 0) {\n this.#effect = undefined;\n this.value = undefined;\n } else {\n this.#effect = createEffect(() => {\n let valueFromSignals: any;\n for (const sig of this.#signals) {\n const val = value(sig);\n if (val != null) {\n valueFromSignals = val;\n break;\n }\n }\n this.value = valueFromSignals;\n }, this.#signals);\n this.#effect.run();\n }\n }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N3B;AAyDL,oBAAe,SAAC,SAA4B;AAC1C,SAAO,MAAM;AACX,eAAW,OAAO,SAAS;AACzB,YAAM,MAAM,mBAAK,UAAS,QAAQ,GAAG;AACrC,UAAI,QAAQ,IAAI;AACd,2BAAK,UAAS,OAAO,KAAK,CAAC;AAAA,MAC7B;AAAA,IACF;AACA,0BAAK,4DAAL;AAAA,EACF;AACF;AAEA,qCAAgC,WAAG;AACjC,qBAAK,UAAS,QAAQ;AACtB,MAAI,mBAAK,UAAS,WAAW,GAAG;AAC9B,uBAAK,SAAU;AACf,SAAK,QAAQ;AAAA,EACf,OAAO;AACL,uBAAK,SAAU,aAAa,MAAM;AAChC,UAAI;AACJ,iBAAW,OAAO,mBAAK,WAAU;AAC/B,cAAM,MAAM,MAAM,GAAG;AACrB,YAAI,OAAO,MAAM;AACf,6BAAmB;AACnB;AAAA,QACF;AAAA,MACF;AACA,WAAK,QAAQ;AAAA,IACf,GAAG,mBAAK,SAAQ;AAChB,uBAAK,SAAQ,IAAI;AAAA,EACnB;AACF;AAlFuB,4BAAS,SAAhC,YANW,aAMqB;AAN3B,2BAAM;AAAA,YACK,QAAQ;",
4
+ "sourcesContent": ["import {emitSafe, off, retain, retainClear} from '@spearwolf/eventize';\nimport {\n createEffect,\n destroyObjectSignals,\n Effect,\n findObjectSignalByName,\n type Signal,\n type SignalLike,\n value,\n} from '@spearwolf/signalize';\nimport {signal} from '@spearwolf/signalize/decorators';\n\nconst VALUE = 'value';\n\nexport class SignalsPath {\n static readonly Value = VALUE;\n\n #signals: SignalLike<any>[] = [];\n #effect?: Effect | undefined;\n\n @signal({name: VALUE}) accessor value: any = undefined;\n\n readonly value$: Signal<any>;\n\n constructor(signals?: SignalLike<any>[]) {\n retain(this as SignalsPath, VALUE);\n\n // the @signal accessor above creates this signal during field initialization,\n // so the lookup by that name always resolves once the constructor body runs\n this.value$ = findObjectSignalByName(this, VALUE)!;\n // `emitSafe()`: this runs from a signal change callback, so a listener that throws would leave\n // through whichever write moved the path and reach code that has nothing to do with this value.\n // The retained value is written either way, because the event was delivered -- which matters\n // here, since `Value` is retained and a later subscriber reads exactly that.\n this.value$.onChange((val) => emitSafe(this as SignalsPath, VALUE, val));\n\n if (signals) {\n this.add(...signals);\n }\n }\n\n add(...signals: (Signal<any> | SignalLike<any>)[]) {\n this.#signals.push(...signals);\n this.#updateGetValueFromSignalsEffect();\n return this.#makeRemoveFunc(signals);\n }\n\n unshift(...signals: SignalLike<any>[]) {\n this.#signals.unshift(...signals);\n this.#updateGetValueFromSignalsEffect();\n return this.#makeRemoveFunc(signals);\n }\n\n remove(...signals: SignalLike<any>[]) {\n this.#makeRemoveFunc(signals)();\n }\n\n clear() {\n this.#signals.length = 0;\n this.#updateGetValueFromSignalsEffect();\n }\n\n dispose() {\n this.clear();\n\n this.#effect?.destroy();\n this.#effect = undefined;\n\n retainClear(this as SignalsPath, VALUE);\n off(this);\n\n this.value$.destroy();\n destroyObjectSignals(this);\n }\n\n #makeRemoveFunc(signals: SignalLike<any>[]) {\n return () => {\n for (const sig of signals) {\n const idx = this.#signals.indexOf(sig);\n if (idx !== -1) {\n this.#signals.splice(idx, 1);\n }\n }\n this.#updateGetValueFromSignalsEffect();\n };\n }\n\n #updateGetValueFromSignalsEffect() {\n this.#effect?.destroy();\n if (this.#signals.length === 0) {\n this.#effect = undefined;\n this.value = undefined;\n } else {\n this.#effect = createEffect(() => {\n let valueFromSignals: any;\n for (const sig of this.#signals) {\n const val = value(sig);\n if (val != null) {\n valueFromSignals = val;\n break;\n }\n }\n this.value = valueFromSignals;\n }, this.#signals);\n this.#effect.run();\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,SAAQ,UAAU,KAAK,QAAQ,mBAAkB;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,OACK;AACP,SAAQ,cAAa;AAErB,MAAM,QAAQ;AAQ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ACF;AAEA,qCAAgC,WAAG;AACjC,qBAAK,UAAS,QAAQ;AACtB,MAAI,mBAAK,UAAS,WAAW,GAAG;AAC9B,uBAAK,SAAU;AACf,SAAK,QAAQ;AAAA,EACf,OAAO;AACL,uBAAK,SAAU,aAAa,MAAM;AAChC,UAAI;AACJ,iBAAW,OAAO,mBAAK,WAAU;AAC/B,cAAM,MAAM,MAAM,GAAG;AACrB,YAAI,OAAO,MAAM;AACf,6BAAmB;AACnB;AAAA,QACF;AAAA,MACF;AACA,WAAK,QAAQ;AAAA,IACf,GAAG,mBAAK,SAAQ;AAChB,uBAAK,SAAQ,IAAI;AAAA,EACnB;AACF;AAtFuB,4BAAS,SAAhC,YANW,aAMqB;AAN3B,2BAAM;AAAA,YACK,QAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/in-the-dark/events.ts"],
4
- "sourcesContent": ["import type {Entity} from './Entity.js';\n\n// ----------------------------------------------------------------------------\n\nexport const onCreate = Symbol('onCreate');\n\nexport interface OnCreate {\n /**\n * Is called when the shadow-object instance has been created and attached to the entity.\n *\n * This can be the case when the entity is being initialized, or when the already initialized entity has received a token change.\n *\n * Only the shadow-object gets this event.\n * The entity does not get this event.\n */\n [onCreate](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onDestroy = Symbol('onDestroy');\n\nexport interface OnDestroy {\n /**\n * Is called when the shadow-object is about to be destroyed.\n * Only the shadow-object gets this event.\n * The entity does not get this event.\n */\n [onDestroy](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onParentChanged = Symbol('onParentChanged');\n\nexport interface OnParentChangedEvent {\n [onParentChanged](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onViewEvent = Symbol('onViewEvent');\n\nexport interface OnViewEvent {\n [onViewEvent](type: string, data: unknown): void;\n}"],
4
+ "sourcesContent": ["import type {Entity} from './Entity.js';\n\n// ----------------------------------------------------------------------------\n\nexport const onCreate = Symbol('onCreate');\n\nexport interface OnCreate {\n /**\n * Is called when the shadow-object instance has been created and attached to the entity.\n *\n * This can be the case when the entity is being initialized, or when the already initialized entity has received a token change.\n *\n * Only the shadow-object gets this event.\n * The entity does not get this event.\n */\n [onCreate](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onDestroy = Symbol('onDestroy');\n\nexport interface OnDestroy {\n /**\n * Is called when the shadow-object is about to be destroyed.\n * Only the shadow-object gets this event.\n * The entity does not get this event.\n */\n [onDestroy](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onParentChanged = Symbol('onParentChanged');\n\nexport interface OnParentChangedEvent {\n [onParentChanged](entity: Entity): void;\n}\n\n// ----------------------------------------------------------------------------\n\nexport const onViewEvent = Symbol('onViewEvent');\n\nexport interface OnViewEvent {\n [onViewEvent](type: string, data: unknown): void;\n}\n"],
5
5
  "mappings": "AAIO,MAAM,WAAW,uBAAO,UAAU;AAgBlC,MAAM,YAAY,uBAAO,WAAW;AAapC,MAAM,kBAAkB,uBAAO,iBAAiB;AAQhD,MAAM,cAAc,uBAAO,aAAa;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,11 @@
1
1
  import type { ShadowObjectsModule } from '../types.js';
2
2
  import type { Kernel } from './Kernel.js';
3
+ /**
4
+ * The wording both environments use when a module they import carries no `shadowObjects` export.
5
+ * `worker/MessageRouter.ts` puts it in the `error` field of the `ImportedModule` message it posts
6
+ * to the view, where `view/RemoteWorkerEnv.ts` builds an `Error` from it;
7
+ * `view/LocalShadowObjectEnv.ts` rejects `importScript()` with such an `Error` directly.
8
+ */
9
+ export declare const missingShadowObjectsExportMessage = "module has no \"shadowObjects\" export";
3
10
  export declare function importModule(kernel: Kernel, module: ShadowObjectsModule, importedModules: Set<ShadowObjectsModule>, upgradeEntities?: boolean): Promise<void>;
4
11
  //# sourceMappingURL=importModule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"importModule.d.ts","sourceRoot":"","sources":["../../../src/in-the-dark/importModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0B,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,eAAe,EAAE,GAAG,CAAC,mBAAmB,CAAC,EACzC,eAAe,UAAO,GACrB,OAAO,CAAC,IAAI,CAAC,CAmCf"}
1
+ {"version":3,"file":"importModule.d.ts","sourceRoot":"","sources":["../../../src/in-the-dark/importModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA0B,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,2CAAkD,CAAC;AAEjG,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,eAAe,EAAE,GAAG,CAAC,mBAAmB,CAAC,EACzC,eAAe,UAAO,GACrB,OAAO,CAAC,IAAI,CAAC,CAuCf"}
@@ -1,6 +1,8 @@
1
+ import { ShadowObjectsExport } from "../constants.js";
2
+ const missingShadowObjectsExportMessage = `module has no "${ShadowObjectsExport}" export`;
1
3
  async function importModule(kernel, module, importedModules, upgradeEntities = true) {
2
4
  if (importedModules.has(module)) {
3
- console.warn("importModule: skipping already imported module", module);
5
+ kernel.logger.warn("importModule: skipping already imported module", module);
4
6
  return;
5
7
  } else {
6
8
  importedModules.add(module);
@@ -29,6 +31,7 @@ async function importModule(kernel, module, importedModules, upgradeEntities = t
29
31
  }
30
32
  }
31
33
  export {
32
- importModule
34
+ importModule,
35
+ missingShadowObjectsExportMessage
33
36
  };
34
37
  //# sourceMappingURL=importModule.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/in-the-dark/importModule.ts"],
4
- "sourcesContent": ["import type {ShadowObjectConstructor, ShadowObjectsModule} from '../types.js';\nimport type {Kernel} from './Kernel.js';\n\nexport async function importModule(\n kernel: Kernel,\n module: ShadowObjectsModule,\n importedModules: Set<ShadowObjectsModule>,\n upgradeEntities = true,\n): Promise<void> {\n if (importedModules.has(module)) {\n console.warn('importModule: skipping already imported module', module);\n return;\n } else {\n importedModules.add(module);\n }\n\n if (module.extends) {\n await Promise.all(module.extends.map((subModule) => importModule(kernel, subModule, importedModules, false)));\n }\n\n const {registry} = kernel;\n\n if (module.define) {\n for (const [token, constructa] of Object.entries(module.define)) {\n registry.define(token, constructa as ShadowObjectConstructor);\n }\n }\n\n if (module.routes) {\n for (const [token, routes] of Object.entries(module.routes)) {\n registry.appendRoute(token, routes);\n }\n }\n\n await (module.initialize?.({\n define: (token, constructa) => registry.define(token, constructa as ShadowObjectConstructor),\n kernel,\n registry,\n }) ?? Promise.resolve());\n\n if (upgradeEntities) {\n kernel.upgradeEntities();\n }\n}"],
5
- "mappings": "AAGA,eAAsB,aACpB,QACA,QACA,iBACA,kBAAkB,MACH;AACf,MAAI,gBAAgB,IAAI,MAAM,GAAG;AAC/B,YAAQ,KAAK,kDAAkD,MAAM;AACrE;AAAA,EACF,OAAO;AACL,oBAAgB,IAAI,MAAM;AAAA,EAC5B;AAEA,MAAI,OAAO,SAAS;AAClB,UAAM,QAAQ,IAAI,OAAO,QAAQ,IAAI,CAAC,cAAc,aAAa,QAAQ,WAAW,iBAAiB,KAAK,CAAC,CAAC;AAAA,EAC9G;AAEA,QAAM,EAAC,SAAQ,IAAI;AAEnB,MAAI,OAAO,QAAQ;AACjB,eAAW,CAAC,OAAO,UAAU,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AAC/D,eAAS,OAAO,OAAO,UAAqC;AAAA,IAC9D;AAAA,EACF;AAEA,MAAI,OAAO,QAAQ;AACjB,eAAW,CAAC,OAAO,MAAM,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AAC3D,eAAS,YAAY,OAAO,MAAM;AAAA,IACpC;AAAA,EACF;AAEA,SAAO,OAAO,aAAa;AAAA,IACzB,QAAQ,CAAC,OAAO,eAAe,SAAS,OAAO,OAAO,UAAqC;AAAA,IAC3F;AAAA,IACA;AAAA,EACF,CAAC,KAAK,QAAQ,QAAQ;AAEtB,MAAI,iBAAiB;AACnB,WAAO,gBAAgB;AAAA,EACzB;AACF;",
4
+ "sourcesContent": ["import {ShadowObjectsExport} from '../constants.js';\nimport type {ShadowObjectConstructor, ShadowObjectsModule} from '../types.js';\nimport type {Kernel} from './Kernel.js';\n\n/**\n * The wording both environments use when a module they import carries no `shadowObjects` export.\n * `worker/MessageRouter.ts` puts it in the `error` field of the `ImportedModule` message it posts\n * to the view, where `view/RemoteWorkerEnv.ts` builds an `Error` from it;\n * `view/LocalShadowObjectEnv.ts` rejects `importScript()` with such an `Error` directly.\n */\nexport const missingShadowObjectsExportMessage = `module has no \"${ShadowObjectsExport}\" export`;\n\nexport async function importModule(\n kernel: Kernel,\n module: ShadowObjectsModule,\n importedModules: Set<ShadowObjectsModule>,\n upgradeEntities = true,\n): Promise<void> {\n if (importedModules.has(module)) {\n // `warn`, not `error`, unlike the reports of the creation API: a module two `extends` chains\n // have in common is a shape of the module graph and not a mistake, so this line only tells\n // during development. See the table of call against getter under \"Console Logger\" in\n // `docs/api-reference.md`.\n kernel.logger.warn('importModule: skipping already imported module', module);\n return;\n } else {\n importedModules.add(module);\n }\n\n if (module.extends) {\n await Promise.all(module.extends.map((subModule) => importModule(kernel, subModule, importedModules, false)));\n }\n\n const {registry} = kernel;\n\n if (module.define) {\n for (const [token, constructa] of Object.entries(module.define)) {\n registry.define(token, constructa as ShadowObjectConstructor);\n }\n }\n\n if (module.routes) {\n for (const [token, routes] of Object.entries(module.routes)) {\n registry.appendRoute(token, routes);\n }\n }\n\n await (module.initialize?.({\n define: (token, constructa) => registry.define(token, constructa as ShadowObjectConstructor),\n kernel,\n registry,\n }) ?? Promise.resolve());\n\n if (upgradeEntities) {\n kernel.upgradeEntities();\n }\n}\n"],
5
+ "mappings": "AAAA,SAAQ,2BAA0B;AAU3B,MAAM,oCAAoC,kBAAkB,mBAAmB;AAEtF,eAAsB,aACpB,QACA,QACA,iBACA,kBAAkB,MACH;AACf,MAAI,gBAAgB,IAAI,MAAM,GAAG;AAK/B,WAAO,OAAO,KAAK,kDAAkD,MAAM;AAC3E;AAAA,EACF,OAAO;AACL,oBAAgB,IAAI,MAAM;AAAA,EAC5B;AAEA,MAAI,OAAO,SAAS;AAClB,UAAM,QAAQ,IAAI,OAAO,QAAQ,IAAI,CAAC,cAAc,aAAa,QAAQ,WAAW,iBAAiB,KAAK,CAAC,CAAC;AAAA,EAC9G;AAEA,QAAM,EAAC,SAAQ,IAAI;AAEnB,MAAI,OAAO,QAAQ;AACjB,eAAW,CAAC,OAAO,UAAU,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AAC/D,eAAS,OAAO,OAAO,UAAqC;AAAA,IAC9D;AAAA,EACF;AAEA,MAAI,OAAO,QAAQ;AACjB,eAAW,CAAC,OAAO,MAAM,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AAC3D,eAAS,YAAY,OAAO,MAAM;AAAA,IACpC;AAAA,EACF;AAEA,SAAO,OAAO,aAAa;AAAA,IACzB,QAAQ,CAAC,OAAO,eAAe,SAAS,OAAO,OAAO,UAAqC;AAAA,IAC3F;AAAA,IACA;AAAA,EACF,CAAC,KAAK,QAAQ,QAAQ;AAEtB,MAAI,iBAAiB;AACnB,WAAO,gBAAgB;AAAA,EACzB;AACF;",
6
6
  "names": []
7
7
  }
package/src/index.d.ts CHANGED
@@ -1,16 +1,22 @@
1
+ export * from './ChangeTrailRefusedError.js';
1
2
  export * from './constants.js';
3
+ export * from './EntityUuidInUseError.js';
2
4
  export * from './elements/constants.js';
5
+ export type * from './elements/events.js';
6
+ export * from './elements/requestEntAncestor.js';
3
7
  export * from './elements/ShaeElement.js';
4
8
  export * from './elements/ShaeEntElement.js';
5
9
  export * from './elements/ShaePropElement.js';
6
10
  export * from './elements/ShaeWorkerElement.js';
7
11
  export type * from './types.js';
12
+ export * from './utils/FrameLoop.js';
8
13
  export * from './utils/toNamespace.js';
9
14
  export * from './view/ComponentContext.js';
10
- export * from './view/ComponentMemory.js';
15
+ export type * from './view/ComponentMemory.js';
11
16
  export type * from './view/IShadowObjectEnvProxy.js';
12
17
  export * from './view/LocalShadowObjectEnv.js';
13
18
  export * from './view/RemoteWorkerEnv.js';
14
19
  export * from './view/ShadowEnv.js';
15
20
  export * from './view/ViewComponent.js';
21
+ export * from './WorkerTimeoutError.js';
16
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,mBAAmB,YAAY,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,mBAAmB,iCAAiC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,mBAAmB,sBAAsB,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,mBAAmB,YAAY,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,iCAAiC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC"}
package/src/index.js CHANGED
@@ -1,14 +1,18 @@
1
+ export * from "./ChangeTrailRefusedError.js";
1
2
  export * from "./constants.js";
3
+ export * from "./EntityUuidInUseError.js";
2
4
  export * from "./elements/constants.js";
5
+ export * from "./elements/requestEntAncestor.js";
3
6
  export * from "./elements/ShaeElement.js";
4
7
  export * from "./elements/ShaeEntElement.js";
5
8
  export * from "./elements/ShaePropElement.js";
6
9
  export * from "./elements/ShaeWorkerElement.js";
10
+ export * from "./utils/FrameLoop.js";
7
11
  export * from "./utils/toNamespace.js";
8
12
  export * from "./view/ComponentContext.js";
9
- export * from "./view/ComponentMemory.js";
10
13
  export * from "./view/LocalShadowObjectEnv.js";
11
14
  export * from "./view/RemoteWorkerEnv.js";
12
15
  export * from "./view/ShadowEnv.js";
13
16
  export * from "./view/ViewComponent.js";
17
+ export * from "./WorkerTimeoutError.js";
14
18
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './constants.js';\nexport * from './elements/constants.js';\nexport * from './elements/ShaeElement.js';\nexport * from './elements/ShaeEntElement.js';\nexport * from './elements/ShaePropElement.js';\nexport * from './elements/ShaeWorkerElement.js';\nexport type * from './types.js';\nexport * from './utils/toNamespace.js';\nexport * from './view/ComponentContext.js';\nexport * from './view/ComponentMemory.js';\nexport type * from './view/IShadowObjectEnvProxy.js';\nexport * from './view/LocalShadowObjectEnv.js';\nexport * from './view/RemoteWorkerEnv.js';\nexport * from './view/ShadowEnv.js';\nexport * from './view/ViewComponent.js';"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export * from './ChangeTrailRefusedError.js';\nexport * from './constants.js';\nexport * from './EntityUuidInUseError.js';\nexport * from './elements/constants.js';\nexport type * from './elements/events.js';\nexport * from './elements/requestEntAncestor.js';\nexport * from './elements/ShaeElement.js';\nexport * from './elements/ShaeEntElement.js';\nexport * from './elements/ShaePropElement.js';\nexport * from './elements/ShaeWorkerElement.js';\nexport type * from './types.js';\nexport * from './utils/FrameLoop.js';\nexport * from './utils/toNamespace.js';\nexport * from './view/ComponentContext.js';\nexport type * from './view/ComponentMemory.js';\nexport type * from './view/IShadowObjectEnvProxy.js';\nexport * from './view/LocalShadowObjectEnv.js';\nexport * from './view/RemoteWorkerEnv.js';\nexport * from './view/ShadowEnv.js';\nexport * from './view/ViewComponent.js';\nexport * from './WorkerTimeoutError.js';\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,6 @@
1
+ export * from './ChangeTrailRefusedError.js';
1
2
  export * from './constants.js';
3
+ export * from './EntityUuidInUseError.js';
2
4
  export * from './in-the-dark/events.js';
3
5
  export * from './in-the-dark/Kernel.js';
4
6
  export * from './in-the-dark/Registry.js';
@@ -1 +1 @@
1
- {"version":3,"file":"shadow-objects.d.ts","sourceRoot":"","sources":["../../src/shadow-objects.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,mBAAmB,YAAY,CAAC"}
1
+ {"version":3,"file":"shadow-objects.d.ts","sourceRoot":"","sources":["../../src/shadow-objects.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,mBAAmB,YAAY,CAAC"}
@@ -1,4 +1,6 @@
1
+ export * from "./ChangeTrailRefusedError.js";
1
2
  export * from "./constants.js";
3
+ export * from "./EntityUuidInUseError.js";
2
4
  export * from "./in-the-dark/events.js";
3
5
  export * from "./in-the-dark/Kernel.js";
4
6
  export * from "./in-the-dark/Registry.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shadow-objects.ts"],
4
- "sourcesContent": ["export * from './constants.js';\nexport * from './in-the-dark/events.js';\nexport * from './in-the-dark/Kernel.js';\nexport * from './in-the-dark/Registry.js';\nexport * from './in-the-dark/ShadowObject.js';\nexport type * from './types.js';"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export * from './ChangeTrailRefusedError.js';\nexport * from './constants.js';\nexport * from './EntityUuidInUseError.js';\nexport * from './in-the-dark/events.js';\nexport * from './in-the-dark/Kernel.js';\nexport * from './in-the-dark/Registry.js';\nexport * from './in-the-dark/ShadowObject.js';\nexport type * from './types.js';\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,4 @@
1
1
  import { WorkerRuntime } from "./worker/WorkerRuntime.js";
2
- console.debug("@spearwolf/shadow-objects/WorkerRuntime: hello!");
3
2
  const shadowRuntime = new WorkerRuntime();
4
3
  shadowRuntime.start();
5
4
  //# sourceMappingURL=shadow-objects.worker.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shadow-objects.worker.js"],
4
- "sourcesContent": ["import {WorkerRuntime} from './worker/WorkerRuntime.js';\n\nconsole.debug('@spearwolf/shadow-objects/WorkerRuntime: hello!');\n\nconst shadowRuntime = new WorkerRuntime();\nshadowRuntime.start();"],
5
- "mappings": "AAAA,SAAQ,qBAAoB;AAE5B,QAAQ,MAAM,iDAAiD;AAE/D,MAAM,gBAAgB,IAAI,cAAc;AACxC,cAAc,MAAM;",
4
+ "sourcesContent": ["import {WorkerRuntime} from './worker/WorkerRuntime.js';\n\nconst shadowRuntime = new WorkerRuntime();\nshadowRuntime.start();\n"],
5
+ "mappings": "AAAA,SAAQ,qBAAoB;AAE5B,MAAM,gBAAgB,IAAI,cAAc;AACxC,cAAc,MAAM;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shae-ent.ts"],
4
- "sourcesContent": ["import {SHAE_ENT} from './elements/constants.js';\nimport {ShaeEntElement} from './elements/ShaeEntElement.js';\n\ncustomElements.define(SHAE_ENT, ShaeEntElement);"],
4
+ "sourcesContent": ["import {SHAE_ENT} from './elements/constants.js';\nimport {ShaeEntElement} from './elements/ShaeEntElement.js';\n\ncustomElements.define(SHAE_ENT, ShaeEntElement);\n"],
5
5
  "mappings": "AAAA,SAAQ,gBAAe;AACvB,SAAQ,sBAAqB;AAE7B,eAAe,OAAO,UAAU,cAAc;",
6
6
  "names": []
7
7
  }
package/src/shae-prop.js CHANGED
@@ -1,4 +1,4 @@
1
- import { SHAE_ENT, SHAE_PROP } from "./elements/constants.js";
1
+ import { SHAE_PROP } from "./elements/constants.js";
2
2
  import { ShaePropElement } from "./elements/ShaePropElement.js";
3
- customElements.whenDefined(SHAE_ENT).then(() => customElements.define(SHAE_PROP, ShaePropElement));
3
+ customElements.define(SHAE_PROP, ShaePropElement);
4
4
  //# sourceMappingURL=shae-prop.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shae-prop.ts"],
4
- "sourcesContent": ["import {SHAE_ENT, SHAE_PROP} from './elements/constants.js';\nimport {ShaePropElement} from './elements/ShaePropElement.js';\n\ncustomElements.whenDefined(SHAE_ENT).then(() => customElements.define(SHAE_PROP, ShaePropElement));"],
5
- "mappings": "AAAA,SAAQ,UAAU,iBAAgB;AAClC,SAAQ,uBAAsB;AAE9B,eAAe,YAAY,QAAQ,EAAE,KAAK,MAAM,eAAe,OAAO,WAAW,eAAe,CAAC;",
4
+ "sourcesContent": ["import {SHAE_PROP} from './elements/constants.js';\nimport {ShaePropElement} from './elements/ShaePropElement.js';\n\ncustomElements.define(SHAE_PROP, ShaePropElement);\n"],
5
+ "mappings": "AAAA,SAAQ,iBAAgB;AACxB,SAAQ,uBAAsB;AAE9B,eAAe,OAAO,WAAW,eAAe;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shae-worker.ts"],
4
- "sourcesContent": ["import {SHAE_WORKER} from './elements/constants.js';\nimport {ShaeWorkerElement} from './elements/ShaeWorkerElement.js';\n\ncustomElements.define(SHAE_WORKER, ShaeWorkerElement);"],
4
+ "sourcesContent": ["import {SHAE_WORKER} from './elements/constants.js';\nimport {ShaeWorkerElement} from './elements/ShaeWorkerElement.js';\n\ncustomElements.define(SHAE_WORKER, ShaeWorkerElement);\n"],
5
5
  "mappings": "AAAA,SAAQ,mBAAkB;AAC1B,SAAQ,yBAAwB;AAEhC,eAAe,OAAO,aAAa,iBAAiB;",
6
6
  "names": []
7
7
  }
package/src/types.d.ts CHANGED
@@ -14,7 +14,18 @@ export interface IComponentEvent {
14
14
  type: string;
15
15
  data: unknown;
16
16
  }
17
- export type ComponentPropertiesType = [string, unknown][];
17
+ /**
18
+ * A list of property entries in a Change Trail. An entry carries a key together with its
19
+ * value; an entry that names only the key counts as set, without carrying a value — the
20
+ * Entity behind it reads the property as `undefined`.
21
+ *
22
+ * The one-element form is written by `ViewComponent.setPropertyWithoutValue()`, which goes through
23
+ * `ComponentContext` into the bookkeeping of `ComponentChanges`; `setProperty(name, undefined)`
24
+ * stands beside it and is a removal. It also arrives from outside, in a Change Trail a caller
25
+ * assembles itself — `Kernel.createEntity()` and `Kernel.changeProperties()` are the two entrances
26
+ * that read it.
27
+ */
28
+ export type ComponentPropertiesType = ([string] | [string, unknown])[];
18
29
  export interface ICreateEntitiesChange extends IComponentChange {
19
30
  type: ComponentChangeType.CreateEntities;
20
31
  token: string;
@@ -56,14 +67,28 @@ export interface ImportedModuleEvent {
56
67
  type: typeof ImportedModule;
57
68
  url?: string;
58
69
  error?: string;
70
+ /**
71
+ * The name the error called itself in the worker. Structured cloning does not carry an
72
+ * error class, so this and `error` are what the view side rebuilds one from. Absent means
73
+ * the sender named no class, and the view reads it as `Error`.
74
+ */
75
+ errorName?: string;
59
76
  }
60
77
  export interface AppliedChangeTrailEvent {
61
78
  type: typeof AppliedChangeTrail;
62
79
  serial?: number;
63
80
  error?: string;
81
+ /** The name the error called itself in the worker; see {@link ImportedModuleEvent.errorName}. */
82
+ errorName?: string;
83
+ /**
84
+ * How many entries of the change trail the Kernel applied before it stopped. Stands only
85
+ * next to an `error`, and only where the Kernel itself could say so; an absent field means
86
+ * nothing is known about how far the trail got.
87
+ */
88
+ appliedCount?: number;
64
89
  }
65
90
  export type EntityApi = Readonly<Pick<Entity, 'uuid' | 'order' | 'hasParent' | 'propKeys' | 'propEntries' | 'kernel'> & {
66
- parent?: EntityApi;
91
+ parent?: EntityApi | undefined;
67
92
  children: readonly EntityApi[];
68
93
  traverse(callback: (entity: EntityApi) => unknown): void;
69
94
  }>;
@@ -89,7 +114,7 @@ export interface ShadowObjectCreationAPI {
89
114
  };
90
115
  createResource<T = unknown>(factory: () => T | undefined, cleanup?: (resource: NonNullable<T>) => unknown): Signal<Maybe<T>>;
91
116
  createEffect: typeof createEffect;
92
- createSignal<T = unknown>(...args: Parameters<typeof createSignal<T>>): ReturnType<typeof createSignal<T>>;
117
+ createSignal: typeof createSignal;
93
118
  createMemo<T = unknown>(...args: Parameters<typeof createMemo<T>>): SignalReader<T>;
94
119
  on(...args: SubscribeArgs): ReturnType<typeof on>;
95
120
  on(...args: [object, ...SubscribeArgs]): ReturnType<typeof on>;
@@ -99,6 +124,10 @@ export interface ShadowObjectCreationAPI {
99
124
  /**
100
125
  * Emit an event on the *entity* associated with this shadow object.
101
126
  *
127
+ * A listener that throws ends the delivery where it stands and the error reaches this call. That
128
+ * is deliberate, and it is the one dispatch in the library that works this way: the listeners
129
+ * belong to whoever emits here, so a failure is its own bug and belongs where it happened.
130
+ *
102
131
  * @param eventNames - The name(s) of the event(s) to emit.
103
132
  * @param eventArgs - Arguments to pass to the event listeners.
104
133
  */
@@ -114,11 +143,13 @@ export interface ShadowObjectCreationAPI {
114
143
  onDestroy(callback: () => any): void;
115
144
  }
116
145
  export interface ShadowObjectConstructor {
117
- new (params: ShadowObjectCreationAPI): {};
146
+ new (params: ShadowObjectCreationAPI): object;
147
+ /** The name the Kernel reports a Shadow Object built from this constructor under; without it, the constructor's `name`. */
118
148
  displayName?: string;
119
149
  }
120
150
  export interface ShadowObjectConstructorFunc {
121
151
  (params: ShadowObjectCreationAPI): object | undefined | void;
152
+ /** The name the Kernel reports a Shadow Object built from this constructor under; without it, the constructor's `name`. */
122
153
  displayName?: string;
123
154
  }
124
155
  export type ShadowObjectType = EventizedObject;
@@ -1 +1 @@
1
- {"version":3,"file":"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AAC;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,MAAM,EAAE,uBAAuB,GAAG,MAAM,CAAC;IAC9C,2HAA2H;IAC3H,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC7D,2HAA2H;IAC3H,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,8BAA8B,GAAG,CAAC,aAAa,EAAE;IAC3D,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB,GAAG,2BAA2B,KAAK,IAAI,CAAC;IACnG,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,GAAG,2BAA2B,CAAC,CAAC;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,8BAA8B,CAAC;CAC7C"}
@@ -1,19 +1,53 @@
1
1
  export declare const CONSOLE_LOGGER = "ConsoleLogger";
2
2
  export declare const CONSOLE_LOGGER_STORAGE = "ConsoleLoggerStorage";
3
+ declare const ConsoleLogger$: unique symbol;
4
+ export interface ConsoleLoggerConfig {
5
+ [ConsoleLogger$]?: boolean;
6
+ enable: boolean;
7
+ debug: boolean;
8
+ info: boolean;
9
+ warn: boolean;
10
+ 'styles.debug': string;
11
+ 'styles.info': string;
12
+ 'styles.warn': string;
13
+ 'styles.error': string;
14
+ [key: string]: string | boolean | undefined;
15
+ }
16
+ export interface ConsoleLoggerControl {
17
+ [ConsoleLogger$]?: boolean;
18
+ enable: boolean;
19
+ debug: boolean;
20
+ info: boolean;
21
+ warn: boolean;
22
+ }
23
+ /**
24
+ * The key a config value is stored under. Prefixed with {@link CONSOLE_LOGGER} when it goes
25
+ * into a real Storage, where it shares the namespace with everything else on this origin.
26
+ */
27
+ export declare const consoleLoggerConfigKey: (key: string | string[]) => string;
28
+ /**
29
+ * Reads a raw config value through whatever storage the capability probe accepted, or from the
30
+ * fallback object store when none did. The way to reach the config from outside this module:
31
+ * `globalThis.localStorage` may be missing, inert or hostile, and asking it directly throws.
32
+ */
33
+ export declare const loadConsoleLoggerConfig: (key: string | string[], defaultValue: string) => string;
34
+ /**
35
+ * Installs a config object as the fallback store, bypassing the storage probe. `WorkerRuntime`
36
+ * calls this with the config a `RemoteWorkerEnv` forwards from the main thread, where there is no
37
+ * `localStorage` to probe in the first place.
38
+ *
39
+ * Once a logger exists in such a thread, `ConsoleLogger.sharedConfig` *is* that store, and the
40
+ * values are written into it rather than a fresh object taking its place in the slot: the shared
41
+ * switches reach every logger of the thread, the ones already built included. One flag stays
42
+ * behind -- a logger reads its own `<namespace>.enable` key when it is built, and a config that
43
+ * arrives afterwards no longer moves it.
44
+ */
45
+ export declare function setConsoleLoggerStorage(config: ConsoleLoggerConfig): void;
3
46
  export declare class ConsoleLogger {
4
47
  #private;
5
48
  namespace?: string;
6
49
  enable: boolean;
7
- static sharedConfig: {
8
- enable: boolean;
9
- debug: boolean;
10
- info: boolean;
11
- warn: boolean;
12
- 'styles.debug': string;
13
- 'styles.info': string;
14
- 'styles.warn': string;
15
- 'styles.error': string;
16
- };
50
+ static sharedConfig: ConsoleLoggerConfig;
17
51
  static get isEnabled(): boolean;
18
52
  static get isDebug(): boolean;
19
53
  static sharedStyles: {
@@ -33,4 +67,5 @@ export declare class ConsoleLogger {
33
67
  warn(...args: any[]): void;
34
68
  error(...args: any[]): void;
35
69
  }
70
+ export {};
36
71
  //# sourceMappingURL=ConsoleLogger.d.ts.map