smoothly 0.3.45 → 0.3.47
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/cjs/{Listenable-d0c6deb9.js → Listenable-f6012fc2.js} +23 -0
- package/dist/cjs/{index-879bbabb.js → index-45c42c7c.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -2
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +7 -20
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
- package/dist/collection/components/App.js +2 -2
- package/dist/collection/components/app/index.js +1 -1
- package/dist/collection/components/icon/index.js +2 -11
- package/dist/collection/components/icon-demo/index.js +2 -7
- package/dist/collection/components/icon-demo/style.css +11 -8
- package/dist/collection/index.js +1 -1
- package/dist/collection/model/Icon.js +22 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/custom-elements/index.js +31 -21
- package/dist/esm/{Listenable-5d2def19.js → Listenable-34b047d8.js} +24 -1
- package/dist/esm/{index-d7a4e405.js → index-9594f9bc.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/smoothly-accordion_53.entry.js +7 -20
- package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
- package/dist/esm/smoothly-trigger-source.entry.js +1 -1
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/p-03c10101.js +1 -0
- package/dist/smoothly/{p-2921fbe3.entry.js → p-41bd21da.entry.js} +1 -1
- package/dist/smoothly/p-9fa64d2b.entry.js +1 -0
- package/dist/smoothly/{p-796b1024.js → p-e6cb38de.js} +1 -1
- package/dist/smoothly/{p-44a26666.entry.js → p-e7b088e6.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/icon/index.d.ts +0 -3
- package/dist/types/components/icon-demo/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/Icon.d.ts +4 -0
- package/dist/types/model/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/smoothly/p-94e08cee.js +0 -1
- package/dist/smoothly/p-c6586da8.entry.js +0 -1
|
@@ -656,6 +656,29 @@ var Token;
|
|
|
656
656
|
Token.is = is;
|
|
657
657
|
})(Token || (Token = {}));
|
|
658
658
|
|
|
659
|
+
exports.Icon = void 0;
|
|
660
|
+
(function (Icon) {
|
|
661
|
+
const names = {
|
|
662
|
+
"*": "https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg",
|
|
663
|
+
};
|
|
664
|
+
const cache = {};
|
|
665
|
+
async function fetch(url) {
|
|
666
|
+
const response = await globalThis.fetch(url);
|
|
667
|
+
return response.ok ? response.text() : undefined;
|
|
668
|
+
}
|
|
669
|
+
async function load(name) {
|
|
670
|
+
var _a, _b;
|
|
671
|
+
const url = ((_a = names[name]) !== null && _a !== void 0 ? _a : names["*"]).replace("${name}", name);
|
|
672
|
+
return (_b = cache[url]) !== null && _b !== void 0 ? _b : (cache[url] = fetch(url));
|
|
673
|
+
}
|
|
674
|
+
Icon.load = load;
|
|
675
|
+
function add(url, ...name) {
|
|
676
|
+
for (const n of name)
|
|
677
|
+
names[n] = url;
|
|
678
|
+
}
|
|
679
|
+
Icon.add = add;
|
|
680
|
+
})(exports.Icon || (exports.Icon = {}));
|
|
681
|
+
|
|
659
682
|
class Message {
|
|
660
683
|
static is(value) {
|
|
661
684
|
return typeof value == "object" && typeof value.destination == "string" && value.content != undefined;
|
|
@@ -343,7 +343,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
343
343
|
}
|
|
344
344
|
const children = nodes.map(node => (Object.assign(Object.assign({}, nodeToChild(node)), { node })));
|
|
345
345
|
return (index.h("smoothly-app", null,
|
|
346
|
-
index.h("header",
|
|
346
|
+
index.h("header", { slot: "header" },
|
|
347
347
|
index.h("h1", null,
|
|
348
348
|
index.h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)),
|
|
349
349
|
index.h("nav", null,
|
|
@@ -380,7 +380,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
380
380
|
})
|
|
381
381
|
.map(child => (index.h("li", null, child))))),
|
|
382
382
|
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)),
|
|
383
|
-
index.h("main",
|
|
383
|
+
index.h("main", { slot: "main" },
|
|
384
384
|
index.h(Router.Switch, null, children
|
|
385
385
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
|
386
386
|
.map(child => {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
5
|
+
const index = require('./index-45c42c7c.js');
|
|
6
|
+
const Listenable = require('./Listenable-f6012fc2.js');
|
|
7
7
|
const GoogleFont = require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
require('./index-de46f836.js');
|
|
9
9
|
|
|
@@ -28,6 +28,12 @@ Object.defineProperty(exports, 'Cosmetic', {
|
|
|
28
28
|
});
|
|
29
29
|
exports.Notice = index.Notice;
|
|
30
30
|
exports.redirect = index.redirect;
|
|
31
|
+
Object.defineProperty(exports, 'Icon', {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return Listenable.Icon;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
31
37
|
exports.Listenable = Listenable.Listenable;
|
|
32
38
|
exports.Message = Listenable.Message;
|
|
33
39
|
exports.Trigger = Listenable.Trigger;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-de46f836.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const Listenable = require('./Listenable-
|
|
6
|
+
const index$1 = require('./index-45c42c7c.js');
|
|
7
|
+
const Listenable = require('./Listenable-f6012fc2.js');
|
|
8
8
|
require('./GoogleFont-6c4f0da1.js');
|
|
9
9
|
const getLanguage = require('./getLanguage-430ecf04.js');
|
|
10
10
|
|
|
@@ -115,7 +115,7 @@ const SmoothlyApp = class {
|
|
|
115
115
|
this.color = undefined;
|
|
116
116
|
}
|
|
117
117
|
render() {
|
|
118
|
-
return (index.h("smoothly-notifier", null, index.h("slot", null)));
|
|
118
|
+
return (index.h("smoothly-notifier", null, index.h("slot", { name: "header" }), index.h("slot", { name: "main" }), index.h("slot", null)));
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
SmoothlyApp.style = styleCss$H;
|
|
@@ -20873,7 +20873,7 @@ const SmoothlyIcon = class {
|
|
|
20873
20873
|
}
|
|
20874
20874
|
async loadDocument() {
|
|
20875
20875
|
if (this.name)
|
|
20876
|
-
this.document = await
|
|
20876
|
+
this.document = await Listenable.Icon.load(this.name);
|
|
20877
20877
|
}
|
|
20878
20878
|
async componentWillLoad() {
|
|
20879
20879
|
await this.loadDocument();
|
|
@@ -20891,34 +20891,23 @@ const SmoothlyIcon = class {
|
|
|
20891
20891
|
__stencil_render() {
|
|
20892
20892
|
return [];
|
|
20893
20893
|
}
|
|
20894
|
-
static async fetch(url) {
|
|
20895
|
-
const response = await fetch(url);
|
|
20896
|
-
return response.ok ? response.text() : undefined;
|
|
20897
|
-
}
|
|
20898
|
-
static async load(name) {
|
|
20899
|
-
var _a;
|
|
20900
|
-
const url = `https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg`;
|
|
20901
|
-
return (_a = SmoothlyIcon.cache[url]) !== null && _a !== void 0 ? _a : (SmoothlyIcon.cache[url] = SmoothlyIcon.fetch(url));
|
|
20902
|
-
}
|
|
20903
20894
|
static get watchers() { return {
|
|
20904
20895
|
"name": ["loadDocument"]
|
|
20905
20896
|
}; }
|
|
20906
20897
|
render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
|
|
20907
20898
|
};
|
|
20908
|
-
SmoothlyIcon.cache = {};
|
|
20909
20899
|
SmoothlyIcon.style = styleCss$x;
|
|
20910
20900
|
|
|
20911
|
-
const styleCss$w = "
|
|
20901
|
+
const styleCss$w = ".sc-smoothly-icon-demo-h{display:block;padding:1rem;max-width:900px;margin:auto}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo{display:flex;flex-wrap:wrap;justify-content:center}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo{margin:1.5rem}";
|
|
20912
20902
|
|
|
20913
20903
|
const SmoothlyIconDemo = class {
|
|
20914
20904
|
constructor(hostRef) {
|
|
20915
20905
|
index.registerInstance(this, hostRef);
|
|
20916
|
-
this.page = 0;
|
|
20917
20906
|
}
|
|
20918
20907
|
render() {
|
|
20919
20908
|
return [
|
|
20920
20909
|
index.h("h1", null, "Icons"),
|
|
20921
|
-
index.h("
|
|
20910
|
+
index.h("div", null, [
|
|
20922
20911
|
"add-circle",
|
|
20923
20912
|
"add",
|
|
20924
20913
|
"airplane",
|
|
@@ -21384,9 +21373,7 @@ const SmoothlyIconDemo = class {
|
|
|
21384
21373
|
"volume-mute",
|
|
21385
21374
|
"volume-off",
|
|
21386
21375
|
"woman",
|
|
21387
|
-
]
|
|
21388
|
-
.slice(this.page * 100, 100)
|
|
21389
|
-
.map(name => (index.h("smoothly-icon", { name: name, toolTip: name })))),
|
|
21376
|
+
].map(name => (index.h("smoothly-icon", { name: name, toolTip: name })))),
|
|
21390
21377
|
];
|
|
21391
21378
|
}
|
|
21392
21379
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-de46f836.js');
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
6
|
+
const Listenable = require('./Listenable-f6012fc2.js');
|
|
7
7
|
require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-de46f836.js');
|
|
6
|
-
const Listenable = require('./Listenable-
|
|
6
|
+
const Listenable = require('./Listenable-f6012fc2.js');
|
|
7
7
|
require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
|
@@ -21,7 +21,7 @@ export const App = (attributes, nodes, utils) => {
|
|
|
21
21
|
return utils.map([emptyNode], c => (Object.assign(Object.assign({}, c), child)))[0];
|
|
22
22
|
}
|
|
23
23
|
const children = nodes.map(node => (Object.assign(Object.assign({}, nodeToChild(node)), { node })));
|
|
24
|
-
return (h("smoothly-app", null, h("header",
|
|
24
|
+
return (h("smoothly-app", null, h("header", { slot: "header" }, h("h1", null, h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)), h("nav", null, h("ul", null, utils
|
|
25
25
|
.map([
|
|
26
26
|
...children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "nav-start"; }),
|
|
27
27
|
...children.filter(child => { var _a, _b, _c; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.label) && ((_b = child.vattrs) === null || _b === void 0 ? void 0 : _b.path) && typeof ((_c = child.vattrs) === null || _c === void 0 ? void 0 : _c.path) == "string"; }),
|
|
@@ -52,7 +52,7 @@ export const App = (attributes, nodes, utils) => {
|
|
|
52
52
|
const child = nodeToChild(node);
|
|
53
53
|
return child.vtag == "a" && !((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.target) ? (h("a", Object.assign({}, child.vattrs, href((_b = child.vattrs) === null || _b === void 0 ? void 0 : _b.href)), child.vchildren)) : (node);
|
|
54
54
|
})
|
|
55
|
-
.map(child => (h("li", null, child))))), children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)), h("main",
|
|
55
|
+
.map(child => (h("li", null, child))))), children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)), h("main", { slot: "main" }, h(Router.Switch, null, children
|
|
56
56
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
|
57
57
|
.map(child => {
|
|
58
58
|
var _a, _b, _c, _d, _e;
|
|
@@ -4,7 +4,7 @@ export class SmoothlyApp {
|
|
|
4
4
|
this.color = undefined;
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h("smoothly-notifier", null, h("slot", null)));
|
|
7
|
+
return (h("smoothly-notifier", null, h("slot", { name: "header" }), h("slot", { name: "main" }), h("slot", null)));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "smoothly-app"; }
|
|
10
10
|
static get originalStyleUrls() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Icon } from "../../model";
|
|
1
2
|
export class SmoothlyIcon {
|
|
2
3
|
constructor() {
|
|
3
4
|
this.color = undefined;
|
|
@@ -9,7 +10,7 @@ export class SmoothlyIcon {
|
|
|
9
10
|
}
|
|
10
11
|
async loadDocument() {
|
|
11
12
|
if (this.name)
|
|
12
|
-
this.document = await
|
|
13
|
+
this.document = await Icon.load(this.name);
|
|
13
14
|
}
|
|
14
15
|
async componentWillLoad() {
|
|
15
16
|
await this.loadDocument();
|
|
@@ -27,15 +28,6 @@ export class SmoothlyIcon {
|
|
|
27
28
|
render() {
|
|
28
29
|
return [];
|
|
29
30
|
}
|
|
30
|
-
static async fetch(url) {
|
|
31
|
-
const response = await fetch(url);
|
|
32
|
-
return response.ok ? response.text() : undefined;
|
|
33
|
-
}
|
|
34
|
-
static async load(name) {
|
|
35
|
-
var _a;
|
|
36
|
-
const url = `https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg`;
|
|
37
|
-
return (_a = SmoothlyIcon.cache[url]) !== null && _a !== void 0 ? _a : (SmoothlyIcon.cache[url] = SmoothlyIcon.fetch(url));
|
|
38
|
-
}
|
|
39
31
|
static get is() { return "smoothly-icon"; }
|
|
40
32
|
static get encapsulation() { return "scoped"; }
|
|
41
33
|
static get originalStyleUrls() {
|
|
@@ -161,4 +153,3 @@ export class SmoothlyIcon {
|
|
|
161
153
|
}];
|
|
162
154
|
}
|
|
163
155
|
}
|
|
164
|
-
SmoothlyIcon.cache = {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class SmoothlyIconDemo {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.page = 0;
|
|
5
|
-
}
|
|
6
3
|
render() {
|
|
7
4
|
return [
|
|
8
5
|
h("h1", null, "Icons"),
|
|
9
|
-
h("
|
|
6
|
+
h("div", null, [
|
|
10
7
|
"add-circle",
|
|
11
8
|
"add",
|
|
12
9
|
"airplane",
|
|
@@ -472,9 +469,7 @@ export class SmoothlyIconDemo {
|
|
|
472
469
|
"volume-mute",
|
|
473
470
|
"volume-off",
|
|
474
471
|
"woman",
|
|
475
|
-
]
|
|
476
|
-
.slice(this.page * 100, 100)
|
|
477
|
-
.map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
472
|
+
].map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
478
473
|
];
|
|
479
474
|
}
|
|
480
475
|
static get is() { return "smoothly-icon-demo"; }
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
padding: 1rem;
|
|
4
|
+
max-width: 900px;
|
|
5
|
+
margin: auto;
|
|
3
6
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
icon-demo > content {
|
|
7
|
+
|
|
8
|
+
:host > div {
|
|
8
9
|
display: flex;
|
|
9
|
-
flex-
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
justify-content: center;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
:host > div > smoothly-icon {
|
|
15
|
+
margin: 1.5rem;
|
|
13
16
|
}
|
package/dist/collection/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { App, redirect } from "./components/App";
|
|
2
|
-
export { ClientIdentifier, GoogleFont, Message, Notice, Trigger, Listenable, } from "./model";
|
|
2
|
+
export { ClientIdentifier, GoogleFont, Icon, Message, Notice, Trigger, Listenable, } from "./model";
|
|
3
3
|
export { Cosmetic } from "./utilities";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export var Icon;
|
|
2
|
+
(function (Icon) {
|
|
3
|
+
const names = {
|
|
4
|
+
"*": "https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg",
|
|
5
|
+
};
|
|
6
|
+
const cache = {};
|
|
7
|
+
async function fetch(url) {
|
|
8
|
+
const response = await globalThis.fetch(url);
|
|
9
|
+
return response.ok ? response.text() : undefined;
|
|
10
|
+
}
|
|
11
|
+
async function load(name) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const url = ((_a = names[name]) !== null && _a !== void 0 ? _a : names["*"]).replace("${name}", name);
|
|
14
|
+
return (_b = cache[url]) !== null && _b !== void 0 ? _b : (cache[url] = fetch(url));
|
|
15
|
+
}
|
|
16
|
+
Icon.load = load;
|
|
17
|
+
function add(url, ...name) {
|
|
18
|
+
for (const n of name)
|
|
19
|
+
names[n] = url;
|
|
20
|
+
}
|
|
21
|
+
Icon.add = add;
|
|
22
|
+
})(Icon || (Icon = {}));
|
|
@@ -348,7 +348,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
348
348
|
}
|
|
349
349
|
const children = nodes.map(node => (Object.assign(Object.assign({}, nodeToChild(node)), { node })));
|
|
350
350
|
return (h("smoothly-app", null,
|
|
351
|
-
h("header",
|
|
351
|
+
h("header", { slot: "header" },
|
|
352
352
|
h("h1", null,
|
|
353
353
|
h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)),
|
|
354
354
|
h("nav", null,
|
|
@@ -385,7 +385,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
385
385
|
})
|
|
386
386
|
.map(child => (h("li", null, child))))),
|
|
387
387
|
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)),
|
|
388
|
-
h("main",
|
|
388
|
+
h("main", { slot: "main" },
|
|
389
389
|
h(Router.Switch, null, children
|
|
390
390
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
|
391
391
|
.map(child => {
|
|
@@ -1091,6 +1091,29 @@ var GoogleFont;
|
|
|
1091
1091
|
GoogleFont.styleImportString = styleImportString;
|
|
1092
1092
|
})(GoogleFont || (GoogleFont = {}));
|
|
1093
1093
|
|
|
1094
|
+
var Icon;
|
|
1095
|
+
(function (Icon) {
|
|
1096
|
+
const names = {
|
|
1097
|
+
"*": "https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg",
|
|
1098
|
+
};
|
|
1099
|
+
const cache = {};
|
|
1100
|
+
async function fetch(url) {
|
|
1101
|
+
const response = await globalThis.fetch(url);
|
|
1102
|
+
return response.ok ? response.text() : undefined;
|
|
1103
|
+
}
|
|
1104
|
+
async function load(name) {
|
|
1105
|
+
var _a, _b;
|
|
1106
|
+
const url = ((_a = names[name]) !== null && _a !== void 0 ? _a : names["*"]).replace("${name}", name);
|
|
1107
|
+
return (_b = cache[url]) !== null && _b !== void 0 ? _b : (cache[url] = fetch(url));
|
|
1108
|
+
}
|
|
1109
|
+
Icon.load = load;
|
|
1110
|
+
function add(url, ...name) {
|
|
1111
|
+
for (const n of name)
|
|
1112
|
+
names[n] = url;
|
|
1113
|
+
}
|
|
1114
|
+
Icon.add = add;
|
|
1115
|
+
})(Icon || (Icon = {}));
|
|
1116
|
+
|
|
1094
1117
|
class Message {
|
|
1095
1118
|
static is(value) {
|
|
1096
1119
|
return typeof value == "object" && typeof value.destination == "string" && value.content != undefined;
|
|
@@ -1758,7 +1781,7 @@ const SmoothlyApp$1 = class extends HTMLElement {
|
|
|
1758
1781
|
this.color = undefined;
|
|
1759
1782
|
}
|
|
1760
1783
|
render() {
|
|
1761
|
-
return (h("smoothly-notifier", null, h("slot", null)));
|
|
1784
|
+
return (h("smoothly-notifier", null, h("slot", { name: "header" }), h("slot", { name: "main" }), h("slot", null)));
|
|
1762
1785
|
}
|
|
1763
1786
|
static get style() { return styleCss$L; }
|
|
1764
1787
|
};
|
|
@@ -46490,7 +46513,7 @@ const SmoothlyIcon$1 = class extends HTMLElement {
|
|
|
46490
46513
|
}
|
|
46491
46514
|
async loadDocument() {
|
|
46492
46515
|
if (this.name)
|
|
46493
|
-
this.document = await
|
|
46516
|
+
this.document = await Icon.load(this.name);
|
|
46494
46517
|
}
|
|
46495
46518
|
async componentWillLoad() {
|
|
46496
46519
|
await this.loadDocument();
|
|
@@ -46508,35 +46531,24 @@ const SmoothlyIcon$1 = class extends HTMLElement {
|
|
|
46508
46531
|
__stencil_render() {
|
|
46509
46532
|
return [];
|
|
46510
46533
|
}
|
|
46511
|
-
static async fetch(url) {
|
|
46512
|
-
const response = await fetch(url);
|
|
46513
|
-
return response.ok ? response.text() : undefined;
|
|
46514
|
-
}
|
|
46515
|
-
static async load(name) {
|
|
46516
|
-
var _a;
|
|
46517
|
-
const url = `https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg`;
|
|
46518
|
-
return (_a = SmoothlyIcon$1.cache[url]) !== null && _a !== void 0 ? _a : (SmoothlyIcon$1.cache[url] = SmoothlyIcon$1.fetch(url));
|
|
46519
|
-
}
|
|
46520
46534
|
static get watchers() { return {
|
|
46521
46535
|
"name": ["loadDocument"]
|
|
46522
46536
|
}; }
|
|
46523
46537
|
static get style() { return styleCss$B; }
|
|
46524
46538
|
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
|
46525
46539
|
};
|
|
46526
|
-
SmoothlyIcon$1.cache = {};
|
|
46527
46540
|
|
|
46528
|
-
const styleCss$A = "
|
|
46541
|
+
const styleCss$A = ".sc-smoothly-icon-demo-h{display:block;padding:1rem;max-width:900px;margin:auto}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo{display:flex;flex-wrap:wrap;justify-content:center}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo{margin:1.5rem}";
|
|
46529
46542
|
|
|
46530
46543
|
const SmoothlyIconDemo$1 = class extends HTMLElement {
|
|
46531
46544
|
constructor() {
|
|
46532
46545
|
super();
|
|
46533
46546
|
this.__registerHost();
|
|
46534
|
-
this.page = 0;
|
|
46535
46547
|
}
|
|
46536
46548
|
render() {
|
|
46537
46549
|
return [
|
|
46538
46550
|
h("h1", null, "Icons"),
|
|
46539
|
-
h("
|
|
46551
|
+
h("div", null, [
|
|
46540
46552
|
"add-circle",
|
|
46541
46553
|
"add",
|
|
46542
46554
|
"airplane",
|
|
@@ -47002,9 +47014,7 @@ const SmoothlyIconDemo$1 = class extends HTMLElement {
|
|
|
47002
47014
|
"volume-mute",
|
|
47003
47015
|
"volume-off",
|
|
47004
47016
|
"woman",
|
|
47005
|
-
]
|
|
47006
|
-
.slice(this.page * 100, 100)
|
|
47007
|
-
.map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
47017
|
+
].map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
47008
47018
|
];
|
|
47009
47019
|
}
|
|
47010
47020
|
static get style() { return styleCss$A; }
|
|
@@ -49039,4 +49049,4 @@ const defineCustomElements = (opts) => {
|
|
|
49039
49049
|
}
|
|
49040
49050
|
};
|
|
49041
49051
|
|
|
49042
|
-
export { App, ClientIdentifier, Cosmetic, GoogleFont, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements, redirect };
|
|
49052
|
+
export { App, ClientIdentifier, Cosmetic, GoogleFont, Icon, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements, redirect };
|
|
@@ -654,6 +654,29 @@ var Token;
|
|
|
654
654
|
Token.is = is;
|
|
655
655
|
})(Token || (Token = {}));
|
|
656
656
|
|
|
657
|
+
var Icon;
|
|
658
|
+
(function (Icon) {
|
|
659
|
+
const names = {
|
|
660
|
+
"*": "https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg",
|
|
661
|
+
};
|
|
662
|
+
const cache = {};
|
|
663
|
+
async function fetch(url) {
|
|
664
|
+
const response = await globalThis.fetch(url);
|
|
665
|
+
return response.ok ? response.text() : undefined;
|
|
666
|
+
}
|
|
667
|
+
async function load(name) {
|
|
668
|
+
var _a, _b;
|
|
669
|
+
const url = ((_a = names[name]) !== null && _a !== void 0 ? _a : names["*"]).replace("${name}", name);
|
|
670
|
+
return (_b = cache[url]) !== null && _b !== void 0 ? _b : (cache[url] = fetch(url));
|
|
671
|
+
}
|
|
672
|
+
Icon.load = load;
|
|
673
|
+
function add(url, ...name) {
|
|
674
|
+
for (const n of name)
|
|
675
|
+
names[n] = url;
|
|
676
|
+
}
|
|
677
|
+
Icon.add = add;
|
|
678
|
+
})(Icon || (Icon = {}));
|
|
679
|
+
|
|
657
680
|
class Message {
|
|
658
681
|
static is(value) {
|
|
659
682
|
return typeof value == "object" && typeof value.destination == "string" && value.content != undefined;
|
|
@@ -751,4 +774,4 @@ class Listenable {
|
|
|
751
774
|
}
|
|
752
775
|
_Listenable_listeners = new WeakMap();
|
|
753
776
|
|
|
754
|
-
export { Identifier as I, Listenable as L, Message as M, Trigger as T };
|
|
777
|
+
export { Identifier as I, Listenable as L, Message as M, Trigger as T, Icon as a };
|
|
@@ -341,7 +341,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
341
341
|
}
|
|
342
342
|
const children = nodes.map(node => (Object.assign(Object.assign({}, nodeToChild(node)), { node })));
|
|
343
343
|
return (h("smoothly-app", null,
|
|
344
|
-
h("header",
|
|
344
|
+
h("header", { slot: "header" },
|
|
345
345
|
h("h1", null,
|
|
346
346
|
h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)),
|
|
347
347
|
h("nav", null,
|
|
@@ -378,7 +378,7 @@ const App = (attributes, nodes, utils) => {
|
|
|
378
378
|
})
|
|
379
379
|
.map(child => (h("li", null, child))))),
|
|
380
380
|
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)),
|
|
381
|
-
h("main",
|
|
381
|
+
h("main", { slot: "main" },
|
|
382
382
|
h(Router.Switch, null, children
|
|
383
383
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
|
384
384
|
.map(child => {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-
|
|
2
|
-
import { I as Identifier } from './Listenable-
|
|
3
|
-
export { L as Listenable, M as Message, T as Trigger } from './Listenable-
|
|
1
|
+
export { A as App, C as Cosmetic, N as Notice, r as redirect } from './index-9594f9bc.js';
|
|
2
|
+
import { I as Identifier } from './Listenable-34b047d8.js';
|
|
3
|
+
export { a as Icon, L as Listenable, M as Message, T as Trigger } from './Listenable-34b047d8.js';
|
|
4
4
|
export { G as GoogleFont } from './GoogleFont-8474516b.js';
|
|
5
5
|
import './index-d3421c35.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as getElement, c as createEvent, H as Host } from './index-d3421c35.js';
|
|
2
|
-
import { r as redirect, A as App, N as Notice } from './index-
|
|
3
|
-
import { T as Trigger, M as Message } from './Listenable-
|
|
2
|
+
import { r as redirect, A as App, N as Notice } from './index-9594f9bc.js';
|
|
3
|
+
import { T as Trigger, M as Message, a as Icon } from './Listenable-34b047d8.js';
|
|
4
4
|
import './GoogleFont-8474516b.js';
|
|
5
5
|
import { D as Date$1, L as Language, g as getLanguage, a as DateTime, b as Locale, c as Language$1, C as Currency, d as DateRange } from './getLanguage-cccb8418.js';
|
|
6
6
|
|
|
@@ -111,7 +111,7 @@ const SmoothlyApp = class {
|
|
|
111
111
|
this.color = undefined;
|
|
112
112
|
}
|
|
113
113
|
render() {
|
|
114
|
-
return (h("smoothly-notifier", null, h("slot", null)));
|
|
114
|
+
return (h("smoothly-notifier", null, h("slot", { name: "header" }), h("slot", { name: "main" }), h("slot", null)));
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
SmoothlyApp.style = styleCss$H;
|
|
@@ -20869,7 +20869,7 @@ const SmoothlyIcon = class {
|
|
|
20869
20869
|
}
|
|
20870
20870
|
async loadDocument() {
|
|
20871
20871
|
if (this.name)
|
|
20872
|
-
this.document = await
|
|
20872
|
+
this.document = await Icon.load(this.name);
|
|
20873
20873
|
}
|
|
20874
20874
|
async componentWillLoad() {
|
|
20875
20875
|
await this.loadDocument();
|
|
@@ -20887,34 +20887,23 @@ const SmoothlyIcon = class {
|
|
|
20887
20887
|
__stencil_render() {
|
|
20888
20888
|
return [];
|
|
20889
20889
|
}
|
|
20890
|
-
static async fetch(url) {
|
|
20891
|
-
const response = await fetch(url);
|
|
20892
|
-
return response.ok ? response.text() : undefined;
|
|
20893
|
-
}
|
|
20894
|
-
static async load(name) {
|
|
20895
|
-
var _a;
|
|
20896
|
-
const url = `https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg`;
|
|
20897
|
-
return (_a = SmoothlyIcon.cache[url]) !== null && _a !== void 0 ? _a : (SmoothlyIcon.cache[url] = SmoothlyIcon.fetch(url));
|
|
20898
|
-
}
|
|
20899
20890
|
static get watchers() { return {
|
|
20900
20891
|
"name": ["loadDocument"]
|
|
20901
20892
|
}; }
|
|
20902
20893
|
render() { return h(Host, this.hostData(), this.__stencil_render()); }
|
|
20903
20894
|
};
|
|
20904
|
-
SmoothlyIcon.cache = {};
|
|
20905
20895
|
SmoothlyIcon.style = styleCss$x;
|
|
20906
20896
|
|
|
20907
|
-
const styleCss$w = "
|
|
20897
|
+
const styleCss$w = ".sc-smoothly-icon-demo-h{display:block;padding:1rem;max-width:900px;margin:auto}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo{display:flex;flex-wrap:wrap;justify-content:center}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo{margin:1.5rem}";
|
|
20908
20898
|
|
|
20909
20899
|
const SmoothlyIconDemo = class {
|
|
20910
20900
|
constructor(hostRef) {
|
|
20911
20901
|
registerInstance(this, hostRef);
|
|
20912
|
-
this.page = 0;
|
|
20913
20902
|
}
|
|
20914
20903
|
render() {
|
|
20915
20904
|
return [
|
|
20916
20905
|
h("h1", null, "Icons"),
|
|
20917
|
-
h("
|
|
20906
|
+
h("div", null, [
|
|
20918
20907
|
"add-circle",
|
|
20919
20908
|
"add",
|
|
20920
20909
|
"airplane",
|
|
@@ -21380,9 +21369,7 @@ const SmoothlyIconDemo = class {
|
|
|
21380
21369
|
"volume-mute",
|
|
21381
21370
|
"volume-off",
|
|
21382
21371
|
"woman",
|
|
21383
|
-
]
|
|
21384
|
-
.slice(this.page * 100, 100)
|
|
21385
|
-
.map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
21372
|
+
].map(name => (h("smoothly-icon", { name: name, toolTip: name })))),
|
|
21386
21373
|
];
|
|
21387
21374
|
}
|
|
21388
21375
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-d3421c35.js';
|
|
2
|
-
import { T as Trigger, M as Message } from './Listenable-
|
|
2
|
+
import { T as Trigger, M as Message } from './Listenable-34b047d8.js';
|
|
3
3
|
import './GoogleFont-8474516b.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-d3421c35.js';
|
|
2
|
-
import { M as Message, T as Trigger } from './Listenable-
|
|
2
|
+
import { M as Message, T as Trigger } from './Listenable-34b047d8.js';
|
|
3
3
|
import './GoogleFont-8474516b.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as App,C as Cosmetic,N as Notice,r as redirect}from"./p-
|
|
1
|
+
export{A as App,C as Cosmetic,N as Notice,r as redirect}from"./p-03c10101.js";import{I as e}from"./p-e6cb38de.js";export{a as Icon,L as Listenable,M as Message,T as Trigger}from"./p-e6cb38de.js";export{G as GoogleFont}from"./p-bd478a53.js";import"./p-4a0b35b7.js";class o{constructor(){}static get value(){return o.valueCache=localStorage.getItem("clientIdentifier")||void 0,o.valueCache||(o.valueCache=e.generate(12),localStorage.setItem("clientIdentifier",o.valueCache)),o.valueCache}}export{o as ClientIdentifier}
|