xote 5.0.0 → 6.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 (34) hide show
  1. package/README.md +17 -9
  2. package/dist/xote.cjs +7 -7
  3. package/dist/xote.mjs +1267 -1189
  4. package/dist/xote.umd.js +10 -10
  5. package/package.json +3 -3
  6. package/rescript.json +18 -3
  7. package/src/Computed.res +1 -0
  8. package/src/Computed.res.mjs +13 -0
  9. package/src/Effect.res +1 -0
  10. package/src/Effect.res.mjs +13 -0
  11. package/src/Html.res +28 -0
  12. package/src/Html.res.mjs +62 -0
  13. package/src/{Xote__Hydration.res → Hydration.res} +43 -41
  14. package/src/{Xote__Hydration.res.mjs → Hydration.res.mjs} +66 -68
  15. package/src/{Xote__Component.res → Node.res} +3 -26
  16. package/src/{Xote__Component.res.mjs → Node.res.mjs} +26 -88
  17. package/src/{Xote__ReactiveProp.res → ReactiveProp.res} +0 -1
  18. package/src/{Xote__ReactiveProp.res.mjs → ReactiveProp.res.mjs} +2 -2
  19. package/src/{Xote__Router.res → Router.res} +38 -32
  20. package/src/{Xote__Router.res.mjs → Router.res.mjs} +28 -28
  21. package/src/{Xote__SSR.res → SSR.res} +16 -18
  22. package/src/{Xote__SSR.res.mjs → SSR.res.mjs} +5 -8
  23. package/src/{Xote__SSRState.res → SSRState.res} +7 -6
  24. package/src/{Xote__SSRState.res.mjs → SSRState.res.mjs} +12 -12
  25. package/src/Signal.res +1 -0
  26. package/src/Signal.res.mjs +31 -0
  27. package/src/{Xote__JSX.res → XoteJSX.res} +22 -23
  28. package/src/{Xote__JSX.res.mjs → XoteJSX.res.mjs} +22 -24
  29. package/src/Xote.res +0 -43
  30. package/src/Xote.res.mjs +0 -117
  31. /package/src/{Xote__Route.res → Route.res} +0 -0
  32. /package/src/{Xote__Route.res.mjs → Route.res.mjs} +0 -0
  33. /package/src/{Xote__SSRContext.res → SSRContext.res} +0 -0
  34. /package/src/{Xote__SSRContext.res.mjs → SSRContext.res.mjs} +0 -0
@@ -1,7 +1,9 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as Signals from "rescript-signals/src/Signals.res.mjs";
3
+ import * as Effect$Xote from "./Effect.res.mjs";
4
+ import * as Signal$Xote from "./Signal.res.mjs";
4
5
  import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
6
+ import * as Computed$Xote from "./Computed.res.mjs";
5
7
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
8
  import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
7
9
 
@@ -115,7 +117,7 @@ function addDisposer(owner, disposer) {
115
117
 
116
118
  function disposeOwner(owner) {
117
119
  owner.disposers.forEach(disposer => disposer.dispose());
118
- owner.computeds.forEach(computed => Signals.Computed.dispose(computed));
120
+ owner.computeds.forEach(Computed$Xote.dispose);
119
121
  }
120
122
 
121
123
  function setOwner(element, owner) {
@@ -203,14 +205,14 @@ function render(node) {
203
205
  return setAttrOrProp(el, key, value._0);
204
206
  case "SignalValue" :
205
207
  let signal = value._0;
206
- setAttrOrProp(el, key, Signals.Signal.peek(signal));
207
- let disposer = Signals.Effect.runWithDisposer(() => {
208
- setAttrOrProp(el, key, Signals.Signal.get(signal));
208
+ setAttrOrProp(el, key, Signal$Xote.peek(signal));
209
+ let disposer = Effect$Xote.runWithDisposer(() => {
210
+ setAttrOrProp(el, key, Signal$Xote.get(signal));
209
211
  }, undefined);
210
212
  return addDisposer(owner, disposer);
211
213
  case "Compute" :
212
214
  let compute = value._0;
213
- let disposer$1 = Signals.Effect.runWithDisposer(() => {
215
+ let disposer$1 = Effect$Xote.runWithDisposer(() => {
214
216
  setAttrOrProp(el, key, compute());
215
217
  }, undefined);
216
218
  return addDisposer(owner, disposer$1);
@@ -229,15 +231,15 @@ function render(node) {
229
231
  return document.createTextNode(node._0);
230
232
  case "SignalText" :
231
233
  let signal = node._0;
232
- let textNode = document.createTextNode(Signals.Signal.peek(signal));
234
+ let textNode = document.createTextNode(Signal$Xote.peek(signal));
233
235
  let owner$1 = {
234
236
  disposers: [],
235
237
  computeds: []
236
238
  };
237
239
  setOwner(textNode, owner$1);
238
240
  runWithOwner(owner$1, () => {
239
- let disposer = Signals.Effect.runWithDisposer(() => {
240
- textNode.textContent = Signals.Signal.get(signal);
241
+ let disposer = Effect$Xote.runWithDisposer(() => {
242
+ textNode.textContent = Signal$Xote.get(signal);
241
243
  }, undefined);
242
244
  addDisposer(owner$1, disposer);
243
245
  });
@@ -259,8 +261,8 @@ function render(node) {
259
261
  container.setAttribute("style", "display: contents");
260
262
  setOwner(container, owner$2);
261
263
  runWithOwner(owner$2, () => {
262
- let disposer = Signals.Effect.runWithDisposer(() => {
263
- let children = Signals.Signal.get(signal$1);
264
+ let disposer = Effect$Xote.runWithDisposer(() => {
265
+ let children = Signal$Xote.get(signal$1);
264
266
  let childNodes = (Array.from(container.childNodes || []));
265
267
  childNodes.forEach(disposeElement);
266
268
  ((container.innerHTML = ''));
@@ -298,7 +300,7 @@ function render(node) {
298
300
  if (parentOpt == null) {
299
301
  return;
300
302
  }
301
- let newItems = Signals.Signal.get(signal$2);
303
+ let newItems = Signal$Xote.get(signal$2);
302
304
  let newKeyMap = {};
303
305
  newItems.forEach(item => {
304
306
  newKeyMap[keyFn(item)] = item;
@@ -384,7 +386,7 @@ function render(node) {
384
386
  };
385
387
  let fragment$1 = document.createDocumentFragment();
386
388
  fragment$1.appendChild(startAnchor);
387
- let initialItems = Signals.Signal.peek(signal$2);
389
+ let initialItems = Signal$Xote.peek(signal$2);
388
390
  initialItems.forEach(item => {
389
391
  let key = keyFn(item);
390
392
  let node = renderItem(item);
@@ -399,7 +401,7 @@ function render(node) {
399
401
  });
400
402
  fragment$1.appendChild(endAnchor);
401
403
  runWithOwner(owner$4, () => {
402
- let disposer = Signals.Effect.runWithDisposer(() => {
404
+ let disposer = Effect$Xote.runWithDisposer(() => {
403
405
  reconcile();
404
406
  }, undefined);
405
407
  addDisposer(owner$4, disposer);
@@ -420,32 +422,24 @@ function text(content) {
420
422
  };
421
423
  }
422
424
 
423
- function textSignal(compute) {
424
- let signal = Signals.Computed.make(compute, undefined);
425
+ function signalText(compute) {
426
+ let signal = Computed$Xote.make(compute, undefined);
425
427
  return {
426
428
  TAG: "SignalText",
427
429
  _0: signal
428
430
  };
429
431
  }
430
432
 
431
- function reactiveString(compute) {
432
- let signal = Signals.Computed.make(compute, undefined);
433
+ function signalInt(compute) {
434
+ let signal = Computed$Xote.make(() => compute().toString(), undefined);
433
435
  return {
434
436
  TAG: "SignalText",
435
437
  _0: signal
436
438
  };
437
439
  }
438
440
 
439
- function reactiveInt(compute) {
440
- let signal = Signals.Computed.make(() => compute().toString(), undefined);
441
- return {
442
- TAG: "SignalText",
443
- _0: signal
444
- };
445
- }
446
-
447
- function reactiveFloat(compute) {
448
- let signal = Signals.Computed.make(() => compute().toString(), undefined);
441
+ function signalFloat(compute) {
442
+ let signal = Computed$Xote.make(() => compute().toString(), undefined);
449
443
  return {
450
444
  TAG: "SignalText",
451
445
  _0: signal
@@ -481,7 +475,7 @@ function signalFragment(signal) {
481
475
  }
482
476
 
483
477
  function list(signal, renderItem) {
484
- let nodesSignal = Signals.Computed.make(() => Signals.Signal.get(signal).map(renderItem), undefined);
478
+ let nodesSignal = Computed$Xote.make(() => Signal$Xote.get(signal).map(renderItem), undefined);
485
479
  return {
486
480
  TAG: "SignalFragment",
487
481
  _0: nodesSignal
@@ -510,50 +504,6 @@ function element(tag, attrsOpt, eventsOpt, childrenOpt, param) {
510
504
  };
511
505
  }
512
506
 
513
- function div(attrs, events, children, param) {
514
- return element("div", attrs, events, children, undefined);
515
- }
516
-
517
- function span(attrs, events, children, param) {
518
- return element("span", attrs, events, children, undefined);
519
- }
520
-
521
- function button(attrs, events, children, param) {
522
- return element("button", attrs, events, children, undefined);
523
- }
524
-
525
- function input(attrs, events, param) {
526
- return element("input", attrs, events, undefined, undefined);
527
- }
528
-
529
- function h1(attrs, events, children, param) {
530
- return element("h1", attrs, events, children, undefined);
531
- }
532
-
533
- function h2(attrs, events, children, param) {
534
- return element("h2", attrs, events, children, undefined);
535
- }
536
-
537
- function h3(attrs, events, children, param) {
538
- return element("h3", attrs, events, children, undefined);
539
- }
540
-
541
- function p(attrs, events, children, param) {
542
- return element("p", attrs, events, children, undefined);
543
- }
544
-
545
- function ul(attrs, events, children, param) {
546
- return element("ul", attrs, events, children, undefined);
547
- }
548
-
549
- function li(attrs, events, children, param) {
550
- return element("li", attrs, events, children, undefined);
551
- }
552
-
553
- function a(attrs, events, children, param) {
554
- return element("a", attrs, events, children, undefined);
555
- }
556
-
557
507
  function $$null() {
558
508
  return {
559
509
  TAG: "Text",
@@ -597,10 +547,9 @@ export {
597
547
  computedAttr,
598
548
  Render,
599
549
  text,
600
- textSignal,
601
- reactiveString,
602
- reactiveInt,
603
- reactiveFloat,
550
+ signalText,
551
+ signalInt,
552
+ signalFloat,
604
553
  int,
605
554
  float,
606
555
  fragment,
@@ -608,17 +557,6 @@ export {
608
557
  list,
609
558
  keyedList,
610
559
  element,
611
- div,
612
- span,
613
- button,
614
- input,
615
- h1,
616
- h2,
617
- h3,
618
- p,
619
- ul,
620
- li,
621
- a,
622
560
  $$null,
623
561
  mount,
624
562
  mountById,
@@ -1,4 +1,3 @@
1
- open Signals
2
1
 
3
2
  /* Defines a property that can either be a signal (Reactive) or a static value
4
3
  (Static) */
@@ -1,10 +1,10 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as Signals from "rescript-signals/src/Signals.res.mjs";
3
+ import * as Signal$Xote from "./Signal.res.mjs";
4
4
 
5
5
  function get(value) {
6
6
  if (value.TAG === "Reactive") {
7
- return Signals.Signal.get(value._0);
7
+ return Signal$Xote.get(value._0);
8
8
  } else {
9
9
  return value._0;
10
10
  }
@@ -1,6 +1,4 @@
1
- open Signals
2
- module Component = Xote__Component
3
- module Route = Xote__Route
1
+ module Route = Route
4
2
 
5
3
  // Browser location type
6
4
  type location = {
@@ -57,7 +55,8 @@ let getGlobalState = (): globalRouterState => {
57
55
  }
58
56
 
59
57
  // Store in globalThis using the same symbol
60
- %raw(`globalThis[Symbol.for("xote.router.state")] = state`)
58
+ ignore(state)
59
+ let _: unit = %raw(`globalThis[Symbol.for("xote.router.state")] = state`)
61
60
  state
62
61
  }
63
62
  }
@@ -72,7 +71,8 @@ let basePath = (): ref<string> => getGlobalState().basePath
72
71
  let warnIfNotInitialized = (methodName: string): unit => {
73
72
  let state = getGlobalState()
74
73
  if !state.initialized {
75
- %raw(`console.warn(
74
+ ignore(methodName)
75
+ let _: unit = %raw(`console.warn(
76
76
  '[Xote Router] ' + methodName + ' called before Router.init(). ' +
77
77
  'Make sure to call Router.init() at your app entry point. ' +
78
78
  'This may cause incorrect routing behavior.'
@@ -147,11 +147,15 @@ let getScrollPosition = (): (float, float) => {
147
147
  }
148
148
 
149
149
  let scrollTo = (x: float, y: float): unit => {
150
- %raw(`window.scrollTo(x, y)`)
150
+ ignore(x)
151
+ ignore(y)
152
+ let _: unit = %raw(`window.scrollTo(x, y)`)
151
153
  }
152
154
 
153
155
  // Create history state with scroll position
154
156
  let makeHistoryState = (scrollX: float, scrollY: float): historyState => {
157
+ ignore(scrollX)
158
+ ignore(scrollY)
155
159
  %raw(`({ scrollX: scrollX, scrollY: scrollY })`)
156
160
  }
157
161
 
@@ -161,6 +165,7 @@ let emptyHistoryState = (): historyState => {
161
165
 
162
166
  // Extract scroll position from history state
163
167
  let getScrollFromState = (state: historyState): option<(float, float)> => {
168
+ ignore(state)
164
169
  let scrollX: Nullable.t<float> = %raw(`state && state.scrollX`)
165
170
  let scrollY: Nullable.t<float> = %raw(`state && state.scrollY`)
166
171
  switch (Nullable.toOption(scrollX), Nullable.toOption(scrollY)) {
@@ -298,11 +303,11 @@ let replace = (pathname: string, ~search: string="", ~hash: string="", ()): unit
298
303
  // Route definition for routes() component
299
304
  type routeConfig = {
300
305
  pattern: string,
301
- render: Route.params => Component.node,
306
+ render: Route.params => Node.node,
302
307
  }
303
308
 
304
309
  // Single route component - renders if pattern matches
305
- let route = (pattern: string, render: Route.params => Component.node): Component.node => {
310
+ let route = (pattern: string, render: Route.params => Node.node): Node.node => {
306
311
  warnIfNotInitialized("Router.route()")
307
312
 
308
313
  let signal = Computed.make(() => {
@@ -312,11 +317,11 @@ let route = (pattern: string, render: Route.params => Component.node): Component
312
317
  | NoMatch => []
313
318
  }
314
319
  })
315
- Component.signalFragment(signal)
320
+ Node.signalFragment(signal)
316
321
  }
317
322
 
318
323
  // Routes component - renders first matching route
319
- let routes = (configs: array<routeConfig>): Component.node => {
324
+ let routes = (configs: array<routeConfig>): Node.node => {
320
325
  warnIfNotInitialized("Router.routes()")
321
326
 
322
327
  let signal = Computed.make(() => {
@@ -333,25 +338,25 @@ let routes = (configs: array<routeConfig>): Component.node => {
333
338
  | None => [] // No matching route - render nothing
334
339
  }
335
340
  })
336
- Component.signalFragment(signal)
341
+ Node.signalFragment(signal)
337
342
  }
338
343
 
339
344
  // Link component - handles navigation without page reload
340
345
  let link = (
341
346
  ~to: string,
342
- ~attrs: array<(string, Component.attrValue)>=[],
343
- ~children: array<Component.node>=[],
347
+ ~attrs: array<(string, Node.attrValue)>=[],
348
+ ~children: array<Node.node>=[],
344
349
  (),
345
- ): Component.node => {
350
+ ): Node.node => {
346
351
  warnIfNotInitialized("Router.link()")
347
352
 
348
353
  let handleClick = (_evt: Dom.event) => {
349
- %raw(`_evt.preventDefault()`)
354
+ let _: unit = %raw(`_evt.preventDefault()`)
350
355
  push(to, ())
351
356
  }
352
357
 
353
- Component.a(
354
- ~attrs=Array.concat(attrs, [Component.attr("href", addBasePath(to))]),
358
+ Html.a(
359
+ ~attrs=Array.concat(attrs, [Node.attr("href", addBasePath(to))]),
355
360
  ~events=[("click", handleClick)],
356
361
  ~children,
357
362
  (),
@@ -360,7 +365,7 @@ let link = (
360
365
 
361
366
  // JSX Link component
362
367
  module Link = {
363
- module ReactiveProp = Xote__ReactiveProp
368
+ module ReactiveProp = ReactiveProp
364
369
 
365
370
  type props<'class, 'id, 'style, 'target, 'ariaLabel> = {
366
371
  /* Required navigation prop */
@@ -374,36 +379,37 @@ module Link = {
374
379
  /* Event handlers */
375
380
  onClick?: Dom.event => unit,
376
381
  /* Children */
377
- children?: Component.node,
382
+ children?: Node.node,
378
383
  }
379
384
 
380
385
  /* Helper to detect if a value is a ReactiveProp variant */
381
386
  let isReactiveProp = (value: 'a): bool => {
387
+ ignore(value)
382
388
  %raw(`value && typeof value === 'object' && ('TAG' in value) && (value.TAG === 'Static' || value.TAG === 'Reactive')`)
383
389
  }
384
390
 
385
391
  /* Helper to convert string attribute value */
386
- let convertAttrValue = (key: string, value: 'a): (string, Component.attrValue) => {
392
+ let convertAttrValue = (key: string, value: 'a): (string, Node.attrValue) => {
387
393
  if isReactiveProp(value) {
388
394
  let rp: ReactiveProp.t<string> = Obj.magic(value)
389
395
  switch rp {
390
- | Static(s) => Component.attr(key, s)
391
- | Reactive(signal) => Component.signalAttr(key, signal)
396
+ | Static(s) => Node.attr(key, s)
397
+ | Reactive(signal) => Node.signalAttr(key, signal)
392
398
  }
393
399
  } else if typeof(value) == #function {
394
400
  let f: unit => string = Obj.magic(value)
395
- Component.computedAttr(key, f)
401
+ Node.computedAttr(key, f)
396
402
  } else if typeof(value) == #object {
397
403
  let sig: Signal.t<string> = Obj.magic(value)
398
- Component.signalAttr(key, sig)
404
+ Node.signalAttr(key, sig)
399
405
  } else {
400
406
  let s: string = Obj.magic(value)
401
- Component.attr(key, s)
407
+ Node.attr(key, s)
402
408
  }
403
409
  }
404
410
 
405
411
  /* Convert props to attrs array */
406
- let propsToAttrs = (props: props<_, _, _, _, _>): array<(string, Component.attrValue)> => {
412
+ let propsToAttrs = (props: props<_, _, _, _, _>): array<(string, Node.attrValue)> => {
407
413
  let attrs = []
408
414
 
409
415
  switch props.class {
@@ -435,20 +441,20 @@ module Link = {
435
441
  }
436
442
 
437
443
  /* Extract children from props */
438
- let getChildren = (props: props<_, _, _, _, _>): array<Component.node> => {
444
+ let getChildren = (props: props<_, _, _, _, _>): array<Node.node> => {
439
445
  switch props.children {
440
- | Some(Component.Fragment(children)) => children
446
+ | Some(Node.Fragment(children)) => children
441
447
  | Some(child) => [child]
442
448
  | None => []
443
449
  }
444
450
  }
445
451
 
446
452
  /* JSX component function */
447
- let make = (props: props<_, _, _, _, _>): Component.node => {
453
+ let make = (props: props<_, _, _, _, _>): Node.node => {
448
454
  warnIfNotInitialized("Router.Link")
449
455
 
450
456
  let handleClick = (evt: Dom.event) => {
451
- %raw(`evt.preventDefault()`)
457
+ let _: unit = %raw(`evt.preventDefault()`)
452
458
  push(props.to, ())
453
459
 
454
460
  // Call user's onClick if provided
@@ -458,8 +464,8 @@ module Link = {
458
464
  }
459
465
  }
460
466
 
461
- Component.a(
462
- ~attrs=Array.concat(propsToAttrs(props), [Component.attr("href", addBasePath(props.to))]),
467
+ Html.a(
468
+ ~attrs=Array.concat(propsToAttrs(props), [Node.attr("href", addBasePath(props.to))]),
463
469
  ~events=[("click", handleClick)],
464
470
  ~children=getChildren(props),
465
471
  (),
@@ -1,9 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as Signals from "rescript-signals/src/Signals.res.mjs";
4
- import * as Xote__Route from "./Xote__Route.res.mjs";
3
+ import * as Html$Xote from "./Html.res.mjs";
4
+ import * as Node$Xote from "./Node.res.mjs";
5
+ import * as Route$Xote from "./Route.res.mjs";
6
+ import * as Signal$Xote from "./Signal.res.mjs";
5
7
  import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
- import * as Xote__Component from "./Xote__Component.res.mjs";
8
+ import * as Computed$Xote from "./Computed.res.mjs";
7
9
  import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
8
10
 
9
11
  function getSymbolKey() {
@@ -16,7 +18,7 @@ function getGlobalState() {
16
18
  return existingState;
17
19
  }
18
20
  let state = {
19
- location: Signals.Signal.make({
21
+ location: Signal$Xote.make({
20
22
  pathname: "/",
21
23
  search: "",
22
24
  hash: ""
@@ -42,11 +44,12 @@ function basePath() {
42
44
  function warnIfNotInitialized(methodName) {
43
45
  let state = getGlobalState();
44
46
  if (!state.initialized) {
45
- return (console.warn(
47
+ ((console.warn(
46
48
  '[Xote Router] ' + methodName + ' called before Router.init(). ' +
47
49
  'Make sure to call Router.init() at your app entry point. ' +
48
50
  'This may cause incorrect routing behavior.'
49
- ));
51
+ )));
52
+ return;
50
53
  }
51
54
  }
52
55
 
@@ -139,12 +142,12 @@ function init(basePathArgOpt, param) {
139
142
  let state = getGlobalState();
140
143
  let normalizedBasePath = normalizeBasePath(basePathArg);
141
144
  state.basePath.contents = normalizedBasePath;
142
- Signals.Signal.set(state.location, getCurrentLocation());
145
+ Signal$Xote.set(state.location, getCurrentLocation());
143
146
  if (state.initialized) {
144
147
  return;
145
148
  }
146
149
  let handlePopState = _evt => {
147
- Signals.Signal.set(getGlobalState().location, getCurrentLocation());
150
+ Signal$Xote.set(getGlobalState().location, getCurrentLocation());
148
151
  let hState = window["history.state"];
149
152
  if (hState == null) {
150
153
  return;
@@ -167,7 +170,7 @@ function initSSR(basePathArgOpt, pathnameOpt, searchOpt, hashOpt, param) {
167
170
  let state = getGlobalState();
168
171
  let normalizedBasePath = normalizeBasePath(basePathArg);
169
172
  state.basePath.contents = normalizedBasePath;
170
- Signals.Signal.set(state.location, {
173
+ Signal$Xote.set(state.location, {
171
174
  pathname: pathname,
172
175
  search: search,
173
176
  hash: hash
@@ -188,7 +191,7 @@ function push(pathname, searchOpt, hashOpt, param) {
188
191
  let browserPathname = addBasePath(pathname);
189
192
  let url = browserPathname + search + hash;
190
193
  window.history.pushState(emptyHistoryState(), "", url);
191
- Signals.Signal.set(getGlobalState().location, newLocation);
194
+ Signal$Xote.set(getGlobalState().location, newLocation);
192
195
  scrollTo(0.0, 0.0);
193
196
  }
194
197
 
@@ -204,15 +207,15 @@ function replace(pathname, searchOpt, hashOpt, param) {
204
207
  let browserPathname = addBasePath(pathname);
205
208
  let url = browserPathname + search + hash;
206
209
  window.history.replaceState(emptyHistoryState(), "", url);
207
- Signals.Signal.set(getGlobalState().location, newLocation);
210
+ Signal$Xote.set(getGlobalState().location, newLocation);
208
211
  scrollTo(0.0, 0.0);
209
212
  }
210
213
 
211
214
  function route(pattern, render) {
212
215
  warnIfNotInitialized("Router.route()");
213
- return Xote__Component.signalFragment(Signals.Computed.make(() => {
214
- let loc = Signals.Signal.get(getGlobalState().location);
215
- let params = Xote__Route.match(pattern, loc.pathname);
216
+ return Node$Xote.signalFragment(Computed$Xote.make(() => {
217
+ let loc = Signal$Xote.get(getGlobalState().location);
218
+ let params = Route$Xote.match(pattern, loc.pathname);
216
219
  if (typeof params !== "object") {
217
220
  return [];
218
221
  } else {
@@ -223,10 +226,10 @@ function route(pattern, render) {
223
226
 
224
227
  function routes(configs) {
225
228
  warnIfNotInitialized("Router.routes()");
226
- return Xote__Component.signalFragment(Signals.Computed.make(() => {
227
- let loc = Signals.Signal.get(getGlobalState().location);
229
+ return Node$Xote.signalFragment(Computed$Xote.make(() => {
230
+ let loc = Signal$Xote.get(getGlobalState().location);
228
231
  let matched = Stdlib_Array.findMap(configs, config => {
229
- let params = Xote__Route.match(config.pattern, loc.pathname);
232
+ let params = Route$Xote.match(config.pattern, loc.pathname);
230
233
  if (typeof params !== "object") {
231
234
  return;
232
235
  } else {
@@ -249,7 +252,7 @@ function link(to, attrsOpt, childrenOpt, param) {
249
252
  ((_evt.preventDefault()));
250
253
  push(to, undefined, undefined, undefined);
251
254
  };
252
- return Xote__Component.a(attrs.concat([Xote__Component.attr("href", addBasePath(to))]), [[
255
+ return Html$Xote.a(attrs.concat([Node$Xote.attr("href", addBasePath(to))]), [[
253
256
  "click",
254
257
  handleClick
255
258
  ]], children, undefined);
@@ -262,16 +265,16 @@ function isReactiveProp(value) {
262
265
  function convertAttrValue(key, value) {
263
266
  if (isReactiveProp(value)) {
264
267
  if (value.TAG === "Reactive") {
265
- return Xote__Component.signalAttr(key, value._0);
268
+ return Node$Xote.signalAttr(key, value._0);
266
269
  } else {
267
- return Xote__Component.attr(key, value._0);
270
+ return Node$Xote.attr(key, value._0);
268
271
  }
269
272
  } else if (typeof value === "function") {
270
- return Xote__Component.computedAttr(key, value);
273
+ return Node$Xote.computedAttr(key, value);
271
274
  } else if (typeof value === "object") {
272
- return Xote__Component.signalAttr(key, value);
275
+ return Node$Xote.signalAttr(key, value);
273
276
  } else {
274
- return Xote__Component.attr(key, value);
277
+ return Node$Xote.attr(key, value);
275
278
  }
276
279
  }
277
280
 
@@ -323,7 +326,7 @@ function make(props) {
323
326
  return handler(evt);
324
327
  }
325
328
  };
326
- return Xote__Component.a(propsToAttrs(props).concat([Xote__Component.attr("href", addBasePath(props.to))]), [[
329
+ return Html$Xote.a(propsToAttrs(props).concat([Node$Xote.attr("href", addBasePath(props.to))]), [[
327
330
  "click",
328
331
  handleClick
329
332
  ]], getChildren(props), undefined);
@@ -346,12 +349,9 @@ let Link = {
346
349
  jsxsKeyed: jsxKeyed
347
350
  };
348
351
 
349
- let Component;
350
-
351
352
  let Route;
352
353
 
353
354
  export {
354
- Component,
355
355
  Route,
356
356
  getSymbolKey,
357
357
  getGlobalState,
@@ -377,4 +377,4 @@ export {
377
377
  link,
378
378
  Link,
379
379
  }
380
- /* Xote__Component Not a pure module */
380
+ /* Html-Xote Not a pure module */