@ctx-core/window 16.0.11 → 16.0.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.
package/hostname/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  /// <reference types="ctx-core" />
2
2
  /// <reference types="./index.d.ts" />
3
3
  import { be_memo_pair_, nullish__none_ } from 'ctx-core/rmemo'
4
- import { window_location$_ } from '../window_location/index.js'
4
+ import { window_location_ } from '../window_location/index.js'
5
5
  /** @type {typeof hostname$_} */
6
6
  export const [
7
7
  hostname$_,
8
8
  hostname_,
9
- ] = be_memo_pair_(
10
- ctx=>window_location$_(ctx),
11
- window_location=>nullish__none_([window_location], ()=>
12
- window_location.hostname),
13
- { id: 'hostname' })
9
+ ] = be_memo_pair_(ctx=>
10
+ nullish__none_([window_location_(ctx)],
11
+ window_location=>
12
+ window_location.hostname),
13
+ { id: 'hostname' })
14
14
  export {
15
15
  hostname$_ as hostname__,
16
16
  hostname$_ as window_location_hostname__,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/window",
3
- "version": "16.0.11",
3
+ "version": "16.0.13",
4
4
  "description": "ctx-core window",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -31,8 +31,8 @@
31
31
  "./package.json": "./package.json"
32
32
  },
33
33
  "dependencies": {
34
- "@ctx-core/dom": "^15.2.10",
35
- "ctx-core": "^5.15.0"
34
+ "@ctx-core/dom": "^15.2.12",
35
+ "ctx-core": "^5.16.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "c8": "^9.0.0",
package/pathname/index.js CHANGED
@@ -9,8 +9,9 @@ export const [
9
9
  pathname_,
10
10
  ] = be_memo_pair_(
11
11
  ctx=>
12
- nullish__none_([window_location_(ctx)], window_location=>
13
- window_location.pathname),
12
+ nullish__none_([window_location_(ctx)],
13
+ window_location=>
14
+ window_location.pathname),
14
15
  { id: 'pathname' })
15
16
  export {
16
17
  pathname$_ as pathname__,
@@ -2,23 +2,23 @@
2
2
  /// <reference types="./index.d.ts" />
3
3
  import { has_dom, no_dom } from '@ctx-core/dom'
4
4
  import { be_ } from 'ctx-core/be'
5
- import { be_memo_pair_, memo_, sig_ } from 'ctx-core/rmemo'
5
+ import { be_memo_pair_, sig_ } from 'ctx-core/rmemo'
6
6
  const window_location__sig$_ = be_(()=>
7
7
  sig_())
8
8
  /** @type {typeof window_location$_} */
9
9
  export const [
10
10
  window_location$_,
11
11
  window_location_,
12
- ] = /** @type {be_memo_pair_T<Location>} */ be_memo_pair_(be_(ctx=>
13
- memo_(()=>
14
- window_location__sig$_(ctx)(),
15
- ()=>{
12
+ ] = /** @type {be_memo_pair_T<Location>} */
13
+ be_memo_pair_(
14
+ ctx=>window_location__sig$_(ctx)(),
15
+ { id: 'window_location' }
16
+ ).add(ctx=>{
16
17
  if (has_dom) {
17
18
  let onpopstate = ()=>window_location__reset(ctx)
18
19
  window.addEventListener('popstate', onpopstate)
19
20
  }
20
- }),
21
- { id: 'window_location' }))
21
+ })
22
22
  export { window_location$_ as window_location__ }
23
23
  /**
24
24
  * @param {Ctx}ctx