@quaffui/quaff 0.1.0-prealpha3 → 0.1.0-prealpha5
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/avatar/props.js +1 -1
- package/dist/components/button/QBtn.svelte +1 -0
- package/dist/components/button/QBtn.svelte.d.ts +1 -0
- package/dist/components/codeBlock/QCodeBlock.svelte +8 -9
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +1 -3
- package/dist/composables/use-router-link.js +0 -1
- package/dist/global.d.ts +0 -1
- package/dist/stores/Quaff.d.ts +5 -5
- package/dist/stores/Quaff.js +2 -1
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "prism-svelte";
|
|
1
|
+
<script>import Highlight from "svelte-highlight";
|
|
2
|
+
import typescript from "svelte-highlight/languages/typescript";
|
|
3
|
+
import "svelte-highlight/styles/material.css";
|
|
5
4
|
import { QBtn } from "../..";
|
|
6
5
|
export let language, code = "/* No code found */", title = void 0, copiable = void 0;
|
|
7
6
|
let btnContent = "Copy";
|
|
8
7
|
let btnColor = "primary";
|
|
9
|
-
$:
|
|
10
|
-
highlighted = Prism.highlight(code, Prism.languages[language], language);
|
|
11
8
|
async function copyCode() {
|
|
12
9
|
try {
|
|
13
10
|
if (navigator.clipboard.write) {
|
|
@@ -36,8 +33,10 @@ async function copyCode() {
|
|
|
36
33
|
|
|
37
34
|
<div class="q-code-block">
|
|
38
35
|
{#if copiable}
|
|
39
|
-
<div class="flex between-align middle-align q-pb-sm">
|
|
40
|
-
|
|
36
|
+
<div class="flex between-align {title ? 'middle' : 'right'}-align q-pb-sm">
|
|
37
|
+
{#if title}
|
|
38
|
+
<h4 class="q-ma-none q-pr-lg">{title}</h4>
|
|
39
|
+
{/if}
|
|
41
40
|
<QBtn
|
|
42
41
|
class="{btnColor}-border {btnColor}-text"
|
|
43
42
|
size="sm"
|
|
@@ -51,7 +50,7 @@ async function copyCode() {
|
|
|
51
50
|
{:else if title}
|
|
52
51
|
<h4>{title}</h4>
|
|
53
52
|
{/if}
|
|
54
|
-
<
|
|
53
|
+
<Highlight language={typescript} {code} />
|
|
55
54
|
</div>
|
|
56
55
|
|
|
57
56
|
<style>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import "
|
|
3
|
-
import "prismjs/components/prism-typescript";
|
|
4
|
-
import "prism-svelte";
|
|
2
|
+
import "svelte-highlight/styles/material.css";
|
|
5
3
|
import type { QCodeBlockProps } from "./props";
|
|
6
4
|
declare const __propDef: {
|
|
7
5
|
props: {
|
package/dist/global.d.ts
CHANGED
package/dist/stores/Quaff.d.ts
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
/// <reference types="@sveltejs/kit" />
|
|
3
3
|
export declare const quaffStore: {
|
|
4
4
|
subscribe: (this: void, run: import("svelte/store").Subscriber<{
|
|
5
|
-
version:
|
|
5
|
+
version: any;
|
|
6
6
|
dark: boolean;
|
|
7
7
|
}>, invalidate?: import("svelte/store").Invalidator<{
|
|
8
|
-
version:
|
|
8
|
+
version: any;
|
|
9
9
|
dark: boolean;
|
|
10
10
|
}> | undefined) => import("svelte/store").Unsubscriber;
|
|
11
11
|
setDarkMode: (newVal: boolean) => void;
|
|
12
12
|
toggleDarkMode: () => void;
|
|
13
13
|
};
|
|
14
14
|
export declare const Quaff: import("svelte/store").Readable<{
|
|
15
|
-
version:
|
|
15
|
+
version: any;
|
|
16
16
|
router: import("@sveltejs/kit").Page<Record<string, string>, string | null>;
|
|
17
17
|
dark: {
|
|
18
18
|
isActive: boolean;
|
|
@@ -21,10 +21,10 @@ export declare const Quaff: import("svelte/store").Readable<{
|
|
|
21
21
|
};
|
|
22
22
|
subscribe: {
|
|
23
23
|
quaff: (this: void, run: import("svelte/store").Subscriber<{
|
|
24
|
-
version:
|
|
24
|
+
version: any;
|
|
25
25
|
dark: boolean;
|
|
26
26
|
}>, invalidate?: import("svelte/store").Invalidator<{
|
|
27
|
-
version:
|
|
27
|
+
version: any;
|
|
28
28
|
dark: boolean;
|
|
29
29
|
}> | undefined) => import("svelte/store").Unsubscriber;
|
|
30
30
|
page: (this: void, run: import("svelte/store").Subscriber<import("@sveltejs/kit").Page<Record<string, string>, string | null>>, invalidate?: import("svelte/store").Invalidator<import("@sveltejs/kit").Page<Record<string, string>, string | null>> | undefined) => import("svelte/store").Unsubscriber;
|
package/dist/stores/Quaff.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { writable, derived } from "svelte/store";
|
|
2
2
|
import { page } from "$app/stores";
|
|
3
|
+
import version from "../helpers/version";
|
|
3
4
|
function quaff() {
|
|
4
5
|
const { subscribe, set, update } = writable({
|
|
5
|
-
version
|
|
6
|
+
version,
|
|
6
7
|
dark: false,
|
|
7
8
|
//TODO lang: {},
|
|
8
9
|
//TODO? iconSet: {},
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quaffui/quaff",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-prealpha5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"open": "vite dev --open",
|
|
7
|
-
"build": "vite build && npm run package",
|
|
7
|
+
"build": "vite build && npm run package && npm run build:css",
|
|
8
|
+
"build:css": "vite build --config vite.config.scss.ts",
|
|
8
9
|
"preview": "vite preview",
|
|
9
10
|
"package": "svelte-kit sync && svelte-package && publint",
|
|
10
11
|
"prepublishOnly": "npm run package",
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
".": {
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"svelte": "./dist/index.js"
|
|
23
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"./css/": "./dist/css/"
|
|
24
26
|
},
|
|
25
27
|
"files": [
|
|
26
28
|
"dist",
|
|
@@ -59,8 +61,8 @@
|
|
|
59
61
|
"type": "module",
|
|
60
62
|
"dependencies": {
|
|
61
63
|
"beercss": "^3.2.13",
|
|
64
|
+
"highlight.js": "^11.8.0",
|
|
62
65
|
"material-dynamic-colors": "^1.0.1",
|
|
63
|
-
"
|
|
64
|
-
"prismjs": "^1.29.0"
|
|
66
|
+
"svelte-highlight": "^7.3.0"
|
|
65
67
|
}
|
|
66
68
|
}
|