@ctx-core/window 16.0.58 → 16.0.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/window",
3
- "version": "16.0.58",
3
+ "version": "16.0.61",
4
4
  "description": "ctx-core window",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -31,8 +31,7 @@
31
31
  "./package.json": "./package.json"
32
32
  },
33
33
  "dependencies": {
34
- "@ctx-core/dom": "^15.3.17",
35
- "ctx-core": "^5.35.2"
34
+ "ctx-core": "^5.36.1"
36
35
  },
37
36
  "devDependencies": {
38
37
  "c8": "^9.1.0",
@@ -1,5 +1,5 @@
1
- import type { be_memo_pair_T } from 'ctx-core/rmemo'
2
1
  import type { Ctx } from 'ctx-core/be'
2
+ import type { be_memo_pair_T } from 'ctx-core/rmemo'
3
3
  export declare const [
4
4
  window_location$_,
5
5
  window_location_,
@@ -1,7 +1,7 @@
1
1
  /// <reference types="ctx-core" />
2
- /// <reference types="./index.d.ts" />
3
- import { has_dom, no_dom } from '@ctx-core/dom'
4
2
  import { be_ } from 'ctx-core/be'
3
+ /// <reference types="./index.d.ts" />
4
+ import { is_browser_, is_server_ } from 'ctx-core/env'
5
5
  import { be_memo_pair_, sig_ } from 'ctx-core/rmemo'
6
6
  const window_location__sig$_ = be_(()=>
7
7
  sig_())
@@ -14,7 +14,7 @@ export const [
14
14
  ctx=>window_location__sig$_(ctx)(),
15
15
  { id: 'window_location' }
16
16
  ).add(ctx=>{
17
- if (has_dom) {
17
+ if (is_browser_()) {
18
18
  let onpopstate = ()=>window_location__reset(ctx)
19
19
  window.addEventListener('popstate', onpopstate)
20
20
  }
@@ -24,6 +24,6 @@ export { window_location$_ as window_location__ }
24
24
  * @param {Ctx}ctx
25
25
  */
26
26
  export function window_location__reset(ctx) {
27
- if (no_dom) return
27
+ if (is_server_()) return
28
28
  window_location__sig$_(ctx)._ = window.location
29
29
  }