@ctx-core/window 11.1.1 → 11.1.2

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 (43) hide show
  1. package/.swcrc +10 -0
  2. package/CHANGELOG.md +11 -0
  3. package/dist/hostname$_b.js +3 -1
  4. package/dist/hostname$_b.js.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/pathname$_b.js +3 -1
  8. package/dist/pathname$_b.js.map +1 -1
  9. package/dist/window_Ctx.js +2 -1
  10. package/dist/window_Ctx.js.map +1 -1
  11. package/dist/window_ctx_I.generated.js +4 -1
  12. package/dist/window_ctx_I.generated.js.map +1 -1
  13. package/dist/window_location$_b.js +5 -5
  14. package/dist/window_location$_b.js.map +1 -1
  15. package/dist/window_location_hostname$_b.js +7 -4
  16. package/dist/window_location_hostname$_b.js.map +1 -1
  17. package/dist/window_location_pathname$_b.js +8 -7
  18. package/dist/window_location_pathname$_b.js.map +1 -1
  19. package/package.json +14 -14
  20. package/dist/hostname$_b.d.ts +0 -7
  21. package/dist/hostname_b.d.ts +0 -9
  22. package/dist/hostname_b.js +0 -6
  23. package/dist/hostname_b.js.map +0 -1
  24. package/dist/index.cjs +0 -1
  25. package/dist/index.d.ts +0 -7
  26. package/dist/pathname$_b.d.ts +0 -8
  27. package/dist/pathname_b.d.ts +0 -9
  28. package/dist/pathname_b.js +0 -6
  29. package/dist/pathname_b.js.map +0 -1
  30. package/dist/window_Ctx.d.ts +0 -3
  31. package/dist/window_ctx_I.generated.d.ts +0 -12
  32. package/dist/window_location$_b.d.ts +0 -10
  33. package/dist/window_location_b.d.ts +0 -11
  34. package/dist/window_location_b.js +0 -26
  35. package/dist/window_location_b.js.map +0 -1
  36. package/dist/window_location_hostname$_b.d.ts +0 -7
  37. package/dist/window_location_hostname_b.d.ts +0 -9
  38. package/dist/window_location_hostname_b.js +0 -10
  39. package/dist/window_location_hostname_b.js.map +0 -1
  40. package/dist/window_location_pathname$_b.d.ts +0 -9
  41. package/dist/window_location_pathname_b.d.ts +0 -9
  42. package/dist/window_location_pathname_b.js +0 -13
  43. package/dist/window_location_pathname_b.js.map +0 -1
package/.swcrc ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "jsc": {
3
+ "target": "es2019",
4
+ "parser": {
5
+ "syntax": "typescript",
6
+ "tsx": true,
7
+ "dynamicImport": true
8
+ }
9
+ }
10
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @ctx-core/window
2
2
 
3
+ ## 11.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - compile using swc
8
+ - Updated dependencies
9
+ - @ctx-core/dom@11.0.30
10
+ - @ctx-core/function@20.2.3
11
+ - @ctx-core/object@21.0.22
12
+ - @ctx-core/store@27.0.36
13
+
3
14
  ## 11.1.1
4
15
 
5
16
  ### Patch Changes
@@ -1,6 +1,8 @@
1
1
  import { be_ } from '@ctx-core/object';
2
2
  import { writable$ } from '@ctx-core/store';
3
3
  const key = 'hostname$';
4
- export const hostname$_b = be_(key, () => writable$(undefined));
4
+ export const hostname$_b = be_(key, ()=>writable$(undefined)
5
+ );
5
6
  export { hostname$_b as b__hostname };
7
+
6
8
  //# sourceMappingURL=hostname$_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hostname$_b.js","sourceRoot":"","sources":["../src/hostname$_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,WAAW,CAAA;AACvB,MAAM,CAAC,MAAM,WAAW,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE,CACjE,SAAS,CAAC,SAAS,CAAgB,CACnC,CAAA;AAED,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,CAAA"}
1
+ {"version":3,"sources":["../src/hostname$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nimport type { window_Ctx } from './window_Ctx'\nconst key = 'hostname$'\nexport const hostname$_b:B<window_Ctx, typeof key> = be_(key, ()=>\n\twritable$(undefined) as hostname$_T\n)\nexport type hostname$_T = Writable$<string|undefined>\nexport { hostname$_b as b__hostname }\n"],"names":["be_","writable$","key","hostname$_b","undefined","b__hostname"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AAEtD,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAA6BH,GAAG,CAACE,GAAG,MAC3DD,SAAS,CAACG,SAAS;;AAGpB,MAAM,GAAGD,WAAW,IAAIE,WAAW"}
package/dist/index.js CHANGED
@@ -5,4 +5,5 @@ export * from './pathname$_b.js';
5
5
  export * from './window_location$_b.js';
6
6
  export * from './window_location_hostname$_b.js';
7
7
  export * from './window_location_pathname$_b.js';
8
+
8
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './window_Ctx.js'\nexport * from './window_ctx_I.generated.js'\nexport * 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,CAAiB;cACjB,CAA6B;cAC7B,CAAkB;cAClB,CAAkB;cAClB,CAAyB;cACzB,CAAkC;cAClC,CAAkC"}
@@ -1,6 +1,8 @@
1
1
  import { be_ } from '@ctx-core/object';
2
2
  import { writable$ } from '@ctx-core/store';
3
3
  const key = 'pathname$';
4
- export const pathname$_b = be_(key, () => writable$(undefined));
4
+ export const pathname$_b = be_(key, ()=>writable$(undefined)
5
+ );
5
6
  export { pathname$_b as b__pathname };
7
+
6
8
  //# sourceMappingURL=pathname$_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pathname$_b.js","sourceRoot":"","sources":["../src/pathname$_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,WAAW,CAAA;AACvB,MAAM,CAAC,MAAM,WAAW,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE,CACjE,SAAS,CAAC,SAAS,CAAgB,CACnC,CAAA;AAED,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,CAAA"}
1
+ {"version":3,"sources":["../src/pathname$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { Writable$, writable$ } from '@ctx-core/store'\nimport type { window_Ctx } from './window_Ctx'\nconst key = 'pathname$'\nexport const pathname$_b:B<window_Ctx, typeof key> = be_(key, ()=>\n\twritable$(undefined) as pathname$_T\n)\nexport interface pathname$_T extends Writable$<string|undefined> {}\nexport { pathname$_b as b__pathname }\n"],"names":["be_","writable$","key","pathname$_b","undefined","b__pathname"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AAEtD,KAAK,CAACC,GAAG,GAAG,CAAW;AACvB,MAAM,CAAC,KAAK,CAACC,WAAW,GAA6BH,GAAG,CAACE,GAAG,MAC3DD,SAAS,CAACG,SAAS;;AAGpB,MAAM,GAAGD,WAAW,IAAIE,WAAW"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ export { };
2
+
2
3
  //# sourceMappingURL=window_Ctx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window_Ctx.js","sourceRoot":"","sources":["../src/window_Ctx.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/window_Ctx.ts"],"sourcesContent":["import type { window_ctx_I } from './window_ctx_I.generated.js'\nexport interface window_Ctx extends window_ctx_I {\n}\n"],"names":[],"mappings":"AAAA,MAAM"}
@@ -1,2 +1,5 @@
1
- export {};
1
+ /*
2
+ * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools
3
+ */ export { };
4
+
2
5
  //# sourceMappingURL=window_ctx_I.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window_ctx_I.generated.js","sourceRoot":"","sources":["../src/window_ctx_I.generated.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/window_ctx_I.generated.ts"],"sourcesContent":["/*\n * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools\n*/\nimport type { hostname$_T } from './hostname$_b.js'\nimport type { pathname$_T } from './pathname$_b.js'\nimport type { window_location$_T } from './window_location$_b.js'\nimport type { window_location_hostname$_T } from './window_location_hostname$_b.js'\nimport type { window_location_pathname$_T } from './window_location_pathname$_b.js'\nexport interface window_ctx_I {\n\thostname$?:hostname$_T\n\tpathname$?:pathname$_T\n\twindow_location$?:window_location$_T\n\twindow_location_hostname$?:window_location_hostname$_T\n\twindow_location_pathname$?:window_location_pathname$_T\n}"],"names":[],"mappings":"AAAA,EAEE,AAFF;;AAEE,AAFF,EAEE,CACF,MAAM"}
@@ -2,7 +2,7 @@ import { be_, assign } from '@ctx-core/object';
2
2
  import { has_dom } from '@ctx-core/dom';
3
3
  import { writable$ } from '@ctx-core/store';
4
4
  const key = 'window_location$';
5
- export const window_location$_b = be_(key, () => {
5
+ export const window_location$_b = be_(key, ()=>{
6
6
  const window_location$ = writable$(undefined);
7
7
  const window_location_reload_popstate_bound$ = writable$(undefined);
8
8
  if (has_dom) {
@@ -10,11 +10,10 @@ export const window_location$_b = be_(key, () => {
10
10
  }
11
11
  return assign(window_location$, {
12
12
  reset_window_location,
13
- reset__location__window: reset_window_location,
13
+ reset__location__window: reset_window_location
14
14
  });
15
15
  function reset_window_location() {
16
- if (!has_dom)
17
- return;
16
+ if (!has_dom) return;
18
17
  if (!window_location_reload_popstate_bound$.$) {
19
18
  window_location_reload_popstate_bound$.set(true);
20
19
  window.addEventListener('popstate', reset_window_location);
@@ -22,5 +21,6 @@ export const window_location$_b = be_(key, () => {
22
21
  window_location$.set(window.location);
23
22
  }
24
23
  });
25
- export { window_location$_b as b__location__window, };
24
+ export { window_location$_b as b__location__window, };
25
+
26
26
  //# sourceMappingURL=window_location$_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window_location$_b.js","sourceRoot":"","sources":["../src/window_location$_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,kBAAkB,CAAA;AAC9B,MAAM,CAAC,MAAM,kBAAkB,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE;IACxE,MAAM,gBAAgB,GAAG,SAAS,CAAqB,SAAS,CAAC,CAAA;IACjE,MAAM,sCAAsC,GAC3C,SAAS,CAAC,SAAS,CAAiC,CAAA;IACrD,IAAI,OAAO,EAAE;QACZ,qBAAqB,EAAE,CAAA;KACvB;IACD,OAAO,MAAM,CAAC,gBAAgB,EAAE;QAC/B,qBAAqB;QACrB,uBAAuB,EAAE,qBAAqB;KAC9C,CAAuB,CAAA;IACxB,SAAS,qBAAqB;QAC7B,IAAI,CAAC,OAAO;YAAE,OAAM;QACpB,IAAI,CAAC,sCAAsC,CAAC,CAAC,EAAE;YAC9C,sCAAsC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAChD,MAAM,CAAC,gBAAgB,CACtB,UAAU,EACV,qBAAqB,CAAC,CAAA;SACvB;QACD,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACtC,CAAC;AACF,CAAC,CAAC,CAAA;AAKF,OAAO,EACN,kBAAkB,IAAI,mBAAmB,GACzC,CAAA"}
1
+ {"version":3,"sources":["../src/window_location$_b.ts"],"sourcesContent":["import { B, be_, assign } from '@ctx-core/object'\nimport { has_dom } from '@ctx-core/dom'\nimport { Writable$, writable$ } from '@ctx-core/store'\nimport type { window_Ctx } from './window_Ctx.js'\nconst key = 'window_location$'\nexport const window_location$_b:B<window_Ctx, typeof key> = be_(key, ()=>{\n\tconst window_location$ = writable$<Location|undefined>(undefined)\n\tconst window_location_reload_popstate_bound$ =\n\t\twritable$(undefined) as Writable$<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 Writable$<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":["be_","assign","has_dom","writable$","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,GAAMA,GAAG,EAAEC,MAAM,QAAQ,CAAkB;AACjD,MAAM,GAAGC,OAAO,QAAQ,CAAe;AACvC,MAAM,GAAcC,SAAS,QAAQ,CAAiB;AAEtD,KAAK,CAACC,GAAG,GAAG,CAAkB;AAC9B,MAAM,CAAC,KAAK,CAACC,kBAAkB,GAA6BL,GAAG,CAACI,GAAG,MAAM,CAAC;IACzE,KAAK,CAACE,gBAAgB,GAAGH,SAAS,CAAqBI,SAAS;IAChE,KAAK,CAACC,sCAAsC,GAC3CL,SAAS,CAACI,SAAS;IACpB,EAAE,EAAEL,OAAO,EAAE,CAAC;QACbO,qBAAqB;IACtB,CAAC;IACD,MAAM,CAACR,MAAM,CAACK,gBAAgB,EAAE,CAAC;QAChCG,qBAAqB;QACrBC,uBAAuB,EAAED,qBAAqB;IAC/C,CAAC;aACQA,qBAAqB,GAAG,CAAC;QACjC,EAAE,GAAGP,OAAO,EAAE,MAAM;QACpB,EAAE,GAAGM,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"}
@@ -3,8 +3,11 @@ import { derived$ } from '@ctx-core/store';
3
3
  import { hostname$_b } from './hostname$_b.js';
4
4
  import { window_location$_b } from './window_location$_b.js';
5
5
  const key = 'window_location_hostname$';
6
- export const window_location_hostname$_b = be_(key, ctx => derived$([
7
- hostname$_b(ctx),
8
- window_location$_b(ctx),
9
- ], ([hostname, window_location]) => (window_location && window_location.hostname) || hostname || ''));
6
+ export const window_location_hostname$_b = be_(key, (ctx)=>derived$([
7
+ hostname$_b(ctx),
8
+ window_location$_b(ctx),
9
+ ], ([hostname, window_location])=>window_location && window_location.hostname || hostname || ''
10
+ )
11
+ );
12
+
10
13
  //# sourceMappingURL=window_location_hostname$_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window_location_hostname$_b.js","sourceRoot":"","sources":["../src/window_location_hostname$_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,GAAG,GAAG,2BAA2B,CAAA;AACvC,MAAM,CAAC,MAAM,2BAA2B,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE,CAClF,QAAQ,CAAC;IACP,WAAW,CAAC,GAAG,CAAC;IAChB,kBAAkB,CAAC,GAAG,CAAC;CACvB,EACD,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAC,EAAE,CAC9B,CAAC,eAAe,IAAK,eAA4B,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,EAAE,CAC/C,CAChC,CAAA"}
1
+ {"version":3,"sources":["../src/window_location_hostname$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { hostname$_b } from './hostname$_b.js'\nimport { window_location$_b } from './window_location$_b.js'\nimport type { window_Ctx } from './window_Ctx.js'\nconst key = 'window_location_hostname$'\nexport const window_location_hostname$_b:B<window_Ctx, typeof key> = be_(key, ctx=>\n\tderived$([\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 = Readable$<string|undefined>\n"],"names":["be_","derived$","hostname$_b","window_location$_b","key","window_location_hostname$_b","ctx","hostname","window_location"],"mappings":"AAAA,MAAM,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,MAAM,GAAGC,kBAAkB,QAAQ,CAAyB;AAE5D,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,2BAA2B,GAA6BL,GAAG,CAACI,GAAG,GAAEE,GAAG,GAChFL,QAAQ,CAAC,CAAC;QACRC,WAAW,CAACI,GAAG;QACfH,kBAAkB,CAACG,GAAG;IACvB,CAAC,IACCC,QAAQ,EAAEC,eAAe,IACzBA,eAAe,IAAKA,eAAe,CAAcD,QAAQ,IAAKA,QAAQ,IAAI,CAAE"}
@@ -3,11 +3,12 @@ import { derived$ } from '@ctx-core/store';
3
3
  import { pathname$_b } from './pathname$_b.js';
4
4
  import { window_location$_b } from './window_location$_b.js';
5
5
  const key = 'window_location_pathname$';
6
- export const window_location_pathname$_b = be_(key, ctx => derived$([
7
- pathname$_b(ctx),
8
- window_location$_b(ctx),
9
- ], ([pathname, location__window]) => (location__window && location__window.pathname)
10
- || pathname
11
- || ''));
12
- export { window_location_pathname$_b as window_location_pathname_b, window_location_pathname$_b as b__pathname__location__window, };
6
+ export const window_location_pathname$_b = be_(key, (ctx)=>derived$([
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
+
13
14
  //# sourceMappingURL=window_location_pathname$_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window_location_pathname$_b.js","sourceRoot":"","sources":["../src/window_location_pathname$_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,GAAG,GAAG,2BAA2B,CAAA;AACvC,MAAM,CAAC,MAAM,2BAA2B,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE,CAClF,QAAQ,CAAC;IACP,WAAW,CAAC,GAAG,CAAC;IAChB,kBAAkB,CAAC,GAAG,CAAC;CACvB,EACD,CAAC,CAAC,QAAQ,EAAE,gBAAgB,CAAwC,EAAC,EAAE,CACtE,CAAC,gBAAgB,IAAK,gBAA6B,CAAC,QAAQ,CAAC;OAC1D,QAAQ;OACR,EAAE,CACyB,CAChC,CAAA;AAGD,OAAO,EACN,2BAA2B,IAAI,0BAA0B,EACzD,2BAA2B,IAAI,6BAA6B,GAC5D,CAAA"}
1
+ {"version":3,"sources":["../src/window_location_pathname$_b.ts"],"sourcesContent":["import { B, be_ } from '@ctx-core/object'\nimport { derived$, Readable$ } from '@ctx-core/store'\nimport { pathname$_b } from './pathname$_b.js'\nimport { window_location$_b } from './window_location$_b.js'\nimport type { window_Ctx } from './window_Ctx'\nconst key = 'window_location_pathname$'\nexport const window_location_pathname$_b:B<window_Ctx, typeof key> = be_(key, ctx=>\n\tderived$([\n\t\t\tpathname$_b(ctx),\n\t\t\twindow_location$_b(ctx),\n\t\t],\n\t\t([pathname, location__window]:[string|undefined, Location|undefined])=>\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 Readable$<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":["be_","derived$","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,GAAMA,GAAG,QAAQ,CAAkB;AACzC,MAAM,GAAGC,QAAQ,QAAmB,CAAiB;AACrD,MAAM,GAAGC,WAAW,QAAQ,CAAkB;AAC9C,MAAM,GAAGC,kBAAkB,QAAQ,CAAyB;AAE5D,KAAK,CAACC,GAAG,GAAG,CAA2B;AACvC,MAAM,CAAC,KAAK,CAACC,2BAA2B,GAA6BL,GAAG,CAACI,GAAG,GAAEE,GAAG,GAChFL,QAAQ,CAAC,CAAC;QACRC,WAAW,CAACI,GAAG;QACfH,kBAAkB,CAACG,GAAG;IACvB,CAAC,IACCC,QAAQ,EAAEC,gBAAgB,IAC1BA,gBAAgB,IAAKA,gBAAgB,CAAcD,QAAQ,IACzDA,QAAQ,IACR,CAAE;;;AAKR,MAAM,GACLF,2BAA2B,IAAII,0BAA0B,EACzDJ,2BAA2B,IAAIK,6BAA6B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/window",
3
- "version": "11.1.1",
3
+ "version": "11.1.2",
4
4
  "description": "ctx-core window",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -17,9 +17,9 @@
17
17
  "license": "Apache-2.0",
18
18
  "author": "Brian Takita",
19
19
  "type": "module",
20
- "main": "./dist/index.cjs",
20
+ "main": "./dist/index.js",
21
21
  "module": "./dist/index.js",
22
- "types": "./dist/index.d.ts",
22
+ "types": "./src/index.ts",
23
23
  "exports": {
24
24
  ".": {
25
25
  "require": "./dist/index.cjs",
@@ -28,15 +28,16 @@
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "dependencies": {
31
- "@ctx-core/dom": "^11.0.29",
32
- "@ctx-core/function": "^20.2.2",
33
- "@ctx-core/object": "^21.0.21",
34
- "@ctx-core/store": "^27.0.35",
35
- "esm": "^3.2.25",
31
+ "@ctx-core/dom": "^11.0.30",
32
+ "@ctx-core/function": "^20.2.3",
33
+ "@ctx-core/object": "^21.0.22",
34
+ "@ctx-core/store": "^27.0.36",
36
35
  "svelte": "3.44.1"
37
36
  },
38
37
  "devDependencies": {
39
- "@ctx-core/dev-tools": "^7.1.4",
38
+ "@ctx-core/dev-tools": "^7.2.0",
39
+ "@swc/cli": "^0.1.51",
40
+ "@swc/core": "^1.2.107",
40
41
  "typescript": "^4.4.4"
41
42
  },
42
43
  "publishConfig": {
@@ -44,11 +45,10 @@
44
45
  "cache": "~/.npm"
45
46
  },
46
47
  "scripts": {
47
- "build": "npm run clean && npm run copy-mjs && npm run generate_ctx_I_file && npm run compile",
48
- "clean": "rm -f tsconfig.tsbuildinfo && rm -f src/**/*.js && rm -f src/**/*.d.ts && rm -f src/**/*.map",
49
- "compile": "./node_modules/.bin/tsc -b .",
50
- "copy-mjs": "cd dist && echo \"module.exports = (async () => import('./index.js'))()\" > index.cjs",
48
+ "build": "npm run generate_ctx_I_file && npm run compile",
49
+ "clean": "rm -rf dist",
50
+ "compile": "swc src --out-dir dist --copy-files --source-maps --config-file .swcrc",
51
51
  "exec": "$@",
52
- "generate_ctx_I_file": "./node_modules/.bin/generate_ctx_I_file"
52
+ "generate_ctx_I_file": "swc $(./node_modules/.bin/generate_ctx_I_file | tail -n1) --out-dir dist --source-maps --config-file .swcrc"
53
53
  }
54
54
  }
@@ -1,7 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "hostname$";
5
- export declare const hostname$_b: B<window_Ctx, typeof key>;
6
- export declare type hostname$_T = Writable$<string | undefined>;
7
- export { hostname$_b as b__hostname };
@@ -1,9 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "hostname";
5
- export declare const hostname_b: B<window_Ctx, typeof key>;
6
- export declare type $hostname_T = string | undefined;
7
- export interface hostname_T extends Writable$<$hostname_T> {
8
- }
9
- export { hostname_b as b__hostname };
@@ -1,6 +0,0 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { writable$ } from '@ctx-core/store';
3
- const key = 'hostname';
4
- export const hostname_b = be_(key, () => writable$(undefined));
5
- export { hostname_b as b__hostname };
6
- //# sourceMappingURL=../src/dist/hostname_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hostname_b.js","sourceRoot":"","sources":["../hostname_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,UAAU,CAAA;AACtB,MAAM,CAAC,MAAM,UAAU,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE,CAChE,SAAS,CAAC,SAAS,CAAe,CAClC,CAAA;AAGD,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,CAAA"}
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- module.exports = (async () => import('./index.js'))()
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export * from './window_Ctx.js';
2
- export * from './window_ctx_I.generated.js';
3
- export * from './hostname$_b.js';
4
- export * from './pathname$_b.js';
5
- export * from './window_location$_b.js';
6
- export * from './window_location_hostname$_b.js';
7
- export * from './window_location_pathname$_b.js';
@@ -1,8 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "pathname$";
5
- export declare const pathname$_b: B<window_Ctx, typeof key>;
6
- export interface pathname$_T extends Writable$<string | undefined> {
7
- }
8
- export { pathname$_b as b__pathname };
@@ -1,9 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "pathname";
5
- export declare const pathname_b: B<window_Ctx, typeof key>;
6
- export declare type $pathname_T = string | undefined;
7
- export interface pathname_T extends Writable$<$pathname_T> {
8
- }
9
- export { pathname_b as b__pathname };
@@ -1,6 +0,0 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { writable$ } from '@ctx-core/store';
3
- const key = 'pathname';
4
- export const pathname_b = be_(key, () => writable$(undefined));
5
- export { pathname_b as b__pathname };
6
- //# sourceMappingURL=../src/dist/pathname_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathname_b.js","sourceRoot":"","sources":["../pathname_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,UAAU,CAAA;AACtB,MAAM,CAAC,MAAM,UAAU,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE,CAChE,SAAS,CAAC,SAAS,CAAe,CAClC,CAAA;AAGD,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,CAAA"}
@@ -1,3 +0,0 @@
1
- import type { window_ctx_I } from './window_ctx_I.generated.js';
2
- export interface window_Ctx extends window_ctx_I {
3
- }
@@ -1,12 +0,0 @@
1
- import type { hostname$_T } from './hostname$_b.js';
2
- import type { pathname$_T } from './pathname$_b.js';
3
- import type { window_location$_T } from './window_location$_b.js';
4
- import type { window_location_hostname$_T } from './window_location_hostname$_b.js';
5
- import type { window_location_pathname$_T } from './window_location_pathname$_b.js';
6
- export interface window_ctx_I {
7
- hostname$?: hostname$_T;
8
- pathname$?: pathname$_T;
9
- window_location$?: window_location$_T;
10
- window_location_hostname$?: window_location_hostname$_T;
11
- window_location_pathname$?: window_location_pathname$_T;
12
- }
@@ -1,10 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx.js';
4
- declare const key = "window_location$";
5
- export declare const window_location$_b: B<window_Ctx, typeof key>;
6
- export interface window_location$_T extends Writable$<Location | undefined> {
7
- reset_window_location: () => void;
8
- reset__location__window: () => void;
9
- }
10
- export { window_location$_b as b__location__window, };
@@ -1,11 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Writable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "window_location";
5
- export declare const window_location_b: B<window_Ctx, typeof key>;
6
- export declare type $window_location_T = Location | undefined;
7
- export interface window_location_T extends Writable$<$window_location_T> {
8
- reset_window_location: () => void;
9
- reset__location__window: () => void;
10
- }
11
- export { window_location_b as b__location__window, };
@@ -1,26 +0,0 @@
1
- import { be_, assign } from '@ctx-core/object';
2
- import { has_dom } from '@ctx-core/dom';
3
- import { writable$ } from '@ctx-core/store';
4
- const key = 'window_location';
5
- export const window_location_b = be_(key, () => {
6
- const window_location = writable$(undefined);
7
- const window_location_reload_popstate_bound = writable$(undefined);
8
- if (has_dom) {
9
- reset_window_location();
10
- }
11
- return assign(window_location, {
12
- reset_window_location,
13
- reset__location__window: reset_window_location,
14
- });
15
- function reset_window_location() {
16
- if (!has_dom)
17
- return;
18
- if (!window_location_reload_popstate_bound.$) {
19
- window_location_reload_popstate_bound.set(true);
20
- window.addEventListener('popstate', reset_window_location);
21
- }
22
- window_location.set(window.location);
23
- }
24
- });
25
- export { window_location_b as b__location__window, };
26
- //# sourceMappingURL=../src/dist/window_location_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window_location_b.js","sourceRoot":"","sources":["../window_location_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAa,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,GAAG,GAAG,iBAAiB,CAAA;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAE,EAAE;IACvE,MAAM,eAAe,GAAG,SAAS,CAAqB,SAAS,CAAC,CAAA;IAChE,MAAM,qCAAqC,GAC1C,SAAS,CAAC,SAAS,CAAiC,CAAA;IACrD,IAAI,OAAO,EAAE;QACZ,qBAAqB,EAAE,CAAA;KACvB;IACD,OAAO,MAAM,CAAC,eAAe,EAAE;QAC9B,qBAAqB;QACrB,uBAAuB,EAAE,qBAAqB;KAC9C,CAAsB,CAAA;IACvB,SAAS,qBAAqB;QAC7B,IAAI,CAAC,OAAO;YAAE,OAAM;QACpB,IAAI,CAAC,qCAAqC,CAAC,CAAC,EAAE;YAC7C,qCAAqC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAC/C,MAAM,CAAC,gBAAgB,CACtB,UAAU,EACV,qBAAqB,CAAC,CAAA;SACvB;QACD,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACrC,CAAC;AACF,CAAC,CAAC,CAAA;AAMF,OAAO,EACN,iBAAiB,IAAI,mBAAmB,GACxC,CAAA"}
@@ -1,7 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx.js';
4
- declare const key = "window_location_hostname$";
5
- export declare const window_location_hostname$_b: B<window_Ctx, typeof key>;
6
- export declare type window_location_hostname$_T = Readable$<string | undefined>;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "window_location_hostname";
5
- export declare const window_location_hostname_b: B<window_Ctx, typeof key>;
6
- export declare type $window_location_hostname_T = string | undefined;
7
- export interface window_location_hostname_T extends Readable$<$window_location_hostname_T> {
8
- }
9
- export {};
@@ -1,10 +0,0 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { derived$ } from '@ctx-core/store';
3
- import { hostname_b } from './hostname_b';
4
- import { window_location_b } from './window_location_b';
5
- const key = 'window_location_hostname';
6
- export const window_location_hostname_b = be_(key, ctx => derived$([
7
- hostname_b(ctx),
8
- window_location_b(ctx),
9
- ], ([hostname, window_location]) => (window_location && window_location.hostname) || hostname || ''));
10
- //# sourceMappingURL=../src/dist/window_location_hostname_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window_location_hostname_b.js","sourceRoot":"","sources":["../window_location_hostname_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,MAAM,GAAG,GAAG,0BAA0B,CAAA;AACtC,MAAM,CAAC,MAAM,0BAA0B,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE,CACjF,QAAQ,CAAC;IACP,UAAU,CAAC,GAAG,CAAC;IACf,iBAAiB,CAAC,GAAG,CAAC;CACtB,EACD,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAC,EAAE,CAC9B,CAAC,eAAe,IAAK,eAA4B,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,EAAE,CAChD,CAC/B,CAAA"}
@@ -1,9 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "window_location_pathname$";
5
- export declare const window_location_pathname$_b: B<window_Ctx, typeof key>;
6
- export declare type window_location_pathname_T = string | undefined;
7
- export interface window_location_pathname$_T extends Readable$<window_location_pathname_T> {
8
- }
9
- export { window_location_pathname$_b as window_location_pathname_b, window_location_pathname$_b as b__pathname__location__window, };
@@ -1,9 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { Readable$ } from '@ctx-core/store';
3
- import type { window_Ctx } from './window_Ctx';
4
- declare const key = "window_location_pathname";
5
- export declare const window_location_pathname_b: B<window_Ctx, typeof key>;
6
- export declare type $window_location_pathname_T = string | undefined;
7
- export interface window_location_pathname_T extends Readable$<$window_location_pathname_T> {
8
- }
9
- export { window_location_pathname_b as b__pathname__location__window, };
@@ -1,13 +0,0 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { derived$ } from '@ctx-core/store';
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 => derived$([
7
- pathname$_b(ctx),
8
- window_location$_b(ctx),
9
- ], ([pathname, location__window]) => (location__window && location__window.pathname)
10
- || pathname
11
- || ''));
12
- export { window_location_pathname_b as b__pathname__location__window, };
13
- //# sourceMappingURL=window_location_pathname_b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window_location_pathname_b.js","sourceRoot":"","sources":["../src/window_location_pathname_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAa,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,GAAG,GAAG,0BAA0B,CAAA;AACtC,MAAM,CAAC,MAAM,0BAA0B,GAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAA,EAAE,CACjF,QAAQ,CAAC;IACP,WAAW,CAAC,GAAG,CAAC;IAChB,kBAAkB,CAAC,GAAG,CAAC;CACvB,EACD,CAAC,CAAC,QAAQ,EAAE,gBAAgB,CAAwC,EAAC,EAAE,CACtE,CAAC,gBAAgB,IAAK,gBAA6B,CAAC,QAAQ,CAAC;OAC1D,QAAQ;OACR,EAAE,CACwB,CAC/B,CAAA;AAGD,OAAO,EACN,0BAA0B,IAAI,6BAA6B,GAC3D,CAAA"}