@ctx-core/window 14.0.0 → 14.0.1
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/CHANGELOG.md +6 -0
- package/COMMIT_EDITMSG +2 -0
- package/lib/hostname$_.js +1 -2
- package/lib/hostname$_.js.map +1 -1
- package/lib/pathname$_.js +1 -2
- package/lib/pathname$_.js.map +1 -1
- package/lib/window_location$_.js +2 -3
- package/lib/window_location$_.js.map +1 -1
- package/lib/window_location_hostname$_.js +1 -2
- package/lib/window_location_hostname$_.js.map +1 -1
- package/lib/window_location_pathname$_.js +1 -2
- package/lib/window_location_pathname$_.js.map +1 -1
- package/package.json +2 -2
- package/src/hostname$_.ts +1 -2
- package/src/pathname$_.ts +1 -2
- package/src/window_location$_.ts +2 -3
- package/src/window_location_hostname$_.ts +1 -2
- package/src/window_location_pathname$_.ts +1 -2
package/CHANGELOG.md
CHANGED
package/COMMIT_EDITMSG
ADDED
package/lib/hostname$_.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { atom$ } from '@ctx-core/nanostores';
|
|
2
2
|
import { be_ } from '@ctx-core/object';
|
|
3
|
-
const
|
|
4
|
-
export const hostname$_ = be_(key, ()=>atom$(undefined)
|
|
3
|
+
export const hostname$_ = be_('hostname$', ()=>atom$(undefined)
|
|
5
4
|
);
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=hostname$_.js.map
|
package/lib/hostname$_.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hostname$_.ts"],"sourcesContent":["import { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\
|
|
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/pathname$_.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { atom$ } from '@ctx-core/nanostores';
|
|
2
2
|
import { be_ } from '@ctx-core/object';
|
|
3
|
-
const
|
|
4
|
-
export const pathname$_ = be_(key, ()=>atom$(undefined)
|
|
3
|
+
export const pathname$_ = be_('pathname$', ()=>atom$(undefined)
|
|
5
4
|
);
|
|
6
5
|
export { pathname$_ as b__pathname };
|
|
7
6
|
|
package/lib/pathname$_.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pathname$_.ts"],"sourcesContent":["import { atom$, WritableAtom$ } from '@ctx-core/nanostores'\nimport { B, be_ } from '@ctx-core/object'\
|
|
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"}
|
package/lib/window_location$_.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { has_dom } from '@ctx-core/dom';
|
|
2
2
|
import { atom$ } from '@ctx-core/nanostores';
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
export const window_location$_ = 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) {
|
|
@@ -1 +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_
|
|
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"}
|
|
@@ -2,8 +2,7 @@ import { computed$ } from '@ctx-core/nanostores';
|
|
|
2
2
|
import { be_ } from '@ctx-core/object';
|
|
3
3
|
import { hostname$_ } from './hostname$_.js';
|
|
4
4
|
import { window_location$_ } from './window_location$_.js';
|
|
5
|
-
const
|
|
6
|
-
export const window_location_hostname$_ = be_(key, (ctx)=>computed$([
|
|
5
|
+
export const window_location_hostname$_ = be_('window_location_hostname$', (ctx)=>computed$([
|
|
7
6
|
hostname$_(ctx),
|
|
8
7
|
window_location$_(ctx),
|
|
9
8
|
], (hostname, window_location)=>window_location && window_location.hostname || hostname || ''
|
|
@@ -1 +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'\
|
|
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"}
|
|
@@ -2,8 +2,7 @@ import { computed$ } from '@ctx-core/nanostores';
|
|
|
2
2
|
import { be_ } from '@ctx-core/object';
|
|
3
3
|
import { pathname$_ } from './pathname$_.js';
|
|
4
4
|
import { window_location$_ } from './window_location$_.js';
|
|
5
|
-
const
|
|
6
|
-
export const window_location_pathname$_ = be_(key, (ctx)=>computed$([
|
|
5
|
+
export const window_location_pathname$_ = be_('window_location_pathname$', (ctx)=>computed$([
|
|
7
6
|
pathname$_(ctx),
|
|
8
7
|
window_location$_(ctx),
|
|
9
8
|
], (pathname, location__window)=>location__window && location__window.pathname || pathname || ''
|
|
@@ -1 +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'\
|
|
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": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
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.
|
|
30
|
+
"@ctx-core/nanostores": "^0.5.2",
|
|
31
31
|
"@ctx-core/object": "^22.0.13"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
package/src/hostname$_.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
|
-
const
|
|
4
|
-
export const hostname$_:B<hostname$_T> = be_(key, ()=>
|
|
3
|
+
export const hostname$_:B<hostname$_T> = be_('hostname$', ()=>
|
|
5
4
|
atom$(undefined) as hostname$_T
|
|
6
5
|
)
|
|
7
6
|
export type hostname$_T = WritableAtom$<string|undefined>
|
package/src/pathname$_.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
|
-
const
|
|
4
|
-
export const pathname$_:B<pathname$_T> = be_(key, ()=>
|
|
3
|
+
export const pathname$_:B<pathname$_T> = be_('pathname$', ()=>
|
|
5
4
|
atom$(undefined) as pathname$_T
|
|
6
5
|
)
|
|
7
6
|
export type pathname$_T = WritableAtom$<string|undefined>
|
package/src/window_location$_.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { has_dom } from '@ctx-core/dom'
|
|
2
2
|
import { atom$, WritableAtom$ } from '@ctx-core/nanostores'
|
|
3
|
-
import { B, be_
|
|
4
|
-
const
|
|
5
|
-
export const window_location$_:B<window_location$_T> = be_(key, ()=>{
|
|
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>
|
|
@@ -2,8 +2,7 @@ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
|
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
3
|
import { hostname$_ } from './hostname$_.js'
|
|
4
4
|
import { window_location$_ } from './window_location$_.js'
|
|
5
|
-
const
|
|
6
|
-
export const window_location_hostname$_:B<window_location_hostname$_T> = be_(key, ctx=>
|
|
5
|
+
export const window_location_hostname$_:B<window_location_hostname$_T> = be_('window_location_hostname$', ctx=>
|
|
7
6
|
computed$([
|
|
8
7
|
hostname$_(ctx),
|
|
9
8
|
window_location$_(ctx),
|
|
@@ -2,8 +2,7 @@ import { computed$, ReadableAtom$ } from '@ctx-core/nanostores'
|
|
|
2
2
|
import { B, be_ } from '@ctx-core/object'
|
|
3
3
|
import { pathname$_ } from './pathname$_.js'
|
|
4
4
|
import { window_location$_ } from './window_location$_.js'
|
|
5
|
-
const
|
|
6
|
-
export const window_location_pathname$_:B<window_location_pathname$_T> = be_(key, ctx=>
|
|
5
|
+
export const window_location_pathname$_:B<window_location_pathname$_T> = be_('window_location_pathname$', ctx=>
|
|
7
6
|
computed$([
|
|
8
7
|
pathname$_(ctx),
|
|
9
8
|
window_location$_(ctx),
|