arrowjs-aluminum 0.10.0 → 2.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.
- package/dist/ArrowElementGenerator.d.ts +44 -44
- package/dist/ArrowElementGenerator.d.ts.map +1 -1
- package/dist/ArrowElementGenerator.js +45 -44
- package/dist/ArrowElementGenerator.js.map +1 -1
- package/dist/Router.d.ts +8 -3
- package/dist/Router.d.ts.map +1 -1
- package/dist/Router.js +26 -20
- package/dist/Router.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,74 +5,74 @@ import { type ArrowTemplate } from "@arrow-js/core";
|
|
|
5
5
|
export declare class ArrowElementGenerator<T> {
|
|
6
6
|
readonly type: string;
|
|
7
7
|
protected readonly attributes: {
|
|
8
|
-
[attribute: string]:
|
|
8
|
+
[attribute: string]: any;
|
|
9
9
|
};
|
|
10
10
|
protected readonly createTransform: (args: T, currentAttributes: {
|
|
11
|
-
[attribute: string]:
|
|
11
|
+
[attribute: string]: any;
|
|
12
12
|
}) => void;
|
|
13
|
+
protected readonly htmlTransform: (inner: ArrowTemplate) => ArrowTemplate;
|
|
13
14
|
/**
|
|
14
15
|
* Creates an ArrowElement
|
|
15
16
|
* @param type The underlying type of this element: div, span, etc
|
|
16
17
|
* @param attributes The attributes on this element
|
|
17
|
-
* @param
|
|
18
|
+
* @param optData Contains any optional data for this generator
|
|
19
|
+
* @param optData.createTransform A function that gets run when {@link create} is called. See {@link create} for more info
|
|
20
|
+
* @param optData.htmlTransform A function that takes the template that this element is created with and transforms it
|
|
18
21
|
*/
|
|
19
22
|
constructor(type: string, attributes: {
|
|
20
|
-
[attribute: string]:
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
[attribute: string]: any;
|
|
24
|
+
}, optData?: {
|
|
25
|
+
createTransform?: (args: T, currentAttributes: {
|
|
26
|
+
[attribute: string]: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
htmlTransform?: (inner: ArrowTemplate) => ArrowTemplate;
|
|
29
|
+
});
|
|
24
30
|
/**
|
|
25
31
|
* Creates a new template from this generator, optionally adding some additional attributes
|
|
26
|
-
* @param contents The contents of this template (the stuff between the tags)
|
|
27
32
|
* @param requiredValue The value you need to pass into this generator, specified when the generator was created (the `createTransform`)
|
|
28
|
-
* @param attributes Additional attributes to add to this
|
|
33
|
+
* @param attributes Additional HTML attributes to add to this element
|
|
29
34
|
* @return A renderable {@link ArrowTemplate}
|
|
30
35
|
*/
|
|
31
|
-
create(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
replace?: {
|
|
36
|
-
[attribute: string]: string | (() => string);
|
|
37
|
-
};
|
|
38
|
-
transform?: {
|
|
39
|
-
[attribute: string]: (previousValue: (string | undefined | (() => string))) => string;
|
|
40
|
-
};
|
|
41
|
-
}): ArrowTemplate;
|
|
36
|
+
create(requiredValue: T, attributes?: {
|
|
37
|
+
[attribute: string]: (previousValue: any) => any;
|
|
38
|
+
}): (strings: TemplateStringsArray, ...expSlots: any[]) => ArrowTemplate;
|
|
42
39
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @param attributes
|
|
45
|
-
*
|
|
40
|
+
* Extends this generator to create a new one
|
|
41
|
+
* @param attributes An object of callbacks, where each callback takes the old attribute and returns the new attribute.
|
|
42
|
+
* If a value is passed in instead of a callback, the new value will overwrite the old value.
|
|
43
|
+
* @param data Contains any additional data for this generator
|
|
44
|
+
* @param data.newCreateTransform Takes the `requiredValue` from {@link create} and the attributes of this generator,
|
|
46
45
|
* and applies the `requiredValue` to the attributes
|
|
46
|
+
* @param data.newHtmlTransform Takes the previous htmlTransform function and returns a new htmlTransform function
|
|
47
47
|
* @param type The node type of this template. Optional, will inherit from parent if not specified
|
|
48
48
|
* @return A new {@link ArrowElementGenerator} with the specified attributes, type, and transform function
|
|
49
49
|
*/
|
|
50
|
-
extend<T2>(attributes
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, newCreateTransform: (superTransform: (args: T, currentAttributes: {
|
|
61
|
-
[attribute: string]: string | (() => string);
|
|
62
|
-
}) => void) => (args: T2, currentAttributes: {
|
|
63
|
-
[attribute: string]: string | (() => string);
|
|
64
|
-
}) => void, type?: string): ArrowElementGenerator<T2>;
|
|
50
|
+
extend<T2 = T>(attributes?: {
|
|
51
|
+
[attribute: string]: any;
|
|
52
|
+
}, data?: {
|
|
53
|
+
newCreateTransform: (superTransform: (args: T, currentAttributes: {
|
|
54
|
+
[attribute: string]: any;
|
|
55
|
+
}) => void) => (args: T2, currentAttributes: {
|
|
56
|
+
[attribute: string]: any;
|
|
57
|
+
}) => void;
|
|
58
|
+
newHtmlTransform?: (superTransform: (inner: ArrowTemplate) => ArrowTemplate) => (inner: ArrowTemplate) => ArrowTemplate;
|
|
59
|
+
}, type?: string): ArrowElementGenerator<T2>;
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
67
62
|
* Creates a new generator
|
|
68
63
|
* @param type The node type of this template
|
|
69
64
|
* @param attributes The attributes to add to all templates made by this generator
|
|
70
|
-
* @param
|
|
65
|
+
* @param optData Contains any optional data for this generator
|
|
66
|
+
* @param optData.createTransform A function that gets run when {@link create} is called. See {@link create} for more info
|
|
67
|
+
* @param optData.htmlTransform A function that takes the template that this element is created with and transforms it
|
|
71
68
|
* @return A new {@link ArrowElementGenerator} with the specified attributes, type, and transform function
|
|
72
69
|
*/
|
|
73
|
-
export default function createGenerator<T>(type: string, attributes
|
|
74
|
-
[attribute: string]:
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
export default function createGenerator<T>(type: string, attributes?: {
|
|
71
|
+
[attribute: string]: any;
|
|
72
|
+
}, optData?: {
|
|
73
|
+
createTransform?: (args: T, currentAttributes: {
|
|
74
|
+
[attribute: string]: any;
|
|
75
|
+
}) => void;
|
|
76
|
+
htmlTransform?: ((inner: ArrowTemplate) => ArrowTemplate);
|
|
77
|
+
}): ArrowElementGenerator<T>;
|
|
78
78
|
//# sourceMappingURL=ArrowElementGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowElementGenerator.d.ts","sourceRoot":"","sources":["../src/ArrowElementGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,aAAa,EAAO,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrowElementGenerator.d.ts","sourceRoot":"","sources":["../src/ArrowElementGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,aAAa,EAAO,MAAM,gBAAgB,CAAC;AAUxD;;GAEG;AACH,qBAAa,qBAAqB,CAAC,CAAC;IAChC,SAAgB,IAAI,SAAC;IACrB,SAAS,CAAC,QAAQ,CAAC,UAAU;;MAAC;IAC9B,SAAS,CAAC,QAAQ,CAAC,eAAe,SAYP,CAAC,qBAAoB;QAAC,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,KAAG,IAAI,CAZ5C;IACnC,SAAS,CAAC,QAAQ,CAAC,aAAa,UAYN,aAAa,KAAG,aAAa,CAZtB;IAEjC;;;;;;;OAOG;gBACS,IAAI,EAAC,MAAM,EAAE,UAAU,EAAC;QAAC,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,EAAE,OAAO,GAAC;QAClE,eAAe,CAAC,EAAC,CAAC,IAAI,EAAC,CAAC,EAAE,iBAAiB,EAAC;YAAC,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;SAAC,KAAG,IAAI,CAAC;QAC5E,aAAa,CAAC,EAAC,CAAC,KAAK,EAAC,aAAa,KAAG,aAAa,CAAA;KACnD;IAOJ;;;;;OAKG;IACH,MAAM,CAAC,aAAa,EAAC,CAAC,EAAE,UAAU,GAAC;QAAC,CAAC,SAAS,EAAC,MAAM,GAAE,CAAC,aAAa,EAAC,GAAG,KAAG,GAAG,CAAA;KAAI,IAavE,SAAQ,oBAAoB,EAAE,GAAG,UAAU,GAAG,EAAE;IAK5D;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,GAAC,CAAC,EAAE,UAAU,GAAC;QAAC,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;KAAI,EACxC,IAAI,GAAC;QACD,kBAAkB,EAAC,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,iBAAiB,EAAE;YAAE,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,KAAK,IAAI,KAClG,CAAC,IAAI,EAAC,EAAE,EAAE,iBAAiB,EAAC;YAAE,CAAC,SAAS,EAAC,MAAM,GAAG,GAAG,CAAA;SAAE,KAAK,IAAI,CAAC;QACrE,gBAAgB,CAAC,EAAC,CAAC,cAAc,EAAE,CAAC,KAAK,EAAC,aAAa,KAAG,aAAa,KAAK,CAAC,KAAK,EAAC,aAAa,KAAG,aAAa,CAAC;KAGpH,EACD,IAAI,CAAC,EAAC,MAAM;CAe1B;AAMD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,EAAE,IAAI,EAAC,MAAM,EAAE,UAAU,GAAC;IAAC,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;CAAI,EACtF,OAAO,GAAC;IACJ,eAAe,CAAC,EAAE,CAAC,IAAI,EAAC,CAAC,EAAE,iBAAiB,EAAC;QAAE,CAAC,SAAS,EAAC,MAAM,GAAE,GAAG,CAAA;KAAE,KAAG,IAAI,CAAC;IAC/E,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAC,aAAa,KAAK,aAAa,CAAC,CAAA;CACxD,4BAWX"}
|
|
@@ -1,33 +1,8 @@
|
|
|
1
1
|
import { html } from "@arrow-js/core";
|
|
2
|
-
function extendAttributes(originalAttrs, transformers) {
|
|
2
|
+
function extendAttributes(originalAttrs, transformers = {}) {
|
|
3
3
|
const newAttributes = { ...originalAttrs };
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (newAttributes[attribute] === undefined)
|
|
7
|
-
newAttributes[attribute] = addValue;
|
|
8
|
-
else if (typeof addValue === "string") {
|
|
9
|
-
if (typeof newAttributes[attribute] === "string")
|
|
10
|
-
newAttributes[attribute] += " " + addValue;
|
|
11
|
-
else {
|
|
12
|
-
const old = newAttributes[attribute];
|
|
13
|
-
newAttributes[attribute] = () => old() + " " + addValue;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
const old = newAttributes[attribute];
|
|
18
|
-
if (typeof old === "function")
|
|
19
|
-
newAttributes[attribute] = () => old() + " " + addValue();
|
|
20
|
-
else
|
|
21
|
-
newAttributes[attribute] = () => addValue() + " " + old;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (transformers.replace !== undefined)
|
|
26
|
-
Object.assign(newAttributes, transformers.replace);
|
|
27
|
-
if (transformers.transform !== undefined) {
|
|
28
|
-
for (const [attribute, transformer] of Object.entries(transformers.transform)) {
|
|
29
|
-
newAttributes[attribute] = transformer(newAttributes[attribute]);
|
|
30
|
-
}
|
|
4
|
+
for (const [attribute, transformer] of Object.entries(transformers)) {
|
|
5
|
+
newAttributes[attribute] = transformer(newAttributes[attribute]);
|
|
31
6
|
}
|
|
32
7
|
return newAttributes;
|
|
33
8
|
}
|
|
@@ -38,25 +13,28 @@ export class ArrowElementGenerator {
|
|
|
38
13
|
type;
|
|
39
14
|
attributes;
|
|
40
15
|
createTransform;
|
|
16
|
+
htmlTransform;
|
|
41
17
|
/**
|
|
42
18
|
* Creates an ArrowElement
|
|
43
19
|
* @param type The underlying type of this element: div, span, etc
|
|
44
20
|
* @param attributes The attributes on this element
|
|
45
|
-
* @param
|
|
21
|
+
* @param optData Contains any optional data for this generator
|
|
22
|
+
* @param optData.createTransform A function that gets run when {@link create} is called. See {@link create} for more info
|
|
23
|
+
* @param optData.htmlTransform A function that takes the template that this element is created with and transforms it
|
|
46
24
|
*/
|
|
47
|
-
constructor(type, attributes,
|
|
25
|
+
constructor(type, attributes, optData = {}) {
|
|
48
26
|
this.type = type;
|
|
49
27
|
this.attributes = attributes;
|
|
50
|
-
this.createTransform = createTransform;
|
|
28
|
+
this.createTransform = optData.createTransform || (() => { });
|
|
29
|
+
this.htmlTransform = optData.htmlTransform || ((inside) => inside);
|
|
51
30
|
}
|
|
52
31
|
/**
|
|
53
32
|
* Creates a new template from this generator, optionally adding some additional attributes
|
|
54
|
-
* @param contents The contents of this template (the stuff between the tags)
|
|
55
33
|
* @param requiredValue The value you need to pass into this generator, specified when the generator was created (the `createTransform`)
|
|
56
|
-
* @param attributes Additional attributes to add to this
|
|
34
|
+
* @param attributes Additional HTML attributes to add to this element
|
|
57
35
|
* @return A renderable {@link ArrowTemplate}
|
|
58
36
|
*/
|
|
59
|
-
create(
|
|
37
|
+
create(requiredValue, attributes = {}) {
|
|
60
38
|
const newAttributes = { ...this.attributes };
|
|
61
39
|
this.createTransform(requiredValue, newAttributes);
|
|
62
40
|
const newerAttributes = extendAttributes(newAttributes, attributes);
|
|
@@ -66,29 +44,52 @@ export class ArrowElementGenerator {
|
|
|
66
44
|
...(orderedContents.length > 0 ? ['">'] : []), `</${this.type}>`];
|
|
67
45
|
// @ts-ignore
|
|
68
46
|
staticStringContents.raw = [...staticStringContents];
|
|
69
|
-
return html(staticStringContents, ...[...orderedContents.map(data => data[1]),
|
|
47
|
+
return (strings, ...expSlots) => html(staticStringContents, ...[...orderedContents.map(data => data[1]),
|
|
48
|
+
this.htmlTransform(html(strings, ...expSlots))]);
|
|
70
49
|
}
|
|
71
50
|
/**
|
|
72
|
-
*
|
|
73
|
-
* @param attributes
|
|
74
|
-
*
|
|
51
|
+
* Extends this generator to create a new one
|
|
52
|
+
* @param attributes An object of callbacks, where each callback takes the old attribute and returns the new attribute.
|
|
53
|
+
* If a value is passed in instead of a callback, the new value will overwrite the old value.
|
|
54
|
+
* @param data Contains any additional data for this generator
|
|
55
|
+
* @param data.newCreateTransform Takes the `requiredValue` from {@link create} and the attributes of this generator,
|
|
75
56
|
* and applies the `requiredValue` to the attributes
|
|
57
|
+
* @param data.newHtmlTransform Takes the previous htmlTransform function and returns a new htmlTransform function
|
|
76
58
|
* @param type The node type of this template. Optional, will inherit from parent if not specified
|
|
77
59
|
* @return A new {@link ArrowElementGenerator} with the specified attributes, type, and transform function
|
|
78
60
|
*/
|
|
79
|
-
extend(attributes
|
|
80
|
-
|
|
61
|
+
extend(attributes = {}, data = {
|
|
62
|
+
newCreateTransform: (superT) => (args, attrs) => superT(args, attrs)
|
|
63
|
+
}, type) {
|
|
64
|
+
return new ArrowElementGenerator(type || this.type, extendAttributes(this.attributes, Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k, typeof v === "function" ? v : () => v]))), {
|
|
65
|
+
createTransform: data.newCreateTransform !== undefined ? data.newCreateTransform(this.createTransform) :
|
|
66
|
+
this.createTransform,
|
|
67
|
+
htmlTransform: data.newHtmlTransform !== undefined ? data.newHtmlTransform(this.htmlTransform) :
|
|
68
|
+
this.htmlTransform
|
|
69
|
+
});
|
|
81
70
|
}
|
|
82
71
|
}
|
|
83
|
-
const defaultGenerator = new ArrowElementGenerator("", {},
|
|
72
|
+
const defaultGenerator = new ArrowElementGenerator("", {}, {
|
|
73
|
+
createTransform: () => { },
|
|
74
|
+
htmlTransform: (inner) => inner
|
|
75
|
+
});
|
|
84
76
|
/**
|
|
85
77
|
* Creates a new generator
|
|
86
78
|
* @param type The node type of this template
|
|
87
79
|
* @param attributes The attributes to add to all templates made by this generator
|
|
88
|
-
* @param
|
|
80
|
+
* @param optData Contains any optional data for this generator
|
|
81
|
+
* @param optData.createTransform A function that gets run when {@link create} is called. See {@link create} for more info
|
|
82
|
+
* @param optData.htmlTransform A function that takes the template that this element is created with and transforms it
|
|
89
83
|
* @return A new {@link ArrowElementGenerator} with the specified attributes, type, and transform function
|
|
90
84
|
*/
|
|
91
|
-
export default function createGenerator(type, attributes,
|
|
92
|
-
return defaultGenerator.extend(
|
|
85
|
+
export default function createGenerator(type, attributes = {}, optData = {}) {
|
|
86
|
+
return defaultGenerator.extend(Object.fromEntries(Object.entries(attributes).map(([k, v]) => [k, () => v])), {
|
|
87
|
+
newCreateTransform: optData.createTransform === undefined ?
|
|
88
|
+
() => () => { } :
|
|
89
|
+
() => optData.createTransform,
|
|
90
|
+
newHtmlTransform: optData.htmlTransform === undefined ?
|
|
91
|
+
() => (inner) => inner :
|
|
92
|
+
() => optData.htmlTransform,
|
|
93
|
+
}, type);
|
|
93
94
|
}
|
|
94
95
|
//# sourceMappingURL=ArrowElementGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowElementGenerator.js","sourceRoot":"","sources":["../src/ArrowElementGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAExD,SAAS,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"ArrowElementGenerator.js","sourceRoot":"","sources":["../src/ArrowElementGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAExD,SAAS,gBAAgB,CAAC,aAAsC,EAAC,eAA2D,EAAE;IAC1H,MAAM,aAAa,GAAG,EAAC,GAAG,aAAa,EAAC,CAAC;IACzC,KAAI,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAC,CAAC;QAChE,aAAa,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,aAAa,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,qBAAqB;IACd,IAAI,CAAC;IACF,UAAU,CAAC;IACX,eAAe,CAAC;IAChB,aAAa,CAAC;IAEjC;;;;;;;OAOG;IACH,YAAY,IAAW,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;AAED,MAAM,gBAAgB,GAAG,IAAI,qBAAqB,CAAC,EAAE,EAAC,EAAE,EAAE;IACtD,eAAe,EAAC,GAAE,EAAE,GAAC,CAAC;IACtB,aAAa,EAAC,CAAC,KAAK,EAAC,EAAE,CAAA,KAAK;CAC/B,CAAC,CAAC;AACH;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAI,IAAW,EAAE,aAAoC,EAAE,EACtF,UAGE,EAAE;IACR,OAAO,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAC5E,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAE,EAAE,CAAA,CAAC,CAAC,CAAC,CAAC,EACxB;QACI,kBAAkB,EAAC,OAAO,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC;YACtD,GAAE,EAAE,CAAA,GAAE,EAAE,GAAC,CAAC,CAAC,CAAC;YACZ,GAAE,EAAE,CAAA,OAAO,CAAC,eAAgB;QAChC,gBAAgB,EAAC,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC;YAClD,GAAE,EAAE,CAAA,CAAC,KAAK,EAAC,EAAE,CAAA,KAAK,CAAC,CAAC;YACpB,GAAE,EAAE,CAAA,OAAO,CAAC,aAAc;KACjC,EAAE,IAAI,CAAC,CAAC;AACjB,CAAC"}
|
package/dist/Router.d.ts
CHANGED
|
@@ -77,15 +77,20 @@ export declare class PageAttachedRouter extends Router {
|
|
|
77
77
|
}) => ArrowTemplate);
|
|
78
78
|
/**
|
|
79
79
|
* Rerenders the page
|
|
80
|
+
* @return this for chaining
|
|
80
81
|
*/
|
|
81
|
-
rerender():
|
|
82
|
+
rerender(): this;
|
|
82
83
|
/**
|
|
83
84
|
* Updates the window's `location` and rerenders the page
|
|
84
85
|
* @param newLocation The new url
|
|
85
86
|
* @param replace Whether this new url should replace the current url in history or be a new entry
|
|
86
|
-
* @return
|
|
87
|
+
* @return this for chaining
|
|
87
88
|
*/
|
|
88
|
-
redirect(newLocation?: string, replace?:
|
|
89
|
+
redirect(newLocation?: string, replace?: boolean): this;
|
|
90
|
+
/**
|
|
91
|
+
* An ArrowTemplateGenerator that creates links that work with this router
|
|
92
|
+
*/
|
|
93
|
+
readonly link: import("./ArrowElementGenerator.js").ArrowElementGenerator<string>;
|
|
89
94
|
}
|
|
90
95
|
export {};
|
|
91
96
|
//# sourceMappingURL=Router.d.ts.map
|
package/dist/Router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,aAAa,EAAO,MAAM,gBAAgB,CAAC;AAMxD,KAAK,QAAQ,GAAG,CAAC,SAAS,EAAC;IAAC,CAAC,YAAY,EAAC,MAAM,GAAE,MAAM,CAAA;CAAC,KAAG,aAAa,CAAC;AAC1E,KAAK,SAAS,GAAG;IAAC,CAAC,OAAO,EAAC,MAAM,GAAE,SAAS,CAAC;IAAC,CAAC,gBAAgB,EAAC,MAAM,GAAE,QAAQ,GAAC,MAAM,CAAA;CAAC,CAAC;AAIzF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAC,SAAS,CAAI;IACvC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAC,aAAa,CAAC;IAC1C,SAAS,CAAC,QAAQ,CAAC,oBAAoB,aAOwC,aAAa,QAAO;QAAC,CAAC,YAAY,EAAC,MAAM,GAAE,MAAM,CAAA;KAAC,KAAG,aAAa,CAPzG;IAExC;;;;OAIG;gBACS,QAAQ,GAAC,aAAwB,EAAE,oBAAoB,CAAC,EAAC,CAAC,QAAQ,EAAC,aAAa,EAAE,IAAI,EAAC;QAAC,CAAC,YAAY,EAAC,MAAM,GAAE,MAAM,CAAA;KAAC,KAAG,aAAa;IAKjJ;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,IAAI,EAAC,MAAM,EAAE,cAAc,EAAC,CAAC,CAAC,SAAS,EAAC;QAAC,CAAC,YAAY,EAAC,MAAM,GAAE,MAAM,CAAA;KAAC,KAAG,aAAa,CAAC,GAAC,MAAM;IAwBvG;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAC,MAAM;IAGvB;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAC,MAAM;IAQ5B;;OAEG;IACH,MAAM;IACN;;OAEG;IACH,YAAY;IAEZ,OAAO,CAAC,eAAe;CAqC1B;AAGD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,MAAM;IAC1C,SAAS,CAAC,QAAQ,CAAC,WAAW,0BAAC;IAC/B,SAAS,CAAC,QAAQ,CAAC,QAAQ,qCAAqB;IAEhD;;;;;OAKG;gBACS,QAAQ,EAAC,WAAW,GAAC,SAAS,EAAE,QAAQ,CAAC,EAAC,aAAa,EACvD,oBAAoB,CAAC,EAAC,CAAC,QAAQ,EAAC,aAAa,EAAE,IAAI,EAAC;QAAC,CAAC,YAAY,EAAC,MAAM,GAAE,MAAM,CAAA;KAAC,KAAG,aAAa;IAW9G;;;OAGG;IACI,QAAQ;IASf;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,GAAC,MAA+B,EAAE,OAAO,CAAC,EAAC,OAAO;IActE;;OAEG;IACH,SAAgB,IAAI,qEAOZ;CACX"}
|
package/dist/Router.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { html
|
|
1
|
+
import { html } from "@arrow-js/core";
|
|
2
2
|
import { ref } from "./utils.js";
|
|
3
|
+
import createGenerator from "./ArrowElementGenerator.js";
|
|
3
4
|
const getRouteSymbol = Symbol("getRoute");
|
|
4
5
|
const routerSymbol = Symbol("router");
|
|
5
6
|
const default404 = html `404`;
|
|
@@ -120,7 +121,7 @@ export default class Router {
|
|
|
120
121
|
return toReturn;
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
const
|
|
124
|
+
const hrefResolver = document.createElement("a");
|
|
124
125
|
/**
|
|
125
126
|
* A router that can manages the web page based on the page's url
|
|
126
127
|
*/
|
|
@@ -138,12 +139,13 @@ export class PageAttachedRouter extends Router {
|
|
|
138
139
|
this.rootElement = attachTo;
|
|
139
140
|
this.location.$on(() => this.rerender());
|
|
140
141
|
window.addEventListener("popstate", e => {
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
this.redirect(window.location.pathname);
|
|
143
|
+
e.preventDefault();
|
|
143
144
|
}); //back button handling
|
|
144
145
|
}
|
|
145
146
|
/**
|
|
146
147
|
* Rerenders the page
|
|
148
|
+
* @return this for chaining
|
|
147
149
|
*/
|
|
148
150
|
rerender() {
|
|
149
151
|
const path = this.getPath(this.location.value.join("/"));
|
|
@@ -151,30 +153,34 @@ export class PageAttachedRouter extends Router {
|
|
|
151
153
|
this.rootElement.replaceChildren();
|
|
152
154
|
path(this.rootElement);
|
|
153
155
|
}
|
|
156
|
+
return this;
|
|
154
157
|
}
|
|
155
158
|
/**
|
|
156
159
|
* Updates the window's `location` and rerenders the page
|
|
157
160
|
* @param newLocation The new url
|
|
158
161
|
* @param replace Whether this new url should replace the current url in history or be a new entry
|
|
159
|
-
* @return
|
|
162
|
+
* @return this for chaining
|
|
160
163
|
*/
|
|
161
164
|
redirect(newLocation = window.location.pathname, replace) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.location.value = this.location.value.concat(newLocation.split("/"));
|
|
168
|
-
// modalContents.val=undefined;
|
|
169
|
-
const newPath = newLocation.split("/");
|
|
170
|
-
if (newPath[0] === "") {
|
|
171
|
-
this.location.value = newPath.slice(1);
|
|
165
|
+
hrefResolver.href = newLocation;
|
|
166
|
+
const url = URL.parse(hrefResolver.href);
|
|
167
|
+
if (url.host !== window.location.host) {
|
|
168
|
+
window.location.href = url.href + url.search + url.hash;
|
|
169
|
+
return this;
|
|
172
170
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
window.history[replace ? "replaceState" : "pushState"](null, "", "/" + this.location.value.join("/"));
|
|
177
|
-
return false;
|
|
171
|
+
this.location.value = url.pathname.split("/").slice(1);
|
|
172
|
+
window.history[replace ? "replaceState" : "pushState"](null, "", "/" + this.location.value.join("/") + url.search + url.hash);
|
|
173
|
+
return this;
|
|
178
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* An ArrowTemplateGenerator that creates links that work with this router
|
|
177
|
+
*/
|
|
178
|
+
link = createGenerator("a", { href: "#" }, { createTransform: (href, attrs) => {
|
|
179
|
+
attrs["@click"] = (e) => {
|
|
180
|
+
e.preventDefault();
|
|
181
|
+
this.redirect(href);
|
|
182
|
+
};
|
|
183
|
+
attrs.href = href;
|
|
184
|
+
} });
|
|
179
185
|
}
|
|
180
186
|
//# sourceMappingURL=Router.js.map
|
package/dist/Router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,
|
|
1
|
+
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAC/B,OAAO,eAAe,MAAM,4BAA4B,CAAC;AAEzD,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1C,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAItC,MAAM,UAAU,GAAG,IAAI,CAAA,KAAK,CAAC;AAE7B;;GAEG;AACH,M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