@functionalcms/svelte-components 2.3.0 → 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/layouts/DefaultLayout.svelte +11 -15
- package/dist/components/layouts/DefaultLayout.svelte.d.ts +1 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- 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,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>
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +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, suffix } from './stores/title.js';
|
|
11
|
+
import { pages } from './stores/pages.js';
|
|
12
|
+
import { metaDescription, metaKeywords } from './stores/meta.js';
|
|
10
13
|
import { Justify, Placement, Orientation, Position, Sizes } from './components/Styling.js';
|
|
11
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';
|
|
12
|
-
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, 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 };
|
|
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,6 +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, suffix } from './stores/title.js';
|
|
12
|
+
import { pages } from './stores/pages.js';
|
|
13
|
+
import { metaDescription, metaKeywords } from './stores/meta.js';
|
|
11
14
|
import { Justify, Placement, Orientation, Position, Sizes } from './components/Styling.js';
|
|
12
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';
|
|
13
|
-
export { FlatMenu, HamburgerMenu, Visiblity, HeaderNavigationItem, Banner, DefaultLayout, Logo, SimpleFooter, Spacer, Well, Justify, Placement, Orientation, Position, Sizes, 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 };
|
|
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 title = 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",
|