jaxs 0.7.1 → 0.7.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.
package/dist/jaxs.d.ts CHANGED
@@ -1,726 +1,1029 @@
1
- declare module "state/is" {
2
- export const isBoolean: (value: any) => value is boolean;
3
- export const isNumber: (value: any) => value is number;
4
- export const isString: (value: any) => value is string;
5
- export const isArray: (value: any) => value is any[];
6
- export const isObject: (value: any) => boolean;
7
- }
8
- declare module "state/equality" {
9
- type Object = Record<string, any>;
10
- export const areElementsEqual: (oldValue: any, newValue: any) => boolean;
11
- export const areObjectsEqual: (oldValue: Object, newValue: Object) => any;
12
- export const areArraysEqual: (oldValue: any[], newValue: any[]) => any;
13
- export const areEqual: (oldValue: any, newValue: any) => any;
14
- }
15
- declare module "state/store" {
16
- import type { State, StoreInitializationOptions, StoreUpdaterOrValue, StoreUpdater } from "types";
17
- export class Store<T> {
18
- parent: State;
19
- name: string;
20
- updater: StoreUpdater<T>;
21
- _value: T;
22
- initialValue: T;
23
- constructor(options: StoreInitializationOptions<T>);
24
- get ['value'](): T;
25
- set ['value'](value: T);
26
- reset(): void;
27
- update(updater: StoreUpdaterOrValue<T>): void;
28
- private updateValue;
29
- private getUpdatedValue;
30
- }
31
- }
32
- declare module "state/store-updater" {
33
- import type { Store, StoreUpdaterOrValue } from "types";
34
- export class StoreUpdaterBase<T> {
35
- store: Store<T>;
36
- constructor(store: Store<T>);
37
- update(updater: StoreUpdaterOrValue<T>): void;
38
- reset(): void;
39
- get value(): T;
40
- }
41
- }
42
- declare module "state/updaters/object" {
43
- import { Store } from "types";
44
- import { StoreUpdaterBase } from "state/store-updater";
45
- export class StoreUpdaterObject<T extends object> extends StoreUpdaterBase<T> {
46
- updateAttribute(name: keyof T, value: T[keyof T]): void;
47
- updateDynamicAttribute(name: string, value: any): void;
48
- isKey(key: string): boolean;
49
- isValueType(key: keyof T, value: any): boolean;
50
- resetAttribute(name: keyof T): void;
51
- }
52
- export const objectUpdater: <T extends Object>(store: Store<T>) => StoreUpdaterObject<T>;
53
- }
54
- declare module "state/updaters/list" {
55
- import { StoreListSorterFunction, Store } from "types";
56
- import { StoreUpdaterBase } from "state/store-updater";
57
- export class StoreUpdaterList<T> extends StoreUpdaterBase<T[]> {
58
- push(element: T): void;
59
- pop(): T;
60
- unshift(element: T): void;
61
- shift(): T;
62
- addSorter(name: string, sorter: StoreListSorterFunction<T>): void;
63
- sortBy(sorter: StoreListSorterFunction<T>): void;
64
- insertAt(index: number, item: T): void;
65
- remove(value: T): void;
66
- removeBy(matcherFunction: (value: T) => boolean): void;
67
- }
68
- export const listUpdater: <T>(store: Store<T[]>) => StoreUpdaterList<T>;
69
- }
70
- declare module "state/updaters/boolean" {
71
- import { Store } from "types";
72
- import { StoreUpdaterBase } from "state/store-updater";
73
- export class StoreUpdaterBoolean extends StoreUpdaterBase<boolean> {
74
- toggle(): void;
75
- setTrue(): void;
76
- setFalse(): void;
77
- }
78
- export const booleanUpdater: (store: Store<boolean>) => StoreUpdaterBoolean;
79
- }
80
- declare module "state/updaters" {
81
- export const updaters: {
82
- object: <T extends Object>(store: import("state").Store<T>) => import("state/updaters/object").StoreUpdaterObject<T>;
83
- list: <T>(store: import("state").Store<T[]>) => import("state/updaters/list").StoreUpdaterList<T>;
84
- boolean: (store: import("state").Store<boolean>) => import("state/updaters/boolean").StoreUpdaterBoolean;
85
- };
86
- }
87
- declare module "state/index" {
88
- import { Store } from "state/store";
89
- import type { StatePublisher, StateTransactionUpdater, StoresCollection } from "types";
90
- import { updaters } from "state/updaters";
91
- export const eventName = "state";
92
- export class State {
93
- publisher: StatePublisher;
94
- stores: StoresCollection;
95
- eventNamePrefix: string;
96
- notifications: Set<string>;
97
- inTransaction: boolean;
98
- constructor(publisher: StatePublisher);
99
- create<T>(name: string, initialState: T): Store<T>;
100
- store<T>(name: string): Store<T>;
101
- get<T>(name: string): T;
102
- getAll(names: string[]): {};
103
- notify(name: string): void;
104
- update(name: string, newValue: any): void;
105
- transaction(updater: StateTransactionUpdater): void;
106
- publishAll(): void;
107
- publish(name: string): void;
108
- event(name: string): string;
109
- }
110
- export const createState: (publisher: StatePublisher) => State;
111
- export { Store, updaters };
112
- }
113
- declare module "bus/exact-subscriptions" {
114
- import { ExactSubscriptionData, BusListener, Unsubscribe } from "types";
115
- export class ExactSubscriptions {
116
- lookup: Record<string, ExactSubscriptionData<any>[]>;
117
- constructor();
118
- add<T>(matcher: string, listener: BusListener<T>, index: number): Unsubscribe;
119
- remove<T>(subscription: ExactSubscriptionData<T>): void;
120
- matches(event: string): ExactSubscriptionData<any>[];
121
- ensureArrayFor(matcher: string): void;
122
- }
123
- }
124
- declare module "bus/fuzzy-subscriptions" {
125
- import { FuzzySubscriptionData, BusListener, Unsubscribe } from "types";
126
- export class FuzzySubscriptions {
127
- lookup: FuzzySubscriptionData<any>[];
128
- constructor();
129
- add<T>(matcher: RegExp, listener: BusListener<T>, index: number): Unsubscribe;
130
- remove<T>(subscription: FuzzySubscriptionData<T>): void;
131
- matches(event: string): FuzzySubscriptionData<any>[];
132
- }
133
- }
134
- declare module "bus/custom-periodic-publisher" {
135
- import { PeriodicPublisher, PublishFunction, PeriodicTimerFunction, CustomPeriodicPublisherOptions } from "types";
136
- export class CustomPeriodicPublisher implements PeriodicPublisher {
137
- publish: PublishFunction;
138
- event: string;
139
- payload: any;
140
- stopped: boolean;
141
- timer: PeriodicTimerFunction;
142
- timeoutId: any;
143
- stop: () => void;
144
- callCount: number;
145
- startedAt: number;
146
- constructor({ publish, event, payload, timer, }: CustomPeriodicPublisherOptions);
147
- start(): void;
148
- setNewTimeout: () => void;
149
- calculateNextTime: () => number;
150
- diff(): number;
151
- stopTimeout(): void;
152
- publishEvent(): void;
153
- }
154
- }
155
- declare module "bus/publish-periodically" {
156
- import type { PublishPeriodicallyOptions } from "types";
157
- export const publishPeriodically: (options: PublishPeriodicallyOptions) => () => void;
158
- }
159
- declare module "bus/index" {
160
- import { BusEventMatcher, BusListener, Unsubscribe, AppAdditionListenerOptions, ListenerKit } from "types";
161
- import { ExactSubscriptions } from "bus/exact-subscriptions";
162
- import { FuzzySubscriptions } from "bus/fuzzy-subscriptions";
163
- import { publishPeriodically } from "bus/publish-periodically";
164
- class JaxsBus {
165
- options?: AppAdditionListenerOptions;
166
- exactSubscriptions: ExactSubscriptions;
167
- fuzzySubscriptions: FuzzySubscriptions;
168
- currentIndex: number;
169
- constructor();
170
- subscribe<T>(matcher: BusEventMatcher, listener: BusListener<T>): Unsubscribe;
171
- publish<T>(event: string, payload: T): void;
172
- addListenerOptions(options: AppAdditionListenerOptions): void;
173
- listenerOptions(event: string): ListenerKit;
174
- }
175
- const createBus: () => {
176
- bus: JaxsBus;
177
- publish: (event: string, payload: any) => void;
178
- subscribe: (matcher: BusEventMatcher, listener: BusListener<any>) => Unsubscribe;
179
- };
180
- export { createBus, JaxsBus, ExactSubscriptions, FuzzySubscriptions, publishPeriodically, };
181
- }
182
- declare module "rendering/templates/root" {
183
- import type { JaxsElement, JaxsNodes, RenderKit, Renderable, JaxsNode } from "types";
184
- export class Root {
185
- template: Renderable;
186
- selector: string;
187
- renderKit: RenderKit;
188
- dom: JaxsNodes;
189
- parentElement?: JaxsElement | null;
190
- constructor(template: Renderable, selector: string, renderKit: RenderKit);
191
- renderAndAttach(renderKit: RenderKit): void;
192
- render(renderKit: RenderKit): JaxsNode[];
193
- attach(): void;
194
- getParentElement(): Element;
195
- }
196
- export const render: (template: Renderable, selector: string, renderKit: RenderKit) => Root;
197
- }
198
- declare module "navigation/events" {
199
- export const linkNavigationEvent = "go-to-href";
200
- export const navigationEvent = "go-to";
201
- export const locationChangeEvent = "navigation:location-change";
202
- export const routeChangeEvent = "navigation:route-change";
203
- }
204
- declare module "navigation/route-state" {
205
- import { State } from "state/index";
206
- export const createRouteState: (state: State) => void;
207
- }
208
- declare module "navigation/find-href" {
209
- export const findHref: (node: HTMLElement) => string;
210
- }
211
- declare module "navigation/navigate" {
212
- import { ListenerKit } from "types";
213
- export const navigate: (path: string, { publish, window }: ListenerKit) => void;
214
- }
215
- declare module "navigation/on-link-click" {
216
- import { ListenerKit } from "types";
217
- export const onLinkClick: (domEvent: MouseEvent, options: ListenerKit) => void;
218
- }
219
- declare module "navigation/extract-query-params" {
220
- export const extractQueryParams: (queryString: string) => {};
221
- }
222
- declare module "navigation/on-location-change" {
223
- import { ListenerKit } from "types";
224
- export const onLocationChange: (_: null, listenerOptions: ListenerKit) => void;
225
- }
226
- declare module "navigation/start" {
227
- import type { App } from "app/index";
228
- export const subscribeToNavigation: (app: App) => void;
229
- export const subscribeToHistoryChange: (app: App) => void;
230
- export const publishLocation: (app: App) => void;
231
- export const startNavigation: (app: App) => void;
232
- }
233
- declare module "app/index" {
234
- import type { Renderable, RenderKit, Subscribe, PublishFunction } from "types";
235
- import type { State } from "state/index";
236
- import type { JaxsBus } from "bus/index";
237
- import { Root } from "rendering/templates/root";
238
- export class App {
239
- window: Window;
240
- document: Document;
241
- publish: PublishFunction;
242
- subscribe: Subscribe;
243
- bus: JaxsBus;
244
- state: State;
245
- renderKit: RenderKit;
246
- roots: Root[];
247
- constructor({ window, document, publish, subscribe, bus, state, renderKit }: {
248
- window: any;
249
- document: any;
250
- publish: any;
251
- subscribe: any;
252
- bus: any;
253
- state: any;
254
- renderKit: any;
255
- });
256
- render(template: Renderable, selector: string): Root;
257
- startNavigation(): void;
258
- }
259
- }
260
- declare module "types" {
261
- import type { State } from "state/index";
262
- import type { Store } from "state/store";
263
- import type { StoreUpdaterBase } from "state/store-updater";
264
- import type { StoreUpdaterBoolean } from "state/updaters/boolean";
265
- import type { StoreUpdaterList } from "state/updaters/list";
266
- import type { StoreUpdaterObject } from "state/updaters/object";
267
- export type { App } from "app/index";
268
- export { State, Store, StoreUpdaterBase, StoreUpdaterBoolean, StoreUpdaterList, StoreUpdaterObject, };
269
- export type StoreUpdater<T> = StoreUpdaterBase<T> | StoreUpdaterObject<T extends object ? T : never> | StoreUpdaterBoolean | StoreUpdaterList<T>;
270
- export type TextValue = string | number;
271
- export interface JsxIded {
272
- __jsx?: string;
273
- }
274
- export type JsxChangeId = {
275
- element: JaxsNode;
276
- index: number;
277
- };
278
- export type EventMap = {
279
- domEvent: string;
280
- busEvent: string;
281
- listener: EventListener;
282
- };
283
- export type EventMaps = Record<string, EventMap>;
284
- interface JsxEventMapped {
285
- eventMaps: EventMaps;
286
- }
287
- export type JaxsElement = Element & JsxIded & JsxEventMapped;
288
- export type JaxsText = Text & JsxIded;
289
- export type JaxsSvgElement = SVGElement & JsxIded;
290
- export type JaxsNode = JaxsElement | JaxsText | JaxsSvgElement;
291
- export type JaxsNodes = JaxsNode[] | NodeListOf<JaxsNode>;
292
- export type JaxsInput = HTMLInputElement & JsxIded & JsxEventMapped;
293
- type NullValues = null | undefined;
294
- export type ReactSourceObject = {
295
- fileName: string;
296
- lineNumber: string;
297
- columnNumber: string;
298
- };
299
- interface SourceMap {
300
- __source?: ReactSourceObject;
301
- }
302
- export type Props<T> = Partial<{
303
- __source: ReactSourceObject;
304
- children: JsxCollection;
305
- }> & T;
306
- export type PropValue = TextValue | NullValues | boolean | ReactSourceObject | JsxCollection;
307
- export type TagAttributes = SourceMap & Record<string, string>;
308
- export type TagEventAttributes = Record<string, string>;
309
- export type TagAttributesAndEvents = {
310
- attributes: TagAttributes;
311
- events: TagEventAttributes;
312
- };
313
- export type DomPublish = (eventName: string, domEvent: Event) => void;
314
- export type Subscribe = (matcher: BusEventMatcher, listener: BusListener<any>) => void;
315
- export type RenderKit = {
316
- document: Document;
317
- window: Window;
318
- publish: DomPublish;
319
- subscribe: Subscribe;
320
- state: State;
321
- parent?: JaxsNode | null;
322
- };
323
- export interface Renderable {
324
- render: (renderKit: RenderKit, parentElement?: JaxsElement) => JaxsNode[];
325
- }
326
- export type StaticTemplate = () => Renderable;
327
- export type TypedTemplate<T> = (props: Props<T>) => Renderable;
328
- export type Template<T> = StaticTemplate | TypedTemplate<T>;
329
- export type JsxCollection = (Renderable | TextValue)[];
330
- export enum ChangeInstructionTypes {
331
- removeNode = 0,
332
- insertNode = 1,// can be to move an existing element in the dom, or to add one
333
- replaceNode = 2,
334
- removeAttribute = 3,
335
- addAttribute = 4,
336
- updateAttribute = 5,
337
- removeEvent = 6,
338
- addEvent = 7,
339
- updateEvent = 8,
340
- changeValue = 9,
341
- changeText = 10
342
- }
343
- export type RemoveInstructionData = {
344
- name: string;
345
- isSvg?: boolean;
346
- };
347
- export type AttributeInstructionData = {
348
- name: string;
349
- value: string;
350
- isSvg?: boolean;
351
- };
352
- export type EventInstructionData = {
353
- name: string;
354
- value: EventListener;
355
- };
356
- export type UpdateEventInstructionData = {
357
- name: string;
358
- sourceValue: EventListener;
359
- targetValue: EventListener;
360
- };
361
- export type InsertNodeData = {
362
- parent: JaxsElement;
363
- index: number;
364
- };
365
- type NullInstructionData = Record<string, never>;
366
- export type InstructionData = RemoveInstructionData | AttributeInstructionData | EventInstructionData | UpdateEventInstructionData | InsertNodeData | NullInstructionData;
367
- export type ChangeInstruction = {
368
- source: JaxsNode;
369
- target: JaxsNode;
370
- type: ChangeInstructionTypes;
371
- data: InstructionData;
372
- };
373
- export type ChangeInstructions = Array<ChangeInstruction>;
374
- export type InstructionsUpdater = (instruction: ChangeInstruction) => void;
375
- export type StoreMap = {
376
- [key: string]: any;
377
- };
378
- export type ViewModel<ATTRIBUTES, STORE_MAP> = (storeMap: STORE_MAP) => Partial<ATTRIBUTES>;
379
- export type BindSubscriptionList = string[];
380
- export type BindParams<T, U> = {
381
- Template: Template<T>;
382
- viewModel?: ViewModel<T, U>;
383
- subscriptions?: BindSubscriptionList;
384
- };
385
- export type AppAdditionListenerOptions = {
386
- state: State;
387
- document: Document;
388
- window: Window;
389
- };
390
- export type DefaultBusListenerOptions = {
391
- publish: PublishFunction;
392
- eventName: string;
393
- };
394
- export type ListenerKit = AppAdditionListenerOptions & DefaultBusListenerOptions;
395
- export type PublishFunction = (event: string, payload: any) => void;
396
- export type BusListener<T> = (payload: T, listenerKit: ListenerKit) => void;
397
- export type BusEventMatcher = string | RegExp;
398
- export type ExactSubscriptionData<T> = {
399
- listener: BusListener<T>;
400
- index: number;
401
- matcher: string;
402
- };
403
- export type FuzzySubscriptionData<T> = {
404
- listener: BusListener<T>;
405
- index: number;
406
- matcher: RegExp;
407
- };
408
- export type Unsubscribe = () => void;
409
- export type CreateAppBuilderArguments = {
410
- window?: Window;
411
- document?: Document;
412
- };
413
- export type RouteState = {
414
- host: string;
415
- path: string;
416
- query: Record<string, string>;
417
- };
418
- export type AttributesWithChildren<T> = Props<T> & {
419
- children?: JsxCollection;
420
- };
421
- export type DiffPair = {
422
- source: JaxsNode;
423
- target: JaxsNode;
424
- };
425
- export type CompileChildren = (sourceList: JaxsNodes, targetList: JaxsNodes, parent: JaxsElement) => ChangeInstructions;
426
- export type StatePublisher = (event: string, payload: any) => void;
427
- export type StateTransactionUpdater = (collection: StoresCollection) => void;
428
- export type StoresCollection = Record<string, Store<any>>;
429
- export type StoreInitializationOptions<T> = {
430
- name: string;
431
- parent: State;
432
- value: T;
433
- };
434
- export type StoreDataUpdater<T> = (originalValue: T) => T;
435
- export type UpdaterValue<T> = boolean | T | T[];
436
- export type StoreUpdaterOrValue<T> = UpdaterValue<T> | StoreDataUpdater<T>;
437
- export type StoreListSorterFunction<T> = (left: T, right: T) => number;
438
- export type RouteMatcher = (routeState: RouteState) => boolean;
439
- export type RenderedRoute = {
440
- Partial: StaticTemplate;
441
- match: RouteMatcher;
442
- };
443
- export interface PeriodicPublisher {
444
- event: string;
445
- publish: PublishFunction;
446
- payload?: any;
447
- start: () => void;
448
- stop: () => void;
449
- }
450
- export type RequiredPeriodicPublisherOptions = {
451
- event: string;
452
- publish: PublishFunction;
453
- payload?: any;
454
- };
455
- export type GeneralPeriodicOptions = {
456
- period: number;
457
- offset?: number;
458
- };
459
- export type CustomPeriodicOptions = {
460
- timer: PeriodicTimerFunction;
461
- };
462
- export type GeneralPeriodicPublisherOptions = RequiredPeriodicPublisherOptions & GeneralPeriodicOptions;
463
- export type CustomPeriodicPublisherOptions = RequiredPeriodicPublisherOptions & CustomPeriodicOptions;
464
- export type PublishPeriodicallyOptions = GeneralPeriodicPublisherOptions | CustomPeriodicPublisherOptions;
465
- export type PeriodicTimerFunctionOptions = {
466
- timeDiff: number;
467
- callCount: number;
468
- stop: () => void;
469
- };
470
- export type PeriodicTimerFunction = (options: PeriodicTimerFunctionOptions) => number;
471
- }
472
- declare module "rendering/dom/tag" {
473
- import type { JaxsElement, TagAttributes, TagEventAttributes, DomPublish, RenderKit } from "types";
474
- export const createNode: (type: string, document: Document) => HTMLElement;
475
- export const setAttributesOnElement: (element: Element, attributes: TagAttributes) => void;
476
- export const setEventsOnElement: (element: JaxsElement, events: TagEventAttributes, publish: DomPublish) => void;
477
- export const createDecoratedNode: (type: string, attributes: TagAttributes, events: TagEventAttributes, renderKit: RenderKit) => JaxsElement;
478
- }
479
- declare module "rendering/dom/svg" {
480
- import type { TagAttributes, JaxsElement } from "types";
481
- export const namespace = "http://www.w3.org/2000/svg";
482
- export const isSvgTag: (tagType: string, attributeNamespace?: string) => boolean;
483
- export const createSvgNode: (type: string, attributes: TagAttributes, document: Document) => JaxsElement;
484
- export const elementIsSvg: (element: JaxsElement) => boolean;
485
- }
486
- declare module "rendering/dom/text" {
487
- export const createTextNode: (value: string, document: Document) => Text;
488
- }
489
- declare module "rendering/templates/text" {
490
- import { Renderable, TextValue, RenderKit } from "types";
491
- export class TextTemplate implements Renderable {
492
- value: string;
493
- constructor(content: TextValue);
494
- render(renderKit: RenderKit): Text[];
495
- }
496
- }
497
- declare module "rendering/templates/children/text" {
498
- import { TextValue, Renderable } from "types";
499
- import { TextTemplate } from "rendering/templates/text";
500
- export const isTextValue: <T>(child: TextValue | T) => child is string | number | (T & string) | (T & number);
501
- export const textNode: (content: TextValue) => TextTemplate;
502
- export const replaceTextNodes: (child: TextValue | Renderable) => Renderable | TextTemplate;
503
- }
504
- declare module "rendering/templates/children/normalize" {
505
- import { JsxCollection, AttributesWithChildren } from "types";
506
- export const normalizeJsxChildren: (jsxChildren: JsxCollection) => (import("types").Renderable | import("rendering/templates/text").TextTemplate)[];
507
- export const normalizeToArray: <T>(children: T | T[]) => T[];
508
- export const ensureJsxChildrenArray: <T>(maybeChildren?: JsxCollection, attributes?: AttributesWithChildren<T>) => JsxCollection;
509
- }
510
- declare module "rendering/templates/tag/attributes-and-events" {
511
- import type { Props, TagAttributesAndEvents, JsxCollection } from "types";
512
- export const separateAttrsAndEvents: <T>(props: Props<T>, defaultValue?: string) => TagAttributesAndEvents;
513
- export const packageJsxAttributes: <T>(maybeAttributes?: Props<T>, maybeChildren?: JsxCollection) => Props<T>;
514
- }
515
- declare module "rendering/templates/children/render" {
516
- import { Renderable, RenderKit, JaxsNode, JaxsElement } from "types";
517
- export const recursiveRender: (children: Renderable[], renderKit: RenderKit, parentElement?: JaxsElement, rendered?: JaxsNode[]) => JaxsNode[];
518
- }
519
- declare module "rendering/templates/children" {
520
- import { JaxsElement, Renderable, JsxCollection, RenderKit, JaxsNodes, JaxsNode } from "types";
521
- export class Children implements Renderable {
522
- collection: Renderable[];
523
- parentElement?: JaxsElement;
524
- constructor(jsxChildren: JsxCollection);
525
- render(renderKit: RenderKit, parentElement?: JaxsElement): JaxsNode[];
526
- generateDom(renderKit: RenderKit): JaxsNode[];
527
- attachToParent(dom: JaxsNodes): void;
528
- }
529
- }
530
- declare module "rendering/templates/tag/jsx-key" {
531
- import { TagAttributes } from "types";
532
- export class JsxKey {
533
- attributes: TagAttributes;
534
- type: string;
535
- constructor(type: string, attributes: TagAttributes);
536
- generate(): string;
537
- sourceKey(): string;
538
- createKeyFromAttributes(): string;
539
- }
540
- }
541
- declare module "rendering/templates/tag" {
542
- import type { Props, JaxsNode, TagEventAttributes, Renderable, RenderKit, TagAttributes, JsxCollection } from "types";
543
- import { Children } from "rendering/templates/children";
544
- export class Tag<T> implements Renderable {
545
- type: string;
546
- events: TagEventAttributes;
547
- attributes: TagAttributes;
548
- props: Props<T>;
549
- children: Children;
550
- isSvg: boolean;
551
- constructor(tagType: string, props: Props<T>, children?: JsxCollection);
552
- render(renderKit: RenderKit): JaxsNode[];
553
- generateDom(renderKit: RenderKit): import("types").JaxsElement;
554
- generateHtmlDom(renderKit: RenderKit): import("types").JaxsElement;
555
- generateSvgDom(renderKit: RenderKit): import("types").JaxsElement;
556
- jsxKey(): string;
557
- }
558
- }
559
- declare module "rendering/jsx" {
560
- import type { JsxCollection, Props, Template, Renderable } from "types";
561
- import { Children } from "rendering/templates/children";
562
- const jsx: {
563
- <T>(type: string | Template<T>, attributes: Props<T>, ...children: JsxCollection): Renderable;
564
- fragment<T>(attributes: Props<T>, maybeChildren: JsxCollection): Children;
565
- };
566
- export { jsx };
567
- }
568
- declare module "app/builder" {
569
- import { App } from "app/index";
570
- import { JaxsBus } from "bus/index";
571
- import { State } from "state/index";
572
- import { PublishFunction, Subscribe, RenderKit, CreateAppBuilderArguments } from "types";
573
- class AppBuilder {
574
- window: Window;
575
- document: Document;
576
- publish: PublishFunction;
577
- subscribe: Subscribe;
578
- bus: JaxsBus;
579
- state: State;
580
- renderKit: RenderKit;
581
- constructor(domEnvironment: CreateAppBuilderArguments);
582
- setup(): App;
583
- setupDomEnvironment(domEnvironment: CreateAppBuilderArguments): void;
584
- setupBus(): void;
585
- setupState(): void;
586
- addBusOptions(): void;
587
- setRenderKit(): void;
588
- }
589
- const createApp: (domEnvironment?: CreateAppBuilderArguments) => App;
590
- export { App, AppBuilder, createApp };
591
- }
592
- declare module "rendering/update/instructions/instructions" {
593
- import { JaxsInput, ChangeInstruction, JaxsElement, RemoveInstructionData, AttributeInstructionData, EventInstructionData, UpdateEventInstructionData, InsertNodeData } from "types";
594
- export const changeText: (source: Text, target: Text) => ChangeInstruction;
595
- export const replaceNode: (source: JaxsElement, target: JaxsElement) => ChangeInstruction;
596
- export const removeAttribute: (source: JaxsElement, target: JaxsElement, data: RemoveInstructionData) => ChangeInstruction;
597
- export const addAttribute: (source: JaxsElement, target: JaxsElement, data: AttributeInstructionData) => ChangeInstruction;
598
- export const updateAttribute: (source: JaxsElement, target: JaxsElement, data: AttributeInstructionData) => ChangeInstruction;
599
- export const removeEvent: (source: JaxsElement, target: JaxsElement, data: EventInstructionData) => ChangeInstruction;
600
- export const addEvent: (source: JaxsElement, target: JaxsElement, data: EventInstructionData) => ChangeInstruction;
601
- export const updateEvent: (source: JaxsElement, target: JaxsElement, data: UpdateEventInstructionData) => ChangeInstruction;
602
- export const removeNode: (source: JaxsElement) => ChangeInstruction;
603
- export const insertNode: (target: JaxsElement, data: InsertNodeData) => ChangeInstruction;
604
- export const changeValue: (source: JaxsInput, target: JaxsInput, data: AttributeInstructionData) => ChangeInstruction;
605
- export const instructionsSorter: (left: ChangeInstruction, right: ChangeInstruction) => 0 | 1 | -1;
606
- }
607
- declare module "rendering/update/instructions/id-map" {
608
- import type { JaxsNode, JaxsNodes, JsxChangeId } from "types";
609
- export class IdMap {
610
- map: Record<string, JsxChangeId[]>;
611
- constructor();
612
- populate(list: JaxsNodes): void;
613
- pullMatch(element: JaxsNode): JsxChangeId;
614
- clear(element: JaxsNode): void;
615
- check(element: JaxsNode): boolean;
616
- remaining(): JsxChangeId[];
617
- }
618
- export const createIdMap: (list: JaxsNodes) => IdMap;
619
- }
620
- declare module "rendering/update/instructions/nodes/element/attributes" {
621
- import type { JaxsElement, ChangeInstructions } from "types";
622
- export const compileForAttributes: (source: JaxsElement, target: JaxsElement, isSvg?: boolean) => ChangeInstructions;
623
- }
624
- declare module "rendering/update/instructions/nodes/element/events" {
625
- import type { JaxsElement, ChangeInstructions } from "types";
626
- export const compileForEvents: (source: JaxsElement, target: JaxsElement) => ChangeInstructions;
627
- }
628
- declare module "rendering/update/instructions/nodes/input" {
629
- import { ChangeInstructions, JaxsElement } from "types";
630
- export const compileForInputValue: (sourceElement: JaxsElement, targetElement: JaxsElement) => ChangeInstructions;
631
- }
632
- declare module "rendering/update/instructions/nodes/element" {
633
- import type { JaxsElement } from "types";
634
- export const compileForElement: (source: JaxsElement, target: JaxsElement) => import("types").ChangeInstruction[];
635
- }
636
- declare module "rendering/update/instructions/nodes/svg" {
637
- import { JaxsElement } from "types";
638
- export const compileForSvg: (source: JaxsElement, target: JaxsElement) => import("types").ChangeInstructions;
639
- }
640
- declare module "rendering/update/instructions/nodes/text" {
641
- import type { ChangeInstructions } from "types";
642
- export const compileForText: (source: Text, target: Text) => ChangeInstructions;
643
- }
644
- declare module "rendering/update/instructions/node" {
645
- import type { JaxsNode, ChangeInstructions, CompileChildren } from "types";
646
- export const compileForNode: (source: JaxsNode, target: JaxsNode, compileChildren: CompileChildren) => ChangeInstructions;
647
- }
648
- declare module "rendering/update/instructions/collection" {
649
- import type { JaxsElement, JaxsNodes } from "types";
650
- export const compileCollection: (sourceList: JaxsNodes, targetList: JaxsNodes, parent: JaxsElement) => import("types").ChangeInstruction[];
651
- }
652
- declare module "rendering/update/perform-change" {
653
- import type { ChangeInstruction, JaxsElement, JaxsNodes } from "types";
654
- export const performChange: (source: JaxsNodes, target: JaxsNodes, parent: JaxsElement) => ChangeInstruction[];
655
- }
656
- declare module "rendering/templates/bound/modify-dom-cache" {
657
- import { ChangeInstructions, JaxsNode, JaxsElement } from "types";
658
- export const modifyDomCache: (instructions: ChangeInstructions, dom: JaxsNode[], parentElement: JaxsElement) => JaxsNode[];
659
- }
660
- declare module "rendering/templates/bound" {
661
- import { JaxsElement, Props, Template, RenderKit, ViewModel, BindParams, BindSubscriptionList, JaxsNode } from "types";
662
- export class Bound<ATTRIBUTES, STATE_MAP> {
663
- Template: Template<ATTRIBUTES>;
664
- viewModel: ViewModel<ATTRIBUTES, STATE_MAP>;
665
- attributes: Partial<Props<ATTRIBUTES>>;
666
- subscriptions: BindSubscriptionList;
667
- dom: JaxsNode[];
668
- parentElement: JaxsElement | null;
669
- renderKit?: RenderKit;
670
- constructor({ Template, subscriptions, attributes, viewModel }: {
671
- Template: any;
672
- subscriptions: any;
673
- attributes: any;
674
- viewModel: any;
675
- });
676
- render(renderKit: RenderKit): JaxsNode[];
677
- generateDom(renderKit: RenderKit): JaxsNode[];
678
- rerender(): void;
679
- subscribeForRerender(): void;
680
- eventName(storeName: string): string;
681
- }
682
- export const bind: <ATTRIBUTES, STATE_MAP>({ Template, viewModel, subscriptions, }: BindParams<ATTRIBUTES, STATE_MAP>) => (attributes: Partial<Props<ATTRIBUTES>>) => Bound<unknown, unknown>;
683
- }
684
- declare module "navigation/index" {
685
- import * as events from "navigation/events";
686
- import { extractQueryParams } from "navigation/extract-query-params";
687
- import { findHref } from "navigation/find-href";
688
- import { navigate } from "navigation/navigate";
689
- import { onLinkClick } from "navigation/on-link-click";
690
- import { onLocationChange } from "navigation/on-location-change";
691
- import { createRouteState } from "navigation/route-state";
692
- import * as start from "navigation/start";
693
- export { events, extractQueryParams, findHref, navigate, onLinkClick, onLocationChange, createRouteState, start, };
694
- }
695
- declare module "app/routing" {
696
- import { RenderedRoute, RouteMatcher } from "types";
697
- export const exactPathMatch: (exactPath: string) => RouteMatcher;
698
- export const catchAll: RouteMatcher;
699
- export const buildRouter: (pages: RenderedRoute[]) => ({ route }: {
700
- route: any;
701
- }) => import("types").StaticTemplate;
702
- }
703
- declare module "rendering/null" {
704
- import { RenderKit, JaxsElement, JaxsNode } from "types";
705
- export const NullTemplate: () => {
706
- render: (renderKit: RenderKit, parentElement?: JaxsElement) => JaxsNode[];
707
- };
708
- }
709
- declare module "app/routed-view" {
710
- import { RenderedRoute, RouteState } from "types";
711
- export const routedView: (routes: RenderedRoute[]) => (attributes: Partial<import("types").Props<{
712
- route: RouteState;
713
- }>>) => import("rendering/templates/bound").Bound<unknown, unknown>;
714
- }
715
- declare module "jaxs" {
716
- export { jsx } from "rendering/jsx";
717
- export { createApp } from "app/builder";
718
- export { bind } from "rendering/templates/bound";
719
- export * as JaxsTypes from "types";
720
- export * as navigation from "navigation/index";
721
- export * as appBuilding from "app/index";
722
- export * as messageBus from "bus/index";
723
- export * as state from "state/index";
724
- export * as routing from "app/routing";
725
- export { routedView } from "app/routed-view";
1
+ declare module 'state/is' {
2
+ export const isBoolean: (value: any) => value is boolean
3
+ export const isNumber: (value: any) => value is number
4
+ export const isString: (value: any) => value is string
5
+ export const isArray: (value: any) => value is any[]
6
+ export const isObject: (value: any) => boolean
7
+ }
8
+ declare module 'state/equality' {
9
+ type Object = Record<string, any>
10
+ export const areElementsEqual: (oldValue: any, newValue: any) => boolean
11
+ export const areObjectsEqual: (oldValue: Object, newValue: Object) => any
12
+ export const areArraysEqual: (oldValue: any[], newValue: any[]) => any
13
+ export const areEqual: (oldValue: any, newValue: any) => any
14
+ }
15
+ declare module 'state/store' {
16
+ import type {
17
+ State,
18
+ StoreInitializationOptions,
19
+ StoreUpdaterOrValue,
20
+ StoreUpdater,
21
+ } from 'types'
22
+ export class Store<T> {
23
+ parent: State
24
+ name: string
25
+ updater: StoreUpdater<T>
26
+ _value: T
27
+ initialValue: T
28
+ constructor(options: StoreInitializationOptions<T>)
29
+ get ['value'](): T
30
+ set ['value'](value: T)
31
+ reset(): void
32
+ update(updater: StoreUpdaterOrValue<T>): void
33
+ private updateValue
34
+ private getUpdatedValue
35
+ }
36
+ }
37
+ declare module 'state/store-updater' {
38
+ import type { Store, StoreUpdaterOrValue } from 'types'
39
+ export class StoreUpdaterBase<T> {
40
+ store: Store<T>
41
+ constructor(store: Store<T>)
42
+ update(updater: StoreUpdaterOrValue<T>): void
43
+ reset(): void
44
+ get value(): T
45
+ }
46
+ }
47
+ declare module 'state/updaters/object' {
48
+ import { Store } from 'types'
49
+ import { StoreUpdaterBase } from 'state/store-updater'
50
+ export class StoreUpdaterObject<
51
+ T extends object,
52
+ > extends StoreUpdaterBase<T> {
53
+ updateAttribute(name: keyof T, value: T[keyof T]): void
54
+ updateDynamicAttribute(name: string, value: any): void
55
+ isKey(key: string): boolean
56
+ isValueType(key: keyof T, value: any): boolean
57
+ resetAttribute(name: keyof T): void
58
+ }
59
+ export const objectUpdater: <T extends Object>(
60
+ store: Store<T>,
61
+ ) => StoreUpdaterObject<T>
62
+ }
63
+ declare module 'state/updaters/list' {
64
+ import { StoreListSorterFunction, Store } from 'types'
65
+ import { StoreUpdaterBase } from 'state/store-updater'
66
+ export class StoreUpdaterList<T> extends StoreUpdaterBase<T[]> {
67
+ push(element: T): void
68
+ pop(): T
69
+ unshift(element: T): void
70
+ shift(): T
71
+ addSorter(name: string, sorter: StoreListSorterFunction<T>): void
72
+ sortBy(sorter: StoreListSorterFunction<T>): void
73
+ insertAt(index: number, item: T): void
74
+ remove(value: T): void
75
+ removeBy(matcherFunction: (value: T) => boolean): void
76
+ }
77
+ export const listUpdater: <T>(store: Store<T[]>) => StoreUpdaterList<T>
78
+ }
79
+ declare module 'state/updaters/boolean' {
80
+ import { Store } from 'types'
81
+ import { StoreUpdaterBase } from 'state/store-updater'
82
+ export class StoreUpdaterBoolean extends StoreUpdaterBase<boolean> {
83
+ toggle(): void
84
+ setTrue(): void
85
+ setFalse(): void
86
+ }
87
+ export const booleanUpdater: (store: Store<boolean>) => StoreUpdaterBoolean
88
+ }
89
+ declare module 'state/updaters' {
90
+ export const updaters: {
91
+ object: <T extends Object>(
92
+ store: import('state').Store<T>,
93
+ ) => import('state/updaters/object').StoreUpdaterObject<T>
94
+ list: <T>(
95
+ store: import('state').Store<T[]>,
96
+ ) => import('state/updaters/list').StoreUpdaterList<T>
97
+ boolean: (
98
+ store: import('state').Store<boolean>,
99
+ ) => import('state/updaters/boolean').StoreUpdaterBoolean
100
+ }
101
+ }
102
+ declare module 'state/index' {
103
+ import { Store } from 'state/store'
104
+ import type {
105
+ StatePublisher,
106
+ StateTransactionUpdater,
107
+ StoresCollection,
108
+ } from 'types'
109
+ import { updaters } from 'state/updaters'
110
+ export const eventName = 'state'
111
+ export class State {
112
+ publisher: StatePublisher
113
+ stores: StoresCollection
114
+ eventNamePrefix: string
115
+ notifications: Set<string>
116
+ inTransaction: boolean
117
+ constructor(publisher: StatePublisher)
118
+ create<T>(name: string, initialState: T): Store<T>
119
+ store<T>(name: string): Store<T>
120
+ get<T>(name: string): T
121
+ getAll(names: string[]): {}
122
+ notify(name: string): void
123
+ update(name: string, newValue: any): void
124
+ transaction(updater: StateTransactionUpdater): void
125
+ publishAll(): void
126
+ publish(name: string): void
127
+ event(name: string): string
128
+ }
129
+ export const createState: (publisher: StatePublisher) => State
130
+ export { Store, updaters }
131
+ }
132
+ declare module 'bus/exact-subscriptions' {
133
+ import { ExactSubscriptionData, BusListener, Unsubscribe } from 'types'
134
+ export class ExactSubscriptions {
135
+ lookup: Record<string, ExactSubscriptionData<any>[]>
136
+ constructor()
137
+ add<T>(
138
+ matcher: string,
139
+ listener: BusListener<T>,
140
+ index: number,
141
+ ): Unsubscribe
142
+ remove<T>(subscription: ExactSubscriptionData<T>): void
143
+ matches(event: string): ExactSubscriptionData<any>[]
144
+ ensureArrayFor(matcher: string): void
145
+ }
146
+ }
147
+ declare module 'bus/fuzzy-subscriptions' {
148
+ import { FuzzySubscriptionData, BusListener, Unsubscribe } from 'types'
149
+ export class FuzzySubscriptions {
150
+ lookup: FuzzySubscriptionData<any>[]
151
+ constructor()
152
+ add<T>(
153
+ matcher: RegExp,
154
+ listener: BusListener<T>,
155
+ index: number,
156
+ ): Unsubscribe
157
+ remove<T>(subscription: FuzzySubscriptionData<T>): void
158
+ matches(event: string): FuzzySubscriptionData<any>[]
159
+ }
160
+ }
161
+ declare module 'bus/custom-periodic-publisher' {
162
+ import {
163
+ PeriodicPublisher,
164
+ PublishFunction,
165
+ PeriodicTimerFunction,
166
+ CustomPeriodicPublisherOptions,
167
+ } from 'types'
168
+ export class CustomPeriodicPublisher implements PeriodicPublisher {
169
+ publish: PublishFunction
170
+ event: string
171
+ payload: any
172
+ stopped: boolean
173
+ timer: PeriodicTimerFunction
174
+ timeoutId: any
175
+ stop: () => void
176
+ callCount: number
177
+ startedAt: number
178
+ constructor({
179
+ publish,
180
+ event,
181
+ payload,
182
+ timer,
183
+ }: CustomPeriodicPublisherOptions)
184
+ start(): void
185
+ setNewTimeout: () => void
186
+ calculateNextTime: () => number
187
+ diff(): number
188
+ stopTimeout(): void
189
+ publishEvent(): void
190
+ }
191
+ }
192
+ declare module 'bus/publish-periodically' {
193
+ import type { PublishPeriodicallyOptions } from 'types'
194
+ export const publishPeriodically: (
195
+ options: PublishPeriodicallyOptions,
196
+ ) => () => void
197
+ }
198
+ declare module 'bus/index' {
199
+ import {
200
+ BusEventMatcher,
201
+ BusListener,
202
+ Unsubscribe,
203
+ AppAdditionListenerOptions,
204
+ ListenerKit,
205
+ } from 'types'
206
+ import { ExactSubscriptions } from 'bus/exact-subscriptions'
207
+ import { FuzzySubscriptions } from 'bus/fuzzy-subscriptions'
208
+ import { publishPeriodically } from 'bus/publish-periodically'
209
+ class JaxsBus {
210
+ options?: AppAdditionListenerOptions
211
+ exactSubscriptions: ExactSubscriptions
212
+ fuzzySubscriptions: FuzzySubscriptions
213
+ currentIndex: number
214
+ constructor()
215
+ subscribe<T>(
216
+ matcher: BusEventMatcher,
217
+ listener: BusListener<T>,
218
+ ): Unsubscribe
219
+ publish<T>(event: string, payload: T): void
220
+ addListenerOptions(options: AppAdditionListenerOptions): void
221
+ listenerOptions(event: string): ListenerKit
222
+ }
223
+ const createBus: () => {
224
+ bus: JaxsBus
225
+ publish: (event: string, payload: any) => void
226
+ subscribe: (
227
+ matcher: BusEventMatcher,
228
+ listener: BusListener<any>,
229
+ ) => Unsubscribe
230
+ }
231
+ export {
232
+ createBus,
233
+ JaxsBus,
234
+ ExactSubscriptions,
235
+ FuzzySubscriptions,
236
+ publishPeriodically,
237
+ }
238
+ }
239
+ declare module 'rendering/templates/root' {
240
+ import type {
241
+ JaxsElement,
242
+ JaxsNodes,
243
+ RenderKit,
244
+ Renderable,
245
+ JaxsNode,
246
+ } from 'types'
247
+ export class Root {
248
+ template: Renderable
249
+ selector: string
250
+ renderKit: RenderKit
251
+ dom: JaxsNodes
252
+ parentElement?: JaxsElement | null
253
+ constructor(template: Renderable, selector: string, renderKit: RenderKit)
254
+ renderAndAttach(renderKit: RenderKit): void
255
+ render(renderKit: RenderKit): JaxsNode[]
256
+ attach(): void
257
+ getParentElement(): Element
258
+ }
259
+ export const render: (
260
+ template: Renderable,
261
+ selector: string,
262
+ renderKit: RenderKit,
263
+ ) => Root
264
+ }
265
+ declare module 'navigation/events' {
266
+ export const linkNavigationEvent = 'go-to-href'
267
+ export const navigationEvent = 'go-to'
268
+ export const locationChangeEvent = 'navigation:location-change'
269
+ export const routeChangeEvent = 'navigation:route-change'
270
+ }
271
+ declare module 'navigation/route-state' {
272
+ import { State } from 'state/index'
273
+ export const createRouteState: (state: State) => void
274
+ }
275
+ declare module 'navigation/find-href' {
276
+ export const findHref: (node: HTMLElement) => string
277
+ }
278
+ declare module 'navigation/navigate' {
279
+ import { ListenerKit } from 'types'
280
+ export const navigate: (
281
+ path: string,
282
+ { publish, window }: ListenerKit,
283
+ ) => void
284
+ }
285
+ declare module 'navigation/on-link-click' {
286
+ import { ListenerKit } from 'types'
287
+ export const onLinkClick: (domEvent: MouseEvent, options: ListenerKit) => void
288
+ }
289
+ declare module 'navigation/extract-query-params' {
290
+ export const extractQueryParams: (queryString: string) => {}
291
+ }
292
+ declare module 'navigation/on-location-change' {
293
+ import { ListenerKit } from 'types'
294
+ export const onLocationChange: (_: null, listenerOptions: ListenerKit) => void
295
+ }
296
+ declare module 'navigation/start' {
297
+ import type { App } from 'app/index'
298
+ export const subscribeToNavigation: (app: App) => void
299
+ export const subscribeToHistoryChange: (app: App) => void
300
+ export const publishLocation: (app: App) => void
301
+ export const startNavigation: (app: App) => void
302
+ }
303
+ declare module 'app/index' {
304
+ import type { Renderable, RenderKit, Subscribe, PublishFunction } from 'types'
305
+ import type { State } from 'state/index'
306
+ import type { JaxsBus } from 'bus/index'
307
+ import { Root } from 'rendering/templates/root'
308
+ export class App {
309
+ window: Window
310
+ document: Document
311
+ publish: PublishFunction
312
+ subscribe: Subscribe
313
+ bus: JaxsBus
314
+ state: State
315
+ renderKit: RenderKit
316
+ roots: Root[]
317
+ constructor({
318
+ window,
319
+ document,
320
+ publish,
321
+ subscribe,
322
+ bus,
323
+ state,
324
+ renderKit,
325
+ }: {
326
+ window: any
327
+ document: any
328
+ publish: any
329
+ subscribe: any
330
+ bus: any
331
+ state: any
332
+ renderKit: any
333
+ })
334
+ render(template: Renderable, selector: string): Root
335
+ startNavigation(): void
336
+ }
337
+ }
338
+ declare module 'types' {
339
+ import type { State } from 'state/index'
340
+ import type { Store } from 'state/store'
341
+ import type { StoreUpdaterBase } from 'state/store-updater'
342
+ import type { StoreUpdaterBoolean } from 'state/updaters/boolean'
343
+ import type { StoreUpdaterList } from 'state/updaters/list'
344
+ import type { StoreUpdaterObject } from 'state/updaters/object'
345
+ export type { App } from 'app/index'
346
+ export {
347
+ State,
348
+ Store,
349
+ StoreUpdaterBase,
350
+ StoreUpdaterBoolean,
351
+ StoreUpdaterList,
352
+ StoreUpdaterObject,
353
+ }
354
+ export type StoreUpdater<T> =
355
+ | StoreUpdaterBase<T>
356
+ | StoreUpdaterObject<T extends object ? T : never>
357
+ | StoreUpdaterBoolean
358
+ | StoreUpdaterList<T>
359
+ export type TextValue = string | number
360
+ export interface JsxIded {
361
+ __jsx?: string
362
+ }
363
+ export type JsxChangeId = {
364
+ element: JaxsNode
365
+ index: number
366
+ }
367
+ export type EventMap = {
368
+ domEvent: string
369
+ busEvent: string
370
+ listener: EventListener
371
+ }
372
+ export type EventMaps = Record<string, EventMap>
373
+ interface JsxEventMapped {
374
+ eventMaps: EventMaps
375
+ }
376
+ export type JaxsElement = Element & JsxIded & JsxEventMapped
377
+ export type JaxsText = Text & JsxIded
378
+ export type JaxsSvgElement = SVGElement & JsxIded
379
+ export type JaxsNode = JaxsElement | JaxsText | JaxsSvgElement
380
+ export type JaxsNodes = JaxsNode[] | NodeListOf<JaxsNode>
381
+ export type JaxsInput = HTMLInputElement & JsxIded & JsxEventMapped
382
+ type NullValues = null | undefined
383
+ export type ReactSourceObject = {
384
+ fileName: string
385
+ lineNumber: string
386
+ columnNumber: string
387
+ }
388
+ interface SourceMap {
389
+ __source?: ReactSourceObject
390
+ }
391
+ export type Props<T> = Partial<{
392
+ __source: ReactSourceObject
393
+ children: JsxCollection
394
+ }> &
395
+ T
396
+ export type PropValue =
397
+ | TextValue
398
+ | NullValues
399
+ | boolean
400
+ | ReactSourceObject
401
+ | JsxCollection
402
+ export type TagAttributes = SourceMap & Record<string, string>
403
+ export type TagEventAttributes = Record<string, string>
404
+ export type TagAttributesAndEvents = {
405
+ attributes: TagAttributes
406
+ events: TagEventAttributes
407
+ }
408
+ export type DomPublish = (eventName: string, domEvent: Event) => void
409
+ export type Subscribe = (
410
+ matcher: BusEventMatcher,
411
+ listener: BusListener<any>,
412
+ ) => void
413
+ export type RenderKit = {
414
+ document: Document
415
+ window: Window
416
+ publish: DomPublish
417
+ subscribe: Subscribe
418
+ state: State
419
+ parent?: JaxsNode | null
420
+ }
421
+ export interface Renderable {
422
+ render: (renderKit: RenderKit, parentElement?: JaxsElement) => JaxsNode[]
423
+ }
424
+ export type StaticTemplate = () => Renderable
425
+ export type TypedTemplate<T> = (props: Props<T>) => Renderable
426
+ export type Template<T> = StaticTemplate | TypedTemplate<T>
427
+ export type JsxCollection = (Renderable | TextValue)[]
428
+ export enum ChangeInstructionTypes {
429
+ removeNode = 0,
430
+ insertNode = 1, // can be to move an existing element in the dom, or to add one
431
+ replaceNode = 2,
432
+ removeAttribute = 3,
433
+ addAttribute = 4,
434
+ updateAttribute = 5,
435
+ removeEvent = 6,
436
+ addEvent = 7,
437
+ updateEvent = 8,
438
+ changeValue = 9,
439
+ changeText = 10,
440
+ }
441
+ export type RemoveInstructionData = {
442
+ name: string
443
+ isSvg?: boolean
444
+ }
445
+ export type AttributeInstructionData = {
446
+ name: string
447
+ value: string
448
+ isSvg?: boolean
449
+ }
450
+ export type EventInstructionData = {
451
+ name: string
452
+ value: EventListener
453
+ }
454
+ export type UpdateEventInstructionData = {
455
+ name: string
456
+ sourceValue: EventListener
457
+ targetValue: EventListener
458
+ }
459
+ export type InsertNodeData = {
460
+ parent: JaxsElement
461
+ index: number
462
+ }
463
+ type NullInstructionData = Record<string, never>
464
+ export type InstructionData =
465
+ | RemoveInstructionData
466
+ | AttributeInstructionData
467
+ | EventInstructionData
468
+ | UpdateEventInstructionData
469
+ | InsertNodeData
470
+ | NullInstructionData
471
+ export type ChangeInstruction = {
472
+ source: JaxsNode
473
+ target: JaxsNode
474
+ type: ChangeInstructionTypes
475
+ data: InstructionData
476
+ }
477
+ export type ChangeInstructions = Array<ChangeInstruction>
478
+ export type InstructionsUpdater = (instruction: ChangeInstruction) => void
479
+ export type StoreMap = {
480
+ [key: string]: any
481
+ }
482
+ export type ViewModel<ATTRIBUTES, STORE_MAP> = (
483
+ storeMap: STORE_MAP,
484
+ ) => Partial<ATTRIBUTES>
485
+ export type BindSubscriptionList = string[]
486
+ export type BindParams<T, U> = {
487
+ Template: Template<T>
488
+ viewModel?: ViewModel<T, U>
489
+ subscriptions?: BindSubscriptionList
490
+ }
491
+ export type AppAdditionListenerOptions = {
492
+ state: State
493
+ document: Document
494
+ window: Window
495
+ }
496
+ export type DefaultBusListenerOptions = {
497
+ publish: PublishFunction
498
+ eventName: string
499
+ }
500
+ export type ListenerKit = AppAdditionListenerOptions &
501
+ DefaultBusListenerOptions
502
+ export type PublishFunction = (event: string, payload: any) => void
503
+ export type BusListener<T> = (payload: T, listenerKit: ListenerKit) => void
504
+ export type BusEventMatcher = string | RegExp
505
+ export type ExactSubscriptionData<T> = {
506
+ listener: BusListener<T>
507
+ index: number
508
+ matcher: string
509
+ }
510
+ export type FuzzySubscriptionData<T> = {
511
+ listener: BusListener<T>
512
+ index: number
513
+ matcher: RegExp
514
+ }
515
+ export type Unsubscribe = () => void
516
+ export type CreateAppBuilderArguments = {
517
+ window?: Window
518
+ document?: Document
519
+ }
520
+ export type RouteState = {
521
+ host: string
522
+ path: string
523
+ query: Record<string, string>
524
+ }
525
+ export type AttributesWithChildren<T> = Props<T> & {
526
+ children?: JsxCollection
527
+ }
528
+ export type DiffPair = {
529
+ source: JaxsNode
530
+ target: JaxsNode
531
+ }
532
+ export type CompileChildren = (
533
+ sourceList: JaxsNodes,
534
+ targetList: JaxsNodes,
535
+ parent: JaxsElement,
536
+ ) => ChangeInstructions
537
+ export type StatePublisher = (event: string, payload: any) => void
538
+ export type StateTransactionUpdater = (collection: StoresCollection) => void
539
+ export type StoresCollection = Record<string, Store<any>>
540
+ export type StoreInitializationOptions<T> = {
541
+ name: string
542
+ parent: State
543
+ value: T
544
+ }
545
+ export type StoreDataUpdater<T> = (originalValue: T) => T
546
+ export type UpdaterValue<T> = boolean | T | T[]
547
+ export type StoreUpdaterOrValue<T> = UpdaterValue<T> | StoreDataUpdater<T>
548
+ export type StoreListSorterFunction<T> = (left: T, right: T) => number
549
+ export type RouteMatcher = (routeState: RouteState) => boolean
550
+ export type RenderedRoute = {
551
+ Partial: StaticTemplate
552
+ match: RouteMatcher
553
+ }
554
+ export interface PeriodicPublisher {
555
+ event: string
556
+ publish: PublishFunction
557
+ payload?: any
558
+ start: () => void
559
+ stop: () => void
560
+ }
561
+ export type RequiredPeriodicPublisherOptions = {
562
+ event: string
563
+ publish: PublishFunction
564
+ payload?: any
565
+ }
566
+ export type GeneralPeriodicOptions = {
567
+ period: number
568
+ offset?: number
569
+ }
570
+ export type CustomPeriodicOptions = {
571
+ timer: PeriodicTimerFunction
572
+ }
573
+ export type GeneralPeriodicPublisherOptions =
574
+ RequiredPeriodicPublisherOptions & GeneralPeriodicOptions
575
+ export type CustomPeriodicPublisherOptions =
576
+ RequiredPeriodicPublisherOptions & CustomPeriodicOptions
577
+ export type PublishPeriodicallyOptions =
578
+ | GeneralPeriodicPublisherOptions
579
+ | CustomPeriodicPublisherOptions
580
+ export type PeriodicTimerFunctionOptions = {
581
+ timeDiff: number
582
+ callCount: number
583
+ stop: () => void
584
+ }
585
+ export type PeriodicTimerFunction = (
586
+ options: PeriodicTimerFunctionOptions,
587
+ ) => number
588
+ }
589
+ declare module 'rendering/dom/tag' {
590
+ import type {
591
+ JaxsElement,
592
+ TagAttributes,
593
+ TagEventAttributes,
594
+ DomPublish,
595
+ RenderKit,
596
+ } from 'types'
597
+ export const createNode: (type: string, document: Document) => HTMLElement
598
+ export const setAttributesOnElement: (
599
+ element: Element,
600
+ attributes: TagAttributes,
601
+ ) => void
602
+ export const setEventsOnElement: (
603
+ element: JaxsElement,
604
+ events: TagEventAttributes,
605
+ publish: DomPublish,
606
+ ) => void
607
+ export const createDecoratedNode: (
608
+ type: string,
609
+ attributes: TagAttributes,
610
+ events: TagEventAttributes,
611
+ renderKit: RenderKit,
612
+ ) => JaxsElement
613
+ }
614
+ declare module 'rendering/dom/svg' {
615
+ import type { TagAttributes, JaxsElement } from 'types'
616
+ export const namespace = 'http://www.w3.org/2000/svg'
617
+ export const isSvgTag: (
618
+ tagType: string,
619
+ attributeNamespace?: string,
620
+ ) => boolean
621
+ export const createSvgNode: (
622
+ type: string,
623
+ attributes: TagAttributes,
624
+ document: Document,
625
+ ) => JaxsElement
626
+ export const elementIsSvg: (element: JaxsElement) => boolean
627
+ }
628
+ declare module 'rendering/dom/text' {
629
+ export const createTextNode: (value: string, document: Document) => Text
630
+ }
631
+ declare module 'rendering/templates/text' {
632
+ import { Renderable, TextValue, RenderKit } from 'types'
633
+ export class TextTemplate implements Renderable {
634
+ value: string
635
+ constructor(content: TextValue)
636
+ render(renderKit: RenderKit): Text[]
637
+ }
638
+ }
639
+ declare module 'rendering/templates/children/text' {
640
+ import { TextValue, Renderable } from 'types'
641
+ import { TextTemplate } from 'rendering/templates/text'
642
+ export const isTextValue: <T>(
643
+ child: TextValue | T,
644
+ ) => child is string | number | (T & string) | (T & number)
645
+ export const textNode: (content: TextValue) => TextTemplate
646
+ export const replaceTextNodes: (
647
+ child: TextValue | Renderable,
648
+ ) => Renderable | TextTemplate
649
+ }
650
+ declare module 'rendering/templates/children/normalize' {
651
+ import { JsxCollection, AttributesWithChildren } from 'types'
652
+ export const normalizeJsxChildren: (
653
+ jsxChildren: JsxCollection,
654
+ ) => (
655
+ | import('types').Renderable
656
+ | import('rendering/templates/text').TextTemplate
657
+ )[]
658
+ export const normalizeToArray: <T>(children: T | T[]) => T[]
659
+ export const ensureJsxChildrenArray: <T>(
660
+ maybeChildren?: JsxCollection,
661
+ attributes?: AttributesWithChildren<T>,
662
+ ) => JsxCollection
663
+ }
664
+ declare module 'rendering/templates/tag/attributes-and-events' {
665
+ import type { Props, TagAttributesAndEvents, JsxCollection } from 'types'
666
+ export const separateAttrsAndEvents: <T>(
667
+ props: Props<T>,
668
+ defaultValue?: string,
669
+ ) => TagAttributesAndEvents
670
+ export const packageJsxAttributes: <T>(
671
+ maybeAttributes?: Props<T>,
672
+ maybeChildren?: JsxCollection,
673
+ ) => Props<T>
674
+ }
675
+ declare module 'rendering/templates/children/render' {
676
+ import { Renderable, RenderKit, JaxsNode, JaxsElement } from 'types'
677
+ export const recursiveRender: (
678
+ children: Renderable[],
679
+ renderKit: RenderKit,
680
+ parentElement?: JaxsElement,
681
+ rendered?: JaxsNode[],
682
+ ) => JaxsNode[]
683
+ }
684
+ declare module 'rendering/templates/children' {
685
+ import {
686
+ JaxsElement,
687
+ Renderable,
688
+ JsxCollection,
689
+ RenderKit,
690
+ JaxsNodes,
691
+ JaxsNode,
692
+ } from 'types'
693
+ export class Children implements Renderable {
694
+ collection: Renderable[]
695
+ parentElement?: JaxsElement
696
+ constructor(jsxChildren: JsxCollection)
697
+ render(renderKit: RenderKit, parentElement?: JaxsElement): JaxsNode[]
698
+ generateDom(renderKit: RenderKit): JaxsNode[]
699
+ attachToParent(dom: JaxsNodes): void
700
+ }
701
+ }
702
+ declare module 'rendering/templates/tag/jsx-key' {
703
+ import { TagAttributes } from 'types'
704
+ export class JsxKey {
705
+ attributes: TagAttributes
706
+ type: string
707
+ constructor(type: string, attributes: TagAttributes)
708
+ generate(): string
709
+ sourceKey(): string
710
+ createKeyFromAttributes(): string
711
+ }
712
+ }
713
+ declare module 'rendering/templates/tag' {
714
+ import type {
715
+ Props,
716
+ JaxsNode,
717
+ TagEventAttributes,
718
+ Renderable,
719
+ RenderKit,
720
+ TagAttributes,
721
+ JsxCollection,
722
+ } from 'types'
723
+ import { Children } from 'rendering/templates/children'
724
+ export class Tag<T> implements Renderable {
725
+ type: string
726
+ events: TagEventAttributes
727
+ attributes: TagAttributes
728
+ props: Props<T>
729
+ children: Children
730
+ isSvg: boolean
731
+ constructor(tagType: string, props: Props<T>, children?: JsxCollection)
732
+ render(renderKit: RenderKit): JaxsNode[]
733
+ generateDom(renderKit: RenderKit): import('types').JaxsElement
734
+ generateHtmlDom(renderKit: RenderKit): import('types').JaxsElement
735
+ generateSvgDom(renderKit: RenderKit): import('types').JaxsElement
736
+ jsxKey(): string
737
+ }
738
+ }
739
+ declare module 'rendering/jsx' {
740
+ import type { JsxCollection, Props, Template, Renderable } from 'types'
741
+ import { Children } from 'rendering/templates/children'
742
+ const jsx: {
743
+ <T>(
744
+ type: string | Template<T>,
745
+ attributes: Props<T>,
746
+ ...children: JsxCollection
747
+ ): Renderable
748
+ fragment<T>(attributes: Props<T>, maybeChildren: JsxCollection): Children
749
+ }
750
+ export { jsx }
751
+ }
752
+ declare module 'app/builder' {
753
+ import { App } from 'app/index'
754
+ import { JaxsBus } from 'bus/index'
755
+ import { State } from 'state/index'
756
+ import {
757
+ PublishFunction,
758
+ Subscribe,
759
+ RenderKit,
760
+ CreateAppBuilderArguments,
761
+ } from 'types'
762
+ class AppBuilder {
763
+ window: Window
764
+ document: Document
765
+ publish: PublishFunction
766
+ subscribe: Subscribe
767
+ bus: JaxsBus
768
+ state: State
769
+ renderKit: RenderKit
770
+ constructor(domEnvironment: CreateAppBuilderArguments)
771
+ setup(): App
772
+ setupDomEnvironment(domEnvironment: CreateAppBuilderArguments): void
773
+ setupBus(): void
774
+ setupState(): void
775
+ addBusOptions(): void
776
+ setRenderKit(): void
777
+ }
778
+ const createApp: (domEnvironment?: CreateAppBuilderArguments) => App
779
+ export { App, AppBuilder, createApp }
780
+ }
781
+ declare module 'rendering/update/instructions/instructions' {
782
+ import {
783
+ JaxsInput,
784
+ ChangeInstruction,
785
+ JaxsElement,
786
+ RemoveInstructionData,
787
+ AttributeInstructionData,
788
+ EventInstructionData,
789
+ UpdateEventInstructionData,
790
+ InsertNodeData,
791
+ } from 'types'
792
+ export const changeText: (source: Text, target: Text) => ChangeInstruction
793
+ export const replaceNode: (
794
+ source: JaxsElement,
795
+ target: JaxsElement,
796
+ ) => ChangeInstruction
797
+ export const removeAttribute: (
798
+ source: JaxsElement,
799
+ target: JaxsElement,
800
+ data: RemoveInstructionData,
801
+ ) => ChangeInstruction
802
+ export const addAttribute: (
803
+ source: JaxsElement,
804
+ target: JaxsElement,
805
+ data: AttributeInstructionData,
806
+ ) => ChangeInstruction
807
+ export const updateAttribute: (
808
+ source: JaxsElement,
809
+ target: JaxsElement,
810
+ data: AttributeInstructionData,
811
+ ) => ChangeInstruction
812
+ export const removeEvent: (
813
+ source: JaxsElement,
814
+ target: JaxsElement,
815
+ data: EventInstructionData,
816
+ ) => ChangeInstruction
817
+ export const addEvent: (
818
+ source: JaxsElement,
819
+ target: JaxsElement,
820
+ data: EventInstructionData,
821
+ ) => ChangeInstruction
822
+ export const updateEvent: (
823
+ source: JaxsElement,
824
+ target: JaxsElement,
825
+ data: UpdateEventInstructionData,
826
+ ) => ChangeInstruction
827
+ export const removeNode: (source: JaxsElement) => ChangeInstruction
828
+ export const insertNode: (
829
+ target: JaxsElement,
830
+ data: InsertNodeData,
831
+ ) => ChangeInstruction
832
+ export const changeValue: (
833
+ source: JaxsInput,
834
+ target: JaxsInput,
835
+ data: AttributeInstructionData,
836
+ ) => ChangeInstruction
837
+ export const instructionsSorter: (
838
+ left: ChangeInstruction,
839
+ right: ChangeInstruction,
840
+ ) => 0 | 1 | -1
841
+ }
842
+ declare module 'rendering/update/instructions/id-map' {
843
+ import type { JaxsNode, JaxsNodes, JsxChangeId } from 'types'
844
+ export class IdMap {
845
+ map: Record<string, JsxChangeId[]>
846
+ constructor()
847
+ populate(list: JaxsNodes): void
848
+ pullMatch(element: JaxsNode): JsxChangeId
849
+ clear(element: JaxsNode): void
850
+ check(element: JaxsNode): boolean
851
+ remaining(): JsxChangeId[]
852
+ }
853
+ export const createIdMap: (list: JaxsNodes) => IdMap
854
+ }
855
+ declare module 'rendering/update/instructions/nodes/element/attributes' {
856
+ import type { JaxsElement, ChangeInstructions } from 'types'
857
+ export const compileForAttributes: (
858
+ source: JaxsElement,
859
+ target: JaxsElement,
860
+ isSvg?: boolean,
861
+ ) => ChangeInstructions
862
+ }
863
+ declare module 'rendering/update/instructions/nodes/element/events' {
864
+ import type { JaxsElement, ChangeInstructions } from 'types'
865
+ export const compileForEvents: (
866
+ source: JaxsElement,
867
+ target: JaxsElement,
868
+ ) => ChangeInstructions
869
+ }
870
+ declare module 'rendering/update/instructions/nodes/input' {
871
+ import { ChangeInstructions, JaxsElement } from 'types'
872
+ export const compileForInputValue: (
873
+ sourceElement: JaxsElement,
874
+ targetElement: JaxsElement,
875
+ ) => ChangeInstructions
876
+ }
877
+ declare module 'rendering/update/instructions/nodes/element' {
878
+ import type { JaxsElement } from 'types'
879
+ export const compileForElement: (
880
+ source: JaxsElement,
881
+ target: JaxsElement,
882
+ ) => import('types').ChangeInstruction[]
883
+ }
884
+ declare module 'rendering/update/instructions/nodes/svg' {
885
+ import { JaxsElement } from 'types'
886
+ export const compileForSvg: (
887
+ source: JaxsElement,
888
+ target: JaxsElement,
889
+ ) => import('types').ChangeInstructions
890
+ }
891
+ declare module 'rendering/update/instructions/nodes/text' {
892
+ import type { ChangeInstructions } from 'types'
893
+ export const compileForText: (
894
+ source: Text,
895
+ target: Text,
896
+ ) => ChangeInstructions
897
+ }
898
+ declare module 'rendering/update/instructions/node' {
899
+ import type { JaxsNode, ChangeInstructions, CompileChildren } from 'types'
900
+ export const compileForNode: (
901
+ source: JaxsNode,
902
+ target: JaxsNode,
903
+ compileChildren: CompileChildren,
904
+ ) => ChangeInstructions
905
+ }
906
+ declare module 'rendering/update/instructions/collection' {
907
+ import type { JaxsElement, JaxsNodes } from 'types'
908
+ export const compileCollection: (
909
+ sourceList: JaxsNodes,
910
+ targetList: JaxsNodes,
911
+ parent: JaxsElement,
912
+ ) => import('types').ChangeInstruction[]
913
+ }
914
+ declare module 'rendering/update/perform-change' {
915
+ import type { ChangeInstruction, JaxsElement, JaxsNodes } from 'types'
916
+ export const performChange: (
917
+ source: JaxsNodes,
918
+ target: JaxsNodes,
919
+ parent: JaxsElement,
920
+ ) => ChangeInstruction[]
921
+ }
922
+ declare module 'rendering/templates/bound/modify-dom-cache' {
923
+ import { ChangeInstructions, JaxsNode, JaxsElement } from 'types'
924
+ export const modifyDomCache: (
925
+ instructions: ChangeInstructions,
926
+ dom: JaxsNode[],
927
+ parentElement: JaxsElement,
928
+ ) => JaxsNode[]
929
+ }
930
+ declare module 'rendering/templates/bound' {
931
+ import {
932
+ JaxsElement,
933
+ Props,
934
+ Template,
935
+ RenderKit,
936
+ ViewModel,
937
+ BindParams,
938
+ BindSubscriptionList,
939
+ JaxsNode,
940
+ } from 'types'
941
+ export class Bound<ATTRIBUTES, STATE_MAP> {
942
+ Template: Template<ATTRIBUTES>
943
+ viewModel: ViewModel<ATTRIBUTES, STATE_MAP>
944
+ attributes: Partial<Props<ATTRIBUTES>>
945
+ subscriptions: BindSubscriptionList
946
+ dom: JaxsNode[]
947
+ parentElement: JaxsElement | null
948
+ renderKit?: RenderKit
949
+ constructor({
950
+ Template,
951
+ subscriptions,
952
+ attributes,
953
+ viewModel,
954
+ }: {
955
+ Template: any
956
+ subscriptions: any
957
+ attributes: any
958
+ viewModel: any
959
+ })
960
+ render(renderKit: RenderKit): JaxsNode[]
961
+ generateDom(renderKit: RenderKit): JaxsNode[]
962
+ rerender(): void
963
+ subscribeForRerender(): void
964
+ eventName(storeName: string): string
965
+ }
966
+ export const bind: <ATTRIBUTES, STATE_MAP>({
967
+ Template,
968
+ viewModel,
969
+ subscriptions,
970
+ }: BindParams<ATTRIBUTES, STATE_MAP>) => (
971
+ attributes: Partial<Props<ATTRIBUTES>>,
972
+ ) => Bound<unknown, unknown>
973
+ }
974
+ declare module 'navigation/index' {
975
+ import * as events from 'navigation/events'
976
+ import { extractQueryParams } from 'navigation/extract-query-params'
977
+ import { findHref } from 'navigation/find-href'
978
+ import { navigate } from 'navigation/navigate'
979
+ import { onLinkClick } from 'navigation/on-link-click'
980
+ import { onLocationChange } from 'navigation/on-location-change'
981
+ import { createRouteState } from 'navigation/route-state'
982
+ import * as start from 'navigation/start'
983
+ export {
984
+ events,
985
+ extractQueryParams,
986
+ findHref,
987
+ navigate,
988
+ onLinkClick,
989
+ onLocationChange,
990
+ createRouteState,
991
+ start,
992
+ }
993
+ }
994
+ declare module 'app/routing' {
995
+ import { RenderedRoute, RouteMatcher } from 'types'
996
+ export const exactPathMatch: (exactPath: string) => RouteMatcher
997
+ export const catchAll: RouteMatcher
998
+ export const buildRouter: (
999
+ pages: RenderedRoute[],
1000
+ ) => ({ route }: { route: any }) => import('types').StaticTemplate
1001
+ }
1002
+ declare module 'rendering/null' {
1003
+ import { RenderKit, JaxsElement, JaxsNode } from 'types'
1004
+ export const NullTemplate: () => {
1005
+ render: (renderKit: RenderKit, parentElement?: JaxsElement) => JaxsNode[]
1006
+ }
1007
+ }
1008
+ declare module 'app/routed-view' {
1009
+ import { RenderedRoute, RouteState } from 'types'
1010
+ export const routedView: (routes: RenderedRoute[]) => (
1011
+ attributes: Partial<
1012
+ import('types').Props<{
1013
+ route: RouteState
1014
+ }>
1015
+ >,
1016
+ ) => import('rendering/templates/bound').Bound<unknown, unknown>
1017
+ }
1018
+ declare module 'jaxs' {
1019
+ export { jsx } from 'rendering/jsx'
1020
+ export { createApp } from 'app/builder'
1021
+ export { bind } from 'rendering/templates/bound'
1022
+ export * as JaxsTypes from 'types'
1023
+ export * as navigation from 'navigation/index'
1024
+ export * as appBuilding from 'app/index'
1025
+ export * as messageBus from 'bus/index'
1026
+ export * as state from 'state/index'
1027
+ export * as routing from 'app/routing'
1028
+ export { routedView } from 'app/routed-view'
726
1029
  }