@ctx-core/window 13.0.18 → 14.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/{hostname$_b.d.ts → hostname$_.d.ts} +1 -2
  3. package/lib/hostname$_.js +6 -0
  4. package/lib/hostname$_.js.map +1 -0
  5. package/lib/index.d.ts +5 -5
  6. package/lib/index.js +5 -5
  7. package/lib/index.js.map +1 -1
  8. package/lib/pathname$_.d.ts +5 -0
  9. package/lib/pathname$_.js +7 -0
  10. package/lib/pathname$_.js.map +1 -0
  11. package/lib/{window_location$_b.d.ts → window_location$_.d.ts} +1 -3
  12. package/lib/{window_location$_b.js → window_location$_.js} +4 -7
  13. package/lib/window_location$_.js.map +1 -0
  14. package/lib/{window_location_hostname$_b.d.ts → window_location_hostname$_.d.ts} +1 -1
  15. package/lib/window_location_hostname$_.js +12 -0
  16. package/lib/window_location_hostname$_.js.map +1 -0
  17. package/lib/window_location_pathname$_.d.ts +5 -0
  18. package/lib/window_location_pathname$_.js +12 -0
  19. package/lib/window_location_pathname$_.js.map +1 -0
  20. package/package.json +6 -6
  21. package/src/hostname$_.ts +6 -0
  22. package/src/index.ts +5 -5
  23. package/src/pathname$_.ts +7 -0
  24. package/src/{window_location$_b.ts → window_location$_.ts} +4 -12
  25. package/src/{window_location_hostname$_b.ts → window_location_hostname$_.ts} +5 -6
  26. package/src/window_location_pathname$_.ts +17 -0
  27. package/lib/hostname$_b.js +0 -8
  28. package/lib/hostname$_b.js.map +0 -1
  29. package/lib/pathname$_b.d.ts +0 -6
  30. package/lib/pathname$_b.js +0 -8
  31. package/lib/pathname$_b.js.map +0 -1
  32. package/lib/window_location$_b.js.map +0 -1
  33. package/lib/window_location_hostname$_b.js +0 -13
  34. package/lib/window_location_hostname$_b.js.map +0 -1
  35. package/lib/window_location_pathname$_b.d.ts +0 -7
  36. package/lib/window_location_pathname$_b.js +0 -14
  37. package/lib/window_location_pathname$_b.js.map +0 -1
  38. package/src/hostname$_b.ts +0 -8
  39. package/src/pathname$_b.ts +0 -8
  40. package/src/window_location_pathname$_b.ts +0 -22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @ctx-core/window
2
2
 
3
+ ## 14.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - update dependencies
8
+ - Updated dependencies
9
+ - @ctx-core/dom@11.1.6
10
+ - @ctx-core/nanostores@0.5.4
11
+
12
+ ## 14.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - update dependencies
17
+
18
+ ## 14.0.1
19
+
20
+ ### Patch Changes
21
+
22
+ - update dependencies
23
+
24
+ ## 14.0.0
25
+
26
+ ### Major Changes
27
+
28
+ - flatten functions: remove \_b suffix from exports
29
+
3
30
  ## 13.0.18
4
31
 
5
32
  ### Patch Changes
@@ -1,5 +1,4 @@
1
1
  import { WritableAtom$ } from '@ctx-core/nanostores';
2
2
  import { B } from '@ctx-core/object';
3
- export declare const hostname$_b: B<hostname$_T>;
3
+ export declare const hostname$_: B<hostname$_T>;
4
4
  export declare type hostname$_T = WritableAtom$<string | undefined>;
5
- export { hostname$_b as b__hostname };
@@ -0,0 +1,6 @@
1
+ import { atom$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ export const hostname$_ = be_('hostname$', ()=>atom$(undefined)
4
+ );
5
+
6
+ //# sourceMappingURL=hostname$_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hostname$_.ts"],"sourcesContent":["import { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nexport const hostname$_:B<hostname$_T> = be_('hostname$', ()=>\n\tatom$(undefined) as hostname$_T\n)\nexport type hostname$_T = WritableAtom$<string|undefined>\n"],"names":["atom$","be_","hostname$_","undefined"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAuB,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,CAAC,KAAK,CAACC,UAAU,GAAkBD,GAAG,CAAC,CAAW,gBACvDD,KAAK,CAACG,SAAS"}
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './hostname$_b.js';
2
- export * from './pathname$_b.js';
3
- export * from './window_location$_b.js';
4
- export * from './window_location_hostname$_b.js';
5
- export * from './window_location_pathname$_b.js';
1
+ export * from './hostname$_.js';
2
+ export * from './pathname$_.js';
3
+ export * from './window_location$_.js';
4
+ export * from './window_location_hostname$_.js';
5
+ export * from './window_location_pathname$_.js';
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from './hostname$_b.js';
2
- export * from './pathname$_b.js';
3
- export * from './window_location$_b.js';
4
- export * from './window_location_hostname$_b.js';
5
- export * from './window_location_pathname$_b.js';
1
+ export * from './hostname$_.js';
2
+ export * from './pathname$_.js';
3
+ export * from './window_location$_.js';
4
+ export * from './window_location_hostname$_.js';
5
+ export * from './window_location_pathname$_.js';
6
6
 
7
7
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './hostname$_b.js'\nexport * from './pathname$_b.js'\nexport * from './window_location$_b.js'\nexport * from './window_location_hostname$_b.js'\nexport * from './window_location_pathname$_b.js'\n"],"names":[],"mappings":"cAAc,CAAkB;cAClB,CAAkB;cAClB,CAAyB;cACzB,CAAkC;cAClC,CAAkC"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './hostname$_.js'\nexport * from './pathname$_.js'\nexport * from './window_location$_.js'\nexport * from './window_location_hostname$_.js'\nexport * from './window_location_pathname$_.js'\n"],"names":[],"mappings":"cAAc,CAAiB;cACjB,CAAiB;cACjB,CAAwB;cACxB,CAAiC;cACjC,CAAiC"}
@@ -0,0 +1,5 @@
1
+ import { WritableAtom$ } from '@ctx-core/nanostores';
2
+ import { B } from '@ctx-core/object';
3
+ export declare const pathname$_: B<pathname$_T>;
4
+ export declare type pathname$_T = WritableAtom$<string | undefined>;
5
+ export { pathname$_ as b__pathname };
@@ -0,0 +1,7 @@
1
+ import { atom$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ export const pathname$_ = be_('pathname$', ()=>atom$(undefined)
4
+ );
5
+ export { pathname$_ as b__pathname };
6
+
7
+ //# sourceMappingURL=pathname$_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pathname$_.ts"],"sourcesContent":["import { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nexport const pathname$_:B<pathname$_T> = be_('pathname$', ()=>\n\tatom$(undefined) as pathname$_T\n)\nexport type pathname$_T = WritableAtom$<string|undefined>\nexport { pathname$_ as b__pathname }\n"],"names":["atom$","be_","pathname$_","undefined","b__pathname"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAuB,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,CAAC,KAAK,CAACC,UAAU,GAAkBD,GAAG,CAAC,CAAW,gBACvDD,KAAK,CAACG,SAAS;;AAGhB,MAAM,GAAGD,UAAU,IAAIE,WAAW"}
@@ -1,8 +1,6 @@
1
1
  import { WritableAtom$ } from '@ctx-core/nanostores';
2
2
  import { B } from '@ctx-core/object';
3
- export declare const window_location$_b: B<window_location$_T>;
3
+ export declare const window_location$_: B<window_location$_T>;
4
4
  export interface window_location$_T extends WritableAtom$<Location | undefined> {
5
5
  reset_window_location: () => void;
6
- reset__location__window: () => void;
7
6
  }
8
- export { window_location$_b as b__location__window, };
@@ -1,16 +1,14 @@
1
1
  import { has_dom } from '@ctx-core/dom';
2
2
  import { atom$ } from '@ctx-core/nanostores';
3
- import { be_, assign } from '@ctx-core/object';
4
- const key = 'window_location$';
5
- export const window_location$_b = be_(key, ()=>{
3
+ import { assign, be_ } from '@ctx-core/object';
4
+ export const window_location$_ = be_('window_location$', ()=>{
6
5
  const window_location$ = atom$(undefined);
7
6
  const window_location_reload_popstate_bound$ = atom$(undefined);
8
7
  if (has_dom) {
9
8
  reset_window_location();
10
9
  }
11
10
  return assign(window_location$, {
12
- reset_window_location,
13
- reset__location__window: reset_window_location
11
+ reset_window_location
14
12
  });
15
13
  function reset_window_location() {
16
14
  if (!has_dom) return;
@@ -21,6 +19,5 @@ export const window_location$_b = be_(key, ()=>{
21
19
  window_location$.set(window.location);
22
20
  }
23
21
  });
24
- export { window_location$_b as b__location__window, };
25
22
 
26
- //# sourceMappingURL=window_location$_b.js.map
23
+ //# sourceMappingURL=window_location$_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/window_location$_.ts"],"sourcesContent":["import { has_dom } from '@ctx-core/dom'\nimport { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nimport { assign, B, be_ } from '@ctx-core/object'\nexport const window_location$_:B<window_location$_T> = be_('window_location$', ()=>{\n\tconst window_location$ = atom$<Location|undefined>(undefined)\n\tconst window_location_reload_popstate_bound$ =\n\t\tatom$(undefined) as WritableAtom$<boolean|undefined>\n\tif (has_dom) {\n\t\treset_window_location()\n\t}\n\treturn assign(window_location$, { reset_window_location }) as window_location$_T\n\tfunction reset_window_location() {\n\t\tif (!has_dom) return\n\t\tif (!window_location_reload_popstate_bound$.$) {\n\t\t\twindow_location_reload_popstate_bound$.set(true)\n\t\t\twindow.addEventListener(\n\t\t\t\t'popstate',\n\t\t\t\treset_window_location)\n\t\t}\n\t\twindow_location$.set(window.location)\n\t}\n})\nexport interface window_location$_T extends WritableAtom$<Location|undefined> {\n\treset_window_location:()=>void\n}\n"],"names":["has_dom","atom$","assign","be_","window_location$_","window_location$","undefined","window_location_reload_popstate_bound$","reset_window_location","$","set","window","addEventListener","location"],"mappings":"AAAA,MAAM,GAAGA,OAAO,QAAQ,CAAe;AACvC,MAAM,GAAGC,KAAK,QAAuB,CAAsB;AAC3D,MAAM,GAAGC,MAAM,EAAKC,GAAG,QAAQ,CAAkB;AACjD,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAyBD,GAAG,CAAC,CAAkB,uBAAM,CAAC;IACnF,KAAK,CAACE,gBAAgB,GAAGJ,KAAK,CAAqBK,SAAS;IAC5D,KAAK,CAACC,sCAAsC,GAC3CN,KAAK,CAACK,SAAS;IAChB,EAAE,EAAEN,OAAO,EAAE,CAAC;QACbQ,qBAAqB;IACtB,CAAC;IACD,MAAM,CAACN,MAAM,CAACG,gBAAgB,EAAE,CAAC;QAACG,qBAAqB;IAAC,CAAC;aAChDA,qBAAqB,GAAG,CAAC;QACjC,EAAE,GAAGR,OAAO,EAAE,MAAM;QACpB,EAAE,GAAGO,sCAAsC,CAACE,CAAC,EAAE,CAAC;YAC/CF,sCAAsC,CAACG,GAAG,CAAC,IAAI;YAC/CC,MAAM,CAACC,gBAAgB,CACtB,CAAU,WACVJ,qBAAqB;QACvB,CAAC;QACDH,gBAAgB,CAACK,GAAG,CAACC,MAAM,CAACE,QAAQ;IACrC,CAAC;AACF,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { ReadableAtom$ } from '@ctx-core/nanostores';
2
2
  import { B } from '@ctx-core/object';
3
- export declare const window_location_hostname$_b: B<window_location_hostname$_T>;
3
+ export declare const window_location_hostname$_: B<window_location_hostname$_T>;
4
4
  export declare type window_location_hostname$_T = ReadableAtom$<string | undefined>;
@@ -0,0 +1,12 @@
1
+ import { computed$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ import { hostname$_ } from './hostname$_.js';
4
+ import { window_location$_ } from './window_location$_.js';
5
+ export const window_location_hostname$_ = be_('window_location_hostname$', (ctx)=>computed$([
6
+ hostname$_(ctx),
7
+ window_location$_(ctx),
8
+ ], (hostname, window_location)=>window_location && window_location.hostname || hostname || ''
9
+ )
10
+ );
11
+
12
+ //# sourceMappingURL=window_location_hostname$_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/window_location_hostname$_.ts"],"sourcesContent":["import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nimport { hostname$_ } from './hostname$_.js'\nimport { window_location$_ } from './window_location$_.js'\nexport const window_location_hostname$_:B<window_location_hostname$_T> = be_('window_location_hostname$', ctx=>\n\tcomputed$([\n\t\t\thostname$_(ctx),\n\t\t\twindow_location$_(ctx),\n\t\t],\n\t\t(hostname, window_location)=>\n\t\t\t(window_location && (window_location as Location).hostname) || hostname || ''\n\t) as window_location_hostname$_T\n)\nexport type window_location_hostname$_T = ReadableAtom$<string|undefined>\n"],"names":["computed$","be_","hostname$_","window_location$_","window_location_hostname$_","ctx","hostname","window_location"],"mappings":"AAAA,MAAM,GAAGA,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,UAAU,QAAQ,CAAiB;AAC5C,MAAM,GAAGC,iBAAiB,QAAQ,CAAwB;AAC1D,MAAM,CAAC,KAAK,CAACC,0BAA0B,GAAkCH,GAAG,CAAC,CAA2B,6BAAEI,GAAG,GAC5GL,SAAS,CAAC,CAAC;QACTE,UAAU,CAACG,GAAG;QACdF,iBAAiB,CAACE,GAAG;IACtB,CAAC,GACAC,QAAQ,EAAEC,eAAe,GACxBA,eAAe,IAAKA,eAAe,CAAcD,QAAQ,IAAKA,QAAQ,IAAI,CAAE"}
@@ -0,0 +1,5 @@
1
+ import { ReadableAtom$ } from '@ctx-core/nanostores';
2
+ import { B } from '@ctx-core/object';
3
+ export declare const window_location_pathname$_: B<window_location_pathname$_T>;
4
+ export declare type window_location_pathname_T = string | undefined;
5
+ export declare type window_location_pathname$_T = ReadableAtom$<window_location_pathname_T>;
@@ -0,0 +1,12 @@
1
+ import { computed$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ import { pathname$_ } from './pathname$_.js';
4
+ import { window_location$_ } from './window_location$_.js';
5
+ export const window_location_pathname$_ = be_('window_location_pathname$', (ctx)=>computed$([
6
+ pathname$_(ctx),
7
+ window_location$_(ctx),
8
+ ], (pathname, location__window)=>location__window && location__window.pathname || pathname || ''
9
+ )
10
+ );
11
+
12
+ //# sourceMappingURL=window_location_pathname$_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/window_location_pathname$_.ts"],"sourcesContent":["import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nimport { pathname$_ } from './pathname$_.js'\nimport { window_location$_ } from './window_location$_.js'\nexport const window_location_pathname$_:B<window_location_pathname$_T> = be_('window_location_pathname$', ctx=>\n\tcomputed$([\n\t\t\tpathname$_(ctx),\n\t\t\twindow_location$_(ctx),\n\t\t],\n\t\t(pathname, location__window)=>\n\t\t\t(location__window && (location__window as Location).pathname)\n\t\t\t|| pathname\n\t\t\t|| ''\n\t) as window_location_pathname$_T\n)\nexport type window_location_pathname_T = string|undefined\nexport type window_location_pathname$_T = ReadableAtom$<window_location_pathname_T>\n"],"names":["computed$","be_","pathname$_","window_location$_","window_location_pathname$_","ctx","pathname","location__window"],"mappings":"AAAA,MAAM,GAAGA,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,UAAU,QAAQ,CAAiB;AAC5C,MAAM,GAAGC,iBAAiB,QAAQ,CAAwB;AAC1D,MAAM,CAAC,KAAK,CAACC,0BAA0B,GAAkCH,GAAG,CAAC,CAA2B,6BAAEI,GAAG,GAC5GL,SAAS,CAAC,CAAC;QACTE,UAAU,CAACG,GAAG;QACdF,iBAAiB,CAACE,GAAG;IACtB,CAAC,GACAC,QAAQ,EAAEC,gBAAgB,GACzBA,gBAAgB,IAAKA,gBAAgB,CAAcD,QAAQ,IACzDA,QAAQ,IACR,CAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/window",
3
- "version": "13.0.18",
3
+ "version": "14.0.3",
4
4
  "description": "ctx-core window",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -25,14 +25,14 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ctx-core/dom": "^11.1.5",
29
- "@ctx-core/function": "^20.4.0",
30
- "@ctx-core/nanostores": "^0.5.0",
31
- "@ctx-core/object": "^22.0.13"
28
+ "@ctx-core/dom": "^11.1.6",
29
+ "@ctx-core/function": "20.4.0",
30
+ "@ctx-core/nanostores": "^0.5.4",
31
+ "@ctx-core/object": "22.1.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@swc/cli": "^0.1.55",
35
- "@swc/core": "^1.2.135",
35
+ "@swc/core": "^1.2.136",
36
36
  "rimraf": "^3.0.2",
37
37
  "typescript": "next"
38
38
  },
@@ -0,0 +1,6 @@
1
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
2
+ import { B, be_ } from '@ctx-core/object'
3
+ export const hostname$_:B<hostname$_T> = be_('hostname$', ()=>
4
+ atom$(undefined) as hostname$_T
5
+ )
6
+ export type hostname$_T = WritableAtom$<string|undefined>
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './hostname$_b.js'
2
- export * from './pathname$_b.js'
3
- export * from './window_location$_b.js'
4
- export * from './window_location_hostname$_b.js'
5
- export * from './window_location_pathname$_b.js'
1
+ export * from './hostname$_.js'
2
+ export * from './pathname$_.js'
3
+ export * from './window_location$_.js'
4
+ export * from './window_location_hostname$_.js'
5
+ export * from './window_location_pathname$_.js'
@@ -0,0 +1,7 @@
1
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
2
+ import { B, be_ } from '@ctx-core/object'
3
+ export const pathname$_:B<pathname$_T> = be_('pathname$', ()=>
4
+ atom$(undefined) as pathname$_T
5
+ )
6
+ export type pathname$_T = WritableAtom$<string|undefined>
7
+ export { pathname$_ as b__pathname }
@@ -1,18 +1,14 @@
1
1
  import { has_dom } from '@ctx-core/dom'
2
- import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
3
- import { B, be_, assign } from '@ctx-core/object'
4
- const key = 'window_location$'
5
- export const window_location$_b:B<window_location$_T> = be_(key, ()=>{
2
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
3
+ import { assign, B, be_ } from '@ctx-core/object'
4
+ export const window_location$_:B<window_location$_T> = be_('window_location$', ()=>{
6
5
  const window_location$ = atom$<Location|undefined>(undefined)
7
6
  const window_location_reload_popstate_bound$ =
8
7
  atom$(undefined) as WritableAtom$<boolean|undefined>
9
8
  if (has_dom) {
10
9
  reset_window_location()
11
10
  }
12
- return assign(window_location$, {
13
- reset_window_location,
14
- reset__location__window: reset_window_location,
15
- }) as window_location$_T
11
+ return assign(window_location$, { reset_window_location }) as window_location$_T
16
12
  function reset_window_location() {
17
13
  if (!has_dom) return
18
14
  if (!window_location_reload_popstate_bound$.$) {
@@ -26,8 +22,4 @@ export const window_location$_b:B<window_location$_T> = be_(key, ()=>{
26
22
  })
27
23
  export interface window_location$_T extends WritableAtom$<Location|undefined> {
28
24
  reset_window_location:()=>void
29
- reset__location__window:()=>void
30
- }
31
- export {
32
- window_location$_b as b__location__window,
33
25
  }
@@ -1,12 +1,11 @@
1
1
  import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
2
2
  import { B, be_ } from '@ctx-core/object'
3
- import { hostname$_b } from './hostname$_b.js'
4
- import { window_location$_b } from './window_location$_b.js'
5
- const key = 'window_location_hostname$'
6
- export const window_location_hostname$_b:B<window_location_hostname$_T> = be_(key, ctx=>
3
+ import { hostname$_ } from './hostname$_.js'
4
+ import { window_location$_ } from './window_location$_.js'
5
+ export const window_location_hostname$_:B<window_location_hostname$_T> = be_('window_location_hostname$', ctx=>
7
6
  computed$([
8
- hostname$_b(ctx),
9
- window_location$_b(ctx),
7
+ hostname$_(ctx),
8
+ window_location$_(ctx),
10
9
  ],
11
10
  (hostname, window_location)=>
12
11
  (window_location && (window_location as Location).hostname) || hostname || ''
@@ -0,0 +1,17 @@
1
+ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
2
+ import { B, be_ } from '@ctx-core/object'
3
+ import { pathname$_ } from './pathname$_.js'
4
+ import { window_location$_ } from './window_location$_.js'
5
+ export const window_location_pathname$_:B<window_location_pathname$_T> = be_('window_location_pathname$', ctx=>
6
+ computed$([
7
+ pathname$_(ctx),
8
+ window_location$_(ctx),
9
+ ],
10
+ (pathname, location__window)=>
11
+ (location__window && (location__window as Location).pathname)
12
+ || pathname
13
+ || ''
14
+ ) as window_location_pathname$_T
15
+ )
16
+ export type window_location_pathname_T = string|undefined
17
+ export type window_location_pathname$_T = ReadableAtom$<window_location_pathname_T>
@@ -1,8 +0,0 @@
1
- import { atom$ } from '@ctx-core/nanostores';
2
- import { be_ } from '@ctx-core/object';
3
- const key = 'hostname$';
4
- export const hostname$_b = be_(key, ()=>atom$(undefined)
5
- );
6
- export { hostname$_b as b__hostname };
7
-
8
- //# sourceMappingURL=hostname$_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/hostname$_b.ts"],"sourcesContent":["import { WritableAtom$, atom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nconst key = 'hostname$'\nexport const hostname$_b:B<hostname$_T> = be_(key, ()=>\n\tatom$(undefined) as hostname$_T\n)\nexport type hostname$_T = WritableAtom$<string|undefined>\nexport { hostname$_b as b__hostname }\n"],"names":["atom$","be_","key","hostname$_b","undefined","b__hostname"],"mappings":"AAAA,MAAM,GAAkBA,KAAK,QAAQ,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAAkBF,GAAG,CAACC,GAAG,MAChDF,KAAK,CAACI,SAAS;;AAGhB,MAAM,GAAGD,WAAW,IAAIE,WAAW"}
@@ -1,6 +0,0 @@
1
- import { WritableAtom$ } from '@ctx-core/nanostores';
2
- import { B } from '@ctx-core/object';
3
- export declare const pathname$_b: B<pathname$_T>;
4
- export interface pathname$_T extends WritableAtom$<string | undefined> {
5
- }
6
- export { pathname$_b as b__pathname };
@@ -1,8 +0,0 @@
1
- import { atom$ } from '@ctx-core/nanostores';
2
- import { be_ } from '@ctx-core/object';
3
- const key = 'pathname$';
4
- export const pathname$_b = be_(key, ()=>atom$(undefined)
5
- );
6
- export { pathname$_b as b__pathname };
7
-
8
- //# sourceMappingURL=pathname$_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/pathname$_b.ts"],"sourcesContent":["import { WritableAtom$, atom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nconst key = 'pathname$'\nexport const pathname$_b:B<pathname$_T> = be_(key, ()=>\n\tatom$(undefined) as pathname$_T\n)\nexport interface pathname$_T extends WritableAtom$<string|undefined> {}\nexport { pathname$_b as b__pathname }\n"],"names":["atom$","be_","key","pathname$_b","undefined","b__pathname"],"mappings":"AAAA,MAAM,GAAkBA,KAAK,QAAQ,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAAkBF,GAAG,CAACC,GAAG,MAChDF,KAAK,CAACI,SAAS;;AAGhB,MAAM,GAAGD,WAAW,IAAIE,WAAW"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/window_location$_b.ts"],"sourcesContent":["import { has_dom } from '@ctx-core/dom'\nimport { WritableAtom$, atom$ } from '@ctx-core/nanostores'\nimport { B, be_, assign } from '@ctx-core/object'\nconst key = 'window_location$'\nexport const window_location$_b:B<window_location$_T> = be_(key, ()=>{\n\tconst window_location$ = atom$<Location|undefined>(undefined)\n\tconst window_location_reload_popstate_bound$ =\n\t\tatom$(undefined) as WritableAtom$<boolean|undefined>\n\tif (has_dom) {\n\t\treset_window_location()\n\t}\n\treturn assign(window_location$, {\n\t\treset_window_location,\n\t\treset__location__window: reset_window_location,\n\t}) as window_location$_T\n\tfunction reset_window_location() {\n\t\tif (!has_dom) return\n\t\tif (!window_location_reload_popstate_bound$.$) {\n\t\t\twindow_location_reload_popstate_bound$.set(true)\n\t\t\twindow.addEventListener(\n\t\t\t\t'popstate',\n\t\t\t\treset_window_location)\n\t\t}\n\t\twindow_location$.set(window.location)\n\t}\n})\nexport interface window_location$_T extends WritableAtom$<Location|undefined> {\n\treset_window_location:()=>void\n\treset__location__window:()=>void\n}\nexport {\n\twindow_location$_b as b__location__window,\n}\n"],"names":["has_dom","atom$","be_","assign","key","window_location$_b","window_location$","undefined","window_location_reload_popstate_bound$","reset_window_location","reset__location__window","$","set","window","addEventListener","location","b__location__window"],"mappings":"AAAA,MAAM,GAAGA,OAAO,QAAQ,CAAe;AACvC,MAAM,GAAkBC,KAAK,QAAQ,CAAsB;AAC3D,MAAM,GAAMC,GAAG,EAAEC,MAAM,QAAQ,CAAkB;AACjD,KAAK,CAACC,GAAG,GAAG,CAAkB;AAC9B,MAAM,CAAC,KAAK,CAACC,kBAAkB,GAAyBH,GAAG,CAACE,GAAG,MAAM,CAAC;IACrE,KAAK,CAACE,gBAAgB,GAAGL,KAAK,CAAqBM,SAAS;IAC5D,KAAK,CAACC,sCAAsC,GAC3CP,KAAK,CAACM,SAAS;IAChB,EAAE,EAAEP,OAAO,EAAE,CAAC;QACbS,qBAAqB;IACtB,CAAC;IACD,MAAM,CAACN,MAAM,CAACG,gBAAgB,EAAE,CAAC;QAChCG,qBAAqB;QACrBC,uBAAuB,EAAED,qBAAqB;IAC/C,CAAC;aACQA,qBAAqB,GAAG,CAAC;QACjC,EAAE,GAAGT,OAAO,EAAE,MAAM;QACpB,EAAE,GAAGQ,sCAAsC,CAACG,CAAC,EAAE,CAAC;YAC/CH,sCAAsC,CAACI,GAAG,CAAC,IAAI;YAC/CC,MAAM,CAACC,gBAAgB,CACtB,CAAU,WACVL,qBAAqB;QACvB,CAAC;QACDH,gBAAgB,CAACM,GAAG,CAACC,MAAM,CAACE,QAAQ;IACrC,CAAC;AACF,CAAC;AAKD,MAAM,GACLV,kBAAkB,IAAIW,mBAAmB"}
@@ -1,13 +0,0 @@
1
- import { computed$ } from '@ctx-core/nanostores';
2
- import { be_ } from '@ctx-core/object';
3
- import { hostname$_b } from './hostname$_b.js';
4
- import { window_location$_b } from './window_location$_b.js';
5
- const key = 'window_location_hostname$';
6
- export const window_location_hostname$_b = be_(key, (ctx)=>computed$([
7
- hostname$_b(ctx),
8
- window_location$_b(ctx),
9
- ], (hostname, window_location)=>window_location && window_location.hostname || hostname || ''
10
- )
11
- );
12
-
13
- //# sourceMappingURL=window_location_hostname$_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/window_location_hostname$_b.ts"],"sourcesContent":["import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nimport { hostname$_b } from './hostname$_b.js'\nimport { window_location$_b } from './window_location$_b.js'\nconst key = 'window_location_hostname$'\nexport const window_location_hostname$_b:B<window_location_hostname$_T> = be_(key, ctx=>\n\tcomputed$([\n\t\t\thostname$_b(ctx),\n\t\t\twindow_location$_b(ctx),\n\t\t],\n\t\t(hostname, window_location)=>\n\t\t\t(window_location && (window_location as Location).hostname) || hostname || ''\n\t) as window_location_hostname$_T\n)\nexport type window_location_hostname$_T = ReadableAtom$<string|undefined>\n"],"names":["computed$","be_","hostname$_b","window_location$_b","key","window_location_hostname$_b","ctx","hostname","window_location"],"mappings":"AAAA,MAAM,GAAGA,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,MAAM,GAAGC,kBAAkB,QAAQ,CAAyB;AAC5D,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,2BAA2B,GAAkCJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACrFN,SAAS,CAAC,CAAC;QACTE,WAAW,CAACI,GAAG;QACfH,kBAAkB,CAACG,GAAG;IACvB,CAAC,GACAC,QAAQ,EAAEC,eAAe,GACxBA,eAAe,IAAKA,eAAe,CAAcD,QAAQ,IAAKA,QAAQ,IAAI,CAAE"}
@@ -1,7 +0,0 @@
1
- import { ReadableAtom$ } from '@ctx-core/nanostores';
2
- import { B } from '@ctx-core/object';
3
- export declare const window_location_pathname$_b: B<window_location_pathname$_T>;
4
- export declare type window_location_pathname_T = string | undefined;
5
- export interface window_location_pathname$_T extends ReadableAtom$<window_location_pathname_T> {
6
- }
7
- export { window_location_pathname$_b as window_location_pathname_b, window_location_pathname$_b as b__pathname__location__window, };
@@ -1,14 +0,0 @@
1
- import { computed$ } from '@ctx-core/nanostores';
2
- import { be_ } from '@ctx-core/object';
3
- import { pathname$_b } from './pathname$_b.js';
4
- import { window_location$_b } from './window_location$_b.js';
5
- const key = 'window_location_pathname$';
6
- export const window_location_pathname$_b = be_(key, (ctx)=>computed$([
7
- pathname$_b(ctx),
8
- window_location$_b(ctx),
9
- ], (pathname, location__window)=>location__window && location__window.pathname || pathname || ''
10
- )
11
- );
12
- export { window_location_pathname$_b as window_location_pathname_b, window_location_pathname$_b as b__pathname__location__window, };
13
-
14
- //# sourceMappingURL=window_location_pathname$_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/window_location_pathname$_b.ts"],"sourcesContent":["import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\nimport { pathname$_b } from './pathname$_b.js'\nimport { window_location$_b } from './window_location$_b.js'\nconst key = 'window_location_pathname$'\nexport const window_location_pathname$_b:B<window_location_pathname$_T> = be_(key, ctx=>\n\tcomputed$([\n\t\t\tpathname$_b(ctx),\n\t\t\twindow_location$_b(ctx),\n\t\t],\n\t\t(pathname, location__window)=>\n\t\t\t(location__window && (location__window as Location).pathname)\n\t\t\t|| pathname\n\t\t\t|| ''\n\t) as window_location_pathname$_T\n)\nexport type window_location_pathname_T = string|undefined\nexport interface window_location_pathname$_T extends ReadableAtom$<window_location_pathname_T> {}\nexport {\n\twindow_location_pathname$_b as window_location_pathname_b,\n\twindow_location_pathname$_b as b__pathname__location__window,\n}\n"],"names":["computed$","be_","pathname$_b","window_location$_b","key","window_location_pathname$_b","ctx","pathname","location__window","window_location_pathname_b","b__pathname__location__window"],"mappings":"AAAA,MAAM,GAAGA,SAAS,QAAuB,CAAsB;AAC/D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,MAAM,GAAGC,kBAAkB,QAAQ,CAAyB;AAC5D,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,2BAA2B,GAAkCJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACrFN,SAAS,CAAC,CAAC;QACTE,WAAW,CAACI,GAAG;QACfH,kBAAkB,CAACG,GAAG;IACvB,CAAC,GACAC,QAAQ,EAAEC,gBAAgB,GACzBA,gBAAgB,IAAKA,gBAAgB,CAAcD,QAAQ,IACzDA,QAAQ,IACR,CAAE;;;AAKR,MAAM,GACLF,2BAA2B,IAAII,0BAA0B,EACzDJ,2BAA2B,IAAIK,6BAA6B"}
@@ -1,8 +0,0 @@
1
- import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
2
- import { B, be_ } from '@ctx-core/object'
3
- const key = 'hostname$'
4
- export const hostname$_b:B<hostname$_T> = be_(key, ()=>
5
- atom$(undefined) as hostname$_T
6
- )
7
- export type hostname$_T = WritableAtom$<string|undefined>
8
- export { hostname$_b as b__hostname }
@@ -1,8 +0,0 @@
1
- import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
2
- import { B, be_ } from '@ctx-core/object'
3
- const key = 'pathname$'
4
- export const pathname$_b:B<pathname$_T> = be_(key, ()=>
5
- atom$(undefined) as pathname$_T
6
- )
7
- export interface pathname$_T extends WritableAtom$<string|undefined> {}
8
- export { pathname$_b as b__pathname }
@@ -1,22 +0,0 @@
1
- import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
2
- import { B, be_ } from '@ctx-core/object'
3
- import { pathname$_b } from './pathname$_b.js'
4
- import { window_location$_b } from './window_location$_b.js'
5
- const key = 'window_location_pathname$'
6
- export const window_location_pathname$_b:B<window_location_pathname$_T> = be_(key, ctx=>
7
- computed$([
8
- pathname$_b(ctx),
9
- window_location$_b(ctx),
10
- ],
11
- (pathname, location__window)=>
12
- (location__window && (location__window as Location).pathname)
13
- || pathname
14
- || ''
15
- ) as window_location_pathname$_T
16
- )
17
- export type window_location_pathname_T = string|undefined
18
- export interface window_location_pathname$_T extends ReadableAtom$<window_location_pathname_T> {}
19
- export {
20
- window_location_pathname$_b as window_location_pathname_b,
21
- window_location_pathname$_b as b__pathname__location__window,
22
- }