@functionalcms/svelte-components 2.3.1 → 2.3.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/components/Logo.svelte +19 -19
- package/dist/components/layouts/DefaultLayout.svelte +11 -15
- package/dist/components/layouts/DefaultLayout.svelte.d.ts +1 -2
- package/dist/components/menu/FlatMenu.svelte +2 -2
- package/dist/components/menu/FlatMenu.svelte.d.ts +2 -0
- package/dist/components/menu/HamburgerMenu.svelte +2 -2
- package/dist/components/menu/HamburgerMenu.svelte.d.ts +2 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/stores/meta.d.ts +2 -6
- package/dist/stores/meta.js +2 -11
- package/dist/stores/pages.d.ts +3 -5
- package/dist/stores/pages.js +10 -9
- package/dist/stores/title.d.ts +2 -5
- package/dist/stores/title.js +7 -7
- package/package.json +11 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<style>
|
|
2
|
-
a {
|
|
3
|
-
display: var(--functional-logo-display, 'inline-block');
|
|
4
|
-
}
|
|
5
|
-
a img {
|
|
6
|
-
width: 80vw;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@media (min-width: 960px) {
|
|
10
|
-
a img {
|
|
11
|
-
width: 100%;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
|
|
1
|
+
<style>
|
|
2
|
+
a {
|
|
3
|
+
display: var(--functional-logo-display, 'inline-block');
|
|
4
|
+
}
|
|
5
|
+
a img {
|
|
6
|
+
width: 80vw;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (min-width: 960px) {
|
|
10
|
+
a img {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
|
|
16
16
|
<script>export let companyName;
|
|
17
17
|
export let logoUrl;
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<a href="/">
|
|
21
|
-
<img src={logoUrl} alt={companyName} />
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<a href="/">
|
|
21
|
+
<img src={logoUrl} alt={companyName} />
|
|
22
22
|
</a>
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<script>import { page } from "$app/stores";
|
|
2
|
-
import { title } from "
|
|
3
|
-
import {
|
|
4
|
-
export let
|
|
5
|
-
export let index = true;
|
|
6
|
-
$:
|
|
7
|
-
robots = `${follow ? "follow" : "nofollow"}${index ? "index" : "noindex"}`;
|
|
2
|
+
import { title, suffix } from "../../stores/title";
|
|
3
|
+
import { metaDescription, metaKeywords } from "../../stores/meta";
|
|
4
|
+
export let robots = "index, follow";
|
|
8
5
|
</script>
|
|
9
6
|
|
|
10
7
|
<svelte:head>
|
|
@@ -12,17 +9,16 @@ $:
|
|
|
12
9
|
data-goatcounter="https://tracking.functional-cms.com/count"
|
|
13
10
|
async
|
|
14
11
|
src="//gc.zgo.at/count.js"></script>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<meta name="og:title" property="og:title" content="{$title}" />
|
|
18
|
-
<meta name="twitter:card" content="{$title}" />
|
|
19
|
-
|
|
12
|
+
|
|
13
|
+
<title>{$title}{$suffix}</title>
|
|
14
|
+
<meta name="og:title" property="og:title" content="{$title}{$suffix}" />
|
|
15
|
+
<meta name="twitter:card" content="{$title}{$suffix}" />
|
|
16
|
+
|
|
20
17
|
<meta name="robots" content={robots} />
|
|
21
|
-
<meta name="description" content={
|
|
22
|
-
<meta name="keywords" content={
|
|
18
|
+
<meta name="description" content={$metaDescription} />
|
|
19
|
+
<meta name="keywords" content={$metaKeywords} />
|
|
23
20
|
<meta name=”viewport” content="width=device-width, initial-scale=1.0" />
|
|
24
21
|
</svelte:head>
|
|
25
|
-
|
|
26
22
|
<div>
|
|
27
23
|
{#if $$slots.header}
|
|
28
24
|
<header>
|
|
@@ -46,7 +42,7 @@ $:
|
|
|
46
42
|
</footer>
|
|
47
43
|
{/if}
|
|
48
44
|
<noscript>
|
|
49
|
-
<img src="https://tracking.functional-cms.com/count?p=/{$page.url.pathname}}" />
|
|
45
|
+
<img src="https://tracking.functional-cms.com/count?p=/{$page.url.pathname}}" alt="" />
|
|
50
46
|
</noscript>
|
|
51
47
|
|
|
52
48
|
<style>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<script>import { Visiblity, HeaderNavigationItem } from "./Menu.js";
|
|
86
86
|
import { afterNavigate } from "$app/navigation";
|
|
87
87
|
import { page } from "$app/stores";
|
|
88
|
-
|
|
88
|
+
export let pages = [];
|
|
89
89
|
export let authentication = false;
|
|
90
90
|
export let css = "";
|
|
91
91
|
const selectVisible = (pages2, visiblity) => pages2.filter(
|
|
@@ -94,7 +94,7 @@ const selectVisible = (pages2, visiblity) => pages2.filter(
|
|
|
94
94
|
$:
|
|
95
95
|
visibility = authentication ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
|
|
96
96
|
$:
|
|
97
|
-
visibleNavItems = selectVisible(
|
|
97
|
+
visibleNavItems = selectVisible(pages, visibility);
|
|
98
98
|
$:
|
|
99
99
|
selected = false;
|
|
100
100
|
afterNavigate((navigation) => selected = false);
|
|
@@ -30,7 +30,7 @@ import { afterNavigate } from "$app/navigation";
|
|
|
30
30
|
import { Drawer, Button } from "agnostic-svelte";
|
|
31
31
|
import { page } from "$app/stores";
|
|
32
32
|
import { Placement } from "../Styling.js";
|
|
33
|
-
|
|
33
|
+
export let pages = [];
|
|
34
34
|
export let authentication = false;
|
|
35
35
|
export let css = "";
|
|
36
36
|
export let noBorder = false;
|
|
@@ -41,7 +41,7 @@ const selectVisible = (pages2, visiblity) => pages2.filter(
|
|
|
41
41
|
$:
|
|
42
42
|
visibility = authentication ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
|
|
43
43
|
$:
|
|
44
|
-
visibleNavItems = selectVisible(
|
|
44
|
+
visibleNavItems = selectVisible(pages, visibility);
|
|
45
45
|
let drawer = null;
|
|
46
46
|
const assignDrawerRef = (ev) => {
|
|
47
47
|
drawer = ev.detail.instance;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { HeaderNavigationItem } from './Menu.js';
|
|
2
3
|
import { Placement } from '../Styling.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
6
|
+
pages?: HeaderNavigationItem[] | undefined;
|
|
5
7
|
authentication?: boolean | undefined;
|
|
6
8
|
css?: string | undefined;
|
|
7
9
|
noBorder?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ import Logo from './components/Logo.svelte';
|
|
|
7
7
|
import SimpleFooter from './components/SimpleFooter.svelte';
|
|
8
8
|
import Spacer from './components/Spacer.svelte';
|
|
9
9
|
import Well from './components/Well.svelte';
|
|
10
|
-
import { title } from './stores/title.js';
|
|
10
|
+
import { title, suffix } from './stores/title.js';
|
|
11
11
|
import { pages } from './stores/pages.js';
|
|
12
|
-
import {
|
|
12
|
+
import { metaDescription, metaKeywords } from './stores/meta.js';
|
|
13
13
|
import { Justify, Placement, Orientation, Position, Sizes } from './components/Styling.js';
|
|
14
14
|
import { Alert, Avatar, AvatarGroup, Breadcrumb, Button, ButtonGroup, Card, ChoiceInput, Close, Dialog, Disclose, Divider, Drawer, EmptyState, Header, HeaderNav, HeaderNavItem, Icon, IconSvg, Input, InputAddonItem, Loader, Menu, MenuItem, Pagination, Progress, Select, Spinner, Switch, Table, Tabs, Tag, Toast, Toasts } from 'agnostic-svelte';
|
|
15
|
-
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, title, pages,
|
|
15
|
+
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, title, suffix, pages, metaDescription, metaKeywords, Alert, Avatar, AvatarGroup, Breadcrumb, Button, ButtonGroup, Card, ChoiceInput, Close, Dialog, Disclose, Divider, Drawer, EmptyState, Header, HeaderNav, HeaderNavItem, Icon, IconSvg, Input, InputAddonItem, Loader, Menu, MenuItem, Pagination, Progress, Select, Spinner, Switch, Table, Tabs, Tag, Toast, Toasts };
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import Logo from './components/Logo.svelte';
|
|
|
8
8
|
import SimpleFooter from './components/SimpleFooter.svelte';
|
|
9
9
|
import Spacer from './components/Spacer.svelte';
|
|
10
10
|
import Well from './components/Well.svelte';
|
|
11
|
-
import { title } from './stores/title.js';
|
|
11
|
+
import { title, suffix } from './stores/title.js';
|
|
12
12
|
import { pages } from './stores/pages.js';
|
|
13
|
-
import {
|
|
13
|
+
import { metaDescription, metaKeywords } from './stores/meta.js';
|
|
14
14
|
import { Justify, Placement, Orientation, Position, Sizes } from './components/Styling.js';
|
|
15
15
|
import { Alert, Avatar, AvatarGroup, Breadcrumb, Button, ButtonGroup, Card, ChoiceInput, Close, Dialog, Disclose, Divider, Drawer, EmptyState, Header, HeaderNav, HeaderNavItem, Icon, IconSvg, Input, InputAddonItem, Loader, Menu, MenuItem, Pagination, Progress, Select, Spinner, Switch, Table, Tabs, Tag, Toast, Toasts } from 'agnostic-svelte';
|
|
16
|
-
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, title, pages,
|
|
16
|
+
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, title, suffix, pages, metaDescription, metaKeywords, Alert, Avatar, AvatarGroup, Breadcrumb, Button, ButtonGroup, Card, ChoiceInput, Close, Dialog, Disclose, Divider, Drawer, EmptyState, Header, HeaderNav, HeaderNavItem, Icon, IconSvg, Input, InputAddonItem, Loader, Menu, MenuItem, Pagination, Progress, Select, Spinner, Switch, Table, Tabs, Tag, Toast, Toasts };
|
package/dist/stores/meta.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/// <reference types="svelte" />
|
|
2
2
|
import { type Writable } from 'svelte/store';
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
keywords: Writable<string>;
|
|
6
|
-
setDescription: (descriptionText: string) => void;
|
|
7
|
-
setKeywords: (keywordsText: string) => void;
|
|
8
|
-
};
|
|
3
|
+
export declare const metaDescription: Writable<string>;
|
|
4
|
+
export declare const metaKeywords: Writable<string>;
|
package/dist/stores/meta.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { get, writable } from 'svelte/store';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const keywords = writable("");
|
|
5
|
-
return {
|
|
6
|
-
description,
|
|
7
|
-
keywords,
|
|
8
|
-
setDescription: (descriptionText) => description.set(descriptionText),
|
|
9
|
-
setKeywords: (keywordsText) => description.set(keywordsText),
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export const meta = createMeta();
|
|
2
|
+
export const metaDescription = writable("");
|
|
3
|
+
export const metaKeywords = writable("");
|
package/dist/stores/pages.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="svelte" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
initialise: (pages: Array<HeaderNavigationItem>) => void;
|
|
6
|
-
};
|
|
2
|
+
import { type Writable } from 'svelte/store';
|
|
3
|
+
import { HeaderNavigationItem } from "../components/menu/Menu.js";
|
|
4
|
+
export declare const pages: Writable<HeaderNavigationItem[]>;
|
package/dist/stores/pages.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
|
-
import { HeaderNavigationItem } from "
|
|
3
|
-
function createPages() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export const pages = createPages();
|
|
2
|
+
import { HeaderNavigationItem } from "../components/menu/Menu.js";
|
|
3
|
+
// function createPages() {
|
|
4
|
+
// const pages: Writable<Array<HeaderNavigationItem>> = writable(new Array<HeaderNavigationItem>());
|
|
5
|
+
// return {
|
|
6
|
+
// subscribe: pages.subscribe,
|
|
7
|
+
// initialise: (pagesList: Array<HeaderNavigationItem>) => pages.set(pagesList)
|
|
8
|
+
// };
|
|
9
|
+
// }
|
|
10
|
+
// export const pages = createPages();
|
|
11
|
+
export const pages = writable(new Array());
|
package/dist/stores/title.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
/// <reference types="svelte" />
|
|
2
|
-
export declare const title:
|
|
3
|
-
|
|
4
|
-
setTitleSuffix: (suffix: string) => void;
|
|
5
|
-
setTitle: (title: string) => void;
|
|
6
|
-
};
|
|
2
|
+
export declare const title: import("svelte/store").Writable<string>;
|
|
3
|
+
export declare const suffix: import("svelte/store").Writable<string>;
|
package/dist/stores/title.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { get, writable } from 'svelte/store';
|
|
2
2
|
function createTitle() {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
return {
|
|
6
|
-
subscribe,
|
|
7
|
-
setTitleSuffix: (suffix) => titleSuffix.set(suffix),
|
|
8
|
-
setTitle: (title) => set(`${title}${get(titleSuffix)}`)
|
|
9
|
-
};
|
|
3
|
+
const title = writable("");
|
|
4
|
+
return title;
|
|
10
5
|
}
|
|
11
6
|
export const title = createTitle();
|
|
7
|
+
function createSuffix() {
|
|
8
|
+
const suffix = writable("");
|
|
9
|
+
return suffix;
|
|
10
|
+
}
|
|
11
|
+
export const suffix = createSuffix();
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionalcms/svelte-components",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
|
+
"watch": {
|
|
5
|
+
"build": {
|
|
6
|
+
"patterns": ["src"],
|
|
7
|
+
"extensions": "ts,svelte",
|
|
8
|
+
"legacyWatch": true
|
|
9
|
+
}
|
|
10
|
+
},
|
|
4
11
|
"scripts": {
|
|
5
12
|
"dev": "vite dev",
|
|
6
13
|
"build-css": "sass ./src/lib/css/properties.scss ./css/functional.css",
|
|
@@ -9,7 +16,8 @@
|
|
|
9
16
|
"package": "npm run build-css && svelte-kit sync && svelte-package && publint",
|
|
10
17
|
"prepublishOnly": "npm run package",
|
|
11
18
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
12
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
|
19
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
20
|
+
"watch": "npm-watch build"
|
|
13
21
|
},
|
|
14
22
|
"exports": {
|
|
15
23
|
".": {
|
|
@@ -36,6 +44,7 @@
|
|
|
36
44
|
"@sveltejs/package": "^2.2.5",
|
|
37
45
|
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
|
38
46
|
"agnostic-svelte": "^1.1.27",
|
|
47
|
+
"npm-watch": "^0.11.0",
|
|
39
48
|
"publint": "^0.2.7",
|
|
40
49
|
"sass": "^1.69.7",
|
|
41
50
|
"svelte": "^4.2.8",
|