@ctx-core/window 13.0.18 → 14.0.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 (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/{hostname$_b.d.ts → hostname$_.d.ts} +1 -2
  3. package/lib/hostname$_.js +7 -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 +8 -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} +3 -5
  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 +13 -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 +13 -0
  19. package/lib/window_location_pathname$_.js.map +1 -0
  20. package/package.json +2 -2
  21. package/src/{hostname$_b.ts → hostname$_.ts} +2 -3
  22. package/src/index.ts +5 -5
  23. package/src/pathname$_.ts +8 -0
  24. package/src/{window_location$_b.ts → window_location$_.ts} +3 -10
  25. package/src/{window_location_hostname$_b.ts → window_location_hostname$_.ts} +5 -5
  26. package/src/window_location_pathname$_.ts +18 -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/pathname$_b.ts +0 -8
  39. package/src/window_location_pathname$_b.ts +0 -22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ctx-core/window
2
2
 
3
+ ## 14.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - flatten functions: remove \_b suffix from exports
8
+
3
9
  ## 13.0.18
4
10
 
5
11
  ### 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,7 @@
1
+ import { atom$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ const key = 'hostname$';
4
+ export const hostname$_ = be_(key, ()=>atom$(undefined)
5
+ );
6
+
7
+ //# 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'\nconst key = 'hostname$'\nexport const hostname$_:B<hostname$_T> = be_(key, ()=>\n\tatom$(undefined) as hostname$_T\n)\nexport type hostname$_T = WritableAtom$<string|undefined>\n"],"names":["atom$","be_","key","hostname$_","undefined"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAuB,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,UAAU,GAAkBF,GAAG,CAACC,GAAG,MAC/CF,KAAK,CAACI,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,8 @@
1
+ import { atom$ } from '@ctx-core/nanostores';
2
+ import { be_ } from '@ctx-core/object';
3
+ const key = 'pathname$';
4
+ export const pathname$_ = be_(key, ()=>atom$(undefined)
5
+ );
6
+ export { pathname$_ as b__pathname };
7
+
8
+ //# 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'\nconst key = 'pathname$'\nexport const pathname$_:B<pathname$_T> = be_(key, ()=>\n\tatom$(undefined) as pathname$_T\n)\nexport type pathname$_T = WritableAtom$<string|undefined>\nexport { pathname$_ as b__pathname }\n"],"names":["atom$","be_","key","pathname$_","undefined","b__pathname"],"mappings":"AAAA,MAAM,GAAGA,KAAK,QAAuB,CAAsB;AAC3D,MAAM,GAAMC,GAAG,QAAQ,CAAkB;AACzC,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,UAAU,GAAkBF,GAAG,CAACC,GAAG,MAC/CF,KAAK,CAACI,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, };
@@ -2,15 +2,14 @@ import { has_dom } from '@ctx-core/dom';
2
2
  import { atom$ } from '@ctx-core/nanostores';
3
3
  import { be_, assign } from '@ctx-core/object';
4
4
  const key = 'window_location$';
5
- export const window_location$_b = be_(key, ()=>{
5
+ export const window_location$_ = be_(key, ()=>{
6
6
  const window_location$ = atom$(undefined);
7
7
  const window_location_reload_popstate_bound$ = atom$(undefined);
8
8
  if (has_dom) {
9
9
  reset_window_location();
10
10
  }
11
11
  return assign(window_location$, {
12
- reset_window_location,
13
- reset__location__window: reset_window_location
12
+ reset_window_location
14
13
  });
15
14
  function reset_window_location() {
16
15
  if (!has_dom) return;
@@ -21,6 +20,5 @@ export const window_location$_b = be_(key, ()=>{
21
20
  window_location$.set(window.location);
22
21
  }
23
22
  });
24
- export { window_location$_b as b__location__window, };
25
23
 
26
- //# sourceMappingURL=window_location$_b.js.map
24
+ //# 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 { B, be_, assign } from '@ctx-core/object'\nconst key = 'window_location$'\nexport const window_location$_: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$, { 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$","be_","assign","key","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,GAAMC,GAAG,EAAEC,MAAM,QAAQ,CAAkB;AACjD,KAAK,CAACC,GAAG,GAAG,CAAkB;AAC9B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAyBH,GAAG,CAACE,GAAG,MAAM,CAAC;IACpE,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;QAACG,qBAAqB;IAAC,CAAC;aAChDA,qBAAqB,GAAG,CAAC;QACjC,EAAE,GAAGT,OAAO,EAAE,MAAM;QACpB,EAAE,GAAGQ,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,13 @@
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
+ const key = 'window_location_hostname$';
6
+ export const window_location_hostname$_ = be_(key, (ctx)=>computed$([
7
+ hostname$_(ctx),
8
+ window_location$_(ctx),
9
+ ], (hostname, window_location)=>window_location && window_location.hostname || hostname || ''
10
+ )
11
+ );
12
+
13
+ //# 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'\nconst key = 'window_location_hostname$'\nexport const window_location_hostname$_:B<window_location_hostname$_T> = be_(key, 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$_","key","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,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,0BAA0B,GAAkCJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACpFN,SAAS,CAAC,CAAC;QACTE,UAAU,CAACI,GAAG;QACdH,iBAAiB,CAACG,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,13 @@
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
+ const key = 'window_location_pathname$';
6
+ export const window_location_pathname$_ = be_(key, (ctx)=>computed$([
7
+ pathname$_(ctx),
8
+ window_location$_(ctx),
9
+ ], (pathname, location__window)=>location__window && location__window.pathname || pathname || ''
10
+ )
11
+ );
12
+
13
+ //# 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'\nconst key = 'window_location_pathname$'\nexport const window_location_pathname$_:B<window_location_pathname$_T> = be_(key, 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$_","key","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,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,0BAA0B,GAAkCJ,GAAG,CAACG,GAAG,GAAEE,GAAG,GACpFN,SAAS,CAAC,CAAC;QACTE,UAAU,CAACI,GAAG;QACdH,iBAAiB,CAACG,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.0",
4
4
  "description": "ctx-core window",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@ctx-core/dom": "^11.1.5",
29
29
  "@ctx-core/function": "^20.4.0",
30
- "@ctx-core/nanostores": "^0.5.0",
30
+ "@ctx-core/nanostores": "^0.5.1",
31
31
  "@ctx-core/object": "^22.0.13"
32
32
  },
33
33
  "devDependencies": {
@@ -1,8 +1,7 @@
1
- import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
1
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
2
2
  import { B, be_ } from '@ctx-core/object'
3
3
  const key = 'hostname$'
4
- export const hostname$_b:B<hostname$_T> = be_(key, ()=>
4
+ export const hostname$_:B<hostname$_T> = be_(key, ()=>
5
5
  atom$(undefined) as hostname$_T
6
6
  )
7
7
  export type hostname$_T = WritableAtom$<string|undefined>
8
- export { hostname$_b as b__hostname }
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,8 @@
1
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
2
+ import { B, be_ } from '@ctx-core/object'
3
+ const key = 'pathname$'
4
+ export const pathname$_:B<pathname$_T> = be_(key, ()=>
5
+ atom$(undefined) as pathname$_T
6
+ )
7
+ export type pathname$_T = WritableAtom$<string|undefined>
8
+ export { pathname$_ as b__pathname }
@@ -1,18 +1,15 @@
1
1
  import { has_dom } from '@ctx-core/dom'
2
- import { WritableAtom$, atom$ } from '@ctx-core/nanostores'
2
+ import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
3
3
  import { B, be_, assign } from '@ctx-core/object'
4
4
  const key = 'window_location$'
5
- export const window_location$_b:B<window_location$_T> = be_(key, ()=>{
5
+ export const window_location$_:B<window_location$_T> = be_(key, ()=>{
6
6
  const window_location$ = atom$<Location|undefined>(undefined)
7
7
  const window_location_reload_popstate_bound$ =
8
8
  atom$(undefined) as WritableAtom$<boolean|undefined>
9
9
  if (has_dom) {
10
10
  reset_window_location()
11
11
  }
12
- return assign(window_location$, {
13
- reset_window_location,
14
- reset__location__window: reset_window_location,
15
- }) as window_location$_T
12
+ return assign(window_location$, { reset_window_location }) as window_location$_T
16
13
  function reset_window_location() {
17
14
  if (!has_dom) return
18
15
  if (!window_location_reload_popstate_bound$.$) {
@@ -26,8 +23,4 @@ export const window_location$_b:B<window_location$_T> = be_(key, ()=>{
26
23
  })
27
24
  export interface window_location$_T extends WritableAtom$<Location|undefined> {
28
25
  reset_window_location:()=>void
29
- reset__location__window:()=>void
30
- }
31
- export {
32
- window_location$_b as b__location__window,
33
26
  }
@@ -1,12 +1,12 @@
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'
3
+ import { hostname$_ } from './hostname$_.js'
4
+ import { window_location$_ } from './window_location$_.js'
5
5
  const key = 'window_location_hostname$'
6
- export const window_location_hostname$_b:B<window_location_hostname$_T> = be_(key, ctx=>
6
+ export const window_location_hostname$_:B<window_location_hostname$_T> = be_(key, ctx=>
7
7
  computed$([
8
- hostname$_b(ctx),
9
- window_location$_b(ctx),
8
+ hostname$_(ctx),
9
+ window_location$_(ctx),
10
10
  ],
11
11
  (hostname, window_location)=>
12
12
  (window_location && (window_location as Location).hostname) || hostname || ''
@@ -0,0 +1,18 @@
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
+ const key = 'window_location_pathname$'
6
+ export const window_location_pathname$_:B<window_location_pathname$_T> = be_(key, ctx=>
7
+ computed$([
8
+ pathname$_(ctx),
9
+ window_location$_(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 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 = '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
- }