create-quicklook 0.2.0 → 0.5.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/LICENSE +4 -0
- package/README.markdown +4 -4
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/templates/analog/package.json +10 -10
- package/templates/analog/quicklook.config.ts +1 -1
- package/templates/analog/src/app/app.ts +1 -1
- package/templates/astro/package.json +3 -3
- package/templates/astro/quicklook.config.ts +1 -1
- package/templates/astro/src/pages/index.astro +1 -1
- package/templates/nuxt/app/app.vue +1 -1
- package/templates/nuxt/package.json +4 -4
- package/templates/nuxt/quicklook.config.ts +1 -1
- package/templates/solid-start/package.json +3 -3
- package/templates/solid-start/quicklook.config.ts +1 -1
- package/templates/solid-start/src/routes/index.tsx +1 -1
- package/templates/sveltekit/package.json +6 -6
- package/templates/sveltekit/quicklook.config.ts +1 -1
- package/templates/sveltekit/src/routes/+page.svelte +2 -2
- package/templates/sveltekit/tsconfig.json +2 -1
- package/templates/sveltekit/vite.config.ts +11 -1
- package/templates/sveltekit/svelte.config.js +0 -11
package/LICENSE
CHANGED
package/README.markdown
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# create-quicklook
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
[](https://www.npmjs.org/package/create-quicklook)
|
|
5
|
+
[](https://github.com/idleberg/create-quicklook/actions)
|
|
6
6
|
|
|
7
|
-
> Create a macOS
|
|
7
|
+
> Create a macOS Quick Look preview with any Vite-based web framework
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
pnpm create quicklook my-preview
|
package/dist/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ note([
|
|
|
75
75
|
`cd ${relative(process.cwd(), dir)}`,
|
|
76
76
|
"mise install # or: pnpm install, with Xcode and XcodeGen installed",
|
|
77
77
|
"pnpm dev # drop a file on the page to preview it",
|
|
78
|
-
"pnpm register # build the app and register it with
|
|
78
|
+
"pnpm register # build the app and register it with Quick Look"
|
|
79
79
|
].join("\n"), "Next steps");
|
|
80
80
|
outro(`Created from the ${template} template.`);
|
|
81
81
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-quicklook",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Create a macOS
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Create a macOS Quick Look preview with any Vite-based web framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"quicklook",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "24.19.2",
|
|
38
|
-
"tsdown": "0.23.
|
|
38
|
+
"tsdown": "0.23.1",
|
|
39
39
|
"typescript": "6.0.3"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
"format": "biome check --write"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@analogjs/vite-plugin-angular": "2.
|
|
16
|
-
"@angular/build": "22.2.
|
|
17
|
-
"@angular/common": "22.2.
|
|
18
|
-
"@angular/compiler": "22.2.
|
|
19
|
-
"@angular/compiler-cli": "22.2.
|
|
20
|
-
"@angular/core": "22.2.
|
|
21
|
-
"@angular/platform-browser": "22.2.
|
|
22
|
-
"@biomejs/biome": "2.5.
|
|
23
|
-
"quicklook-kit": "^0.
|
|
15
|
+
"@analogjs/vite-plugin-angular": "2.8.0",
|
|
16
|
+
"@angular/build": "22.2.2",
|
|
17
|
+
"@angular/common": "22.2.2",
|
|
18
|
+
"@angular/compiler": "22.2.2",
|
|
19
|
+
"@angular/compiler-cli": "22.2.2",
|
|
20
|
+
"@angular/core": "22.2.2",
|
|
21
|
+
"@angular/platform-browser": "22.2.2",
|
|
22
|
+
"@biomejs/biome": "2.5.15",
|
|
23
|
+
"quicklook-kit": "^0.5.0",
|
|
24
24
|
"rxjs": "7.8.2",
|
|
25
25
|
"tslib": "2.8.1",
|
|
26
26
|
"typescript": "6.0.3",
|
|
27
|
-
"vite": "8.3.
|
|
27
|
+
"vite": "8.3.4"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -10,7 +10,7 @@ import { FileViewer } from './file-viewer';
|
|
|
10
10
|
@if (file(); as file) {
|
|
11
11
|
<app-file-viewer [file]="file" />
|
|
12
12
|
} @else {
|
|
13
|
-
<!-- Only reachable in the browser:
|
|
13
|
+
<!-- Only reachable in the browser: Quick Look always injects a file. -->
|
|
14
14
|
<label class="drop">
|
|
15
15
|
Drop a file here, or click to pick one
|
|
16
16
|
<input type="file" hidden (change)="open($any($event.target).files)" />
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@astrojs/check": "0.9.10",
|
|
16
|
-
"@biomejs/biome": "2.5.
|
|
17
|
-
"astro": "7.3.
|
|
18
|
-
"quicklook-kit": "^0.
|
|
16
|
+
"@biomejs/biome": "2.5.15",
|
|
17
|
+
"astro": "7.3.8",
|
|
18
|
+
"quicklook-kit": "^0.5.0",
|
|
19
19
|
"typescript": "6.0.3"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,7 +11,7 @@ import FileViewer from '../components/FileViewer.astro';
|
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<FileViewer />
|
|
14
|
-
<!-- Only reachable in the browser:
|
|
14
|
+
<!-- Only reachable in the browser: Quick Look always injects a file. -->
|
|
15
15
|
<label id="drop">
|
|
16
16
|
Drop a file here, or click to pick one
|
|
17
17
|
<input type="file" hidden />
|
|
@@ -23,7 +23,7 @@ onMounted(() => {
|
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
25
|
<FileViewer v-if="file" :file="file" />
|
|
26
|
-
<!-- Only reachable in the browser:
|
|
26
|
+
<!-- Only reachable in the browser: Quick Look always injects a file. -->
|
|
27
27
|
<label v-else class="drop">
|
|
28
28
|
Drop a file here, or click to pick one
|
|
29
29
|
<input type="file" hidden @change="open(($event.target as HTMLInputElement).files)" />
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"format": "biome check --write"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@biomejs/biome": "2.5.
|
|
17
|
-
"nuxt": "4.
|
|
18
|
-
"quicklook-kit": "^0.
|
|
16
|
+
"@biomejs/biome": "2.5.15",
|
|
17
|
+
"nuxt": "4.6.1",
|
|
18
|
+
"quicklook-kit": "^0.5.0",
|
|
19
19
|
"typescript": "6.0.3",
|
|
20
20
|
"vue": "3.5.43",
|
|
21
|
-
"vue-tsc": "3.3.
|
|
21
|
+
"vue-tsc": "3.3.13"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"format": "biome check --write"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@biomejs/biome": "2.5.
|
|
15
|
+
"@biomejs/biome": "2.5.15",
|
|
16
16
|
"@solidjs/router": "1.0.0",
|
|
17
17
|
"@solidjs/start": "2.0.6",
|
|
18
18
|
"nitro": "3.0.260903-beta",
|
|
19
|
-
"quicklook-kit": "^0.
|
|
19
|
+
"quicklook-kit": "^0.5.0",
|
|
20
20
|
"solid-js": "1.9.17",
|
|
21
21
|
"typescript": "6.0.3",
|
|
22
|
-
"vite": "8.3.
|
|
22
|
+
"vite": "8.3.4"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -22,7 +22,7 @@ export default function Home() {
|
|
|
22
22
|
<Show
|
|
23
23
|
when={file()}
|
|
24
24
|
fallback={
|
|
25
|
-
// Only reachable in the browser:
|
|
25
|
+
// Only reachable in the browser: Quick Look always injects a file.
|
|
26
26
|
<label class="drop">
|
|
27
27
|
Drop a file here, or click to pick one
|
|
28
28
|
<input type="file" hidden={true} onChange={(event) => open(event.currentTarget.files)} />
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"format": "biome check --write"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@biomejs/biome": "2.5.
|
|
16
|
-
"@sveltejs/adapter-static": "
|
|
17
|
-
"@sveltejs/kit": "
|
|
15
|
+
"@biomejs/biome": "2.5.15",
|
|
16
|
+
"@sveltejs/adapter-static": "4.0.0",
|
|
17
|
+
"@sveltejs/kit": "3.0.1",
|
|
18
18
|
"@sveltejs/vite-plugin-svelte": "7.3.1",
|
|
19
|
-
"quicklook-kit": "^0.
|
|
20
|
-
"svelte": "5.57.
|
|
19
|
+
"quicklook-kit": "^0.5.0",
|
|
20
|
+
"svelte": "5.57.2",
|
|
21
21
|
"svelte-check": "4.7.6",
|
|
22
22
|
"typescript": "6.0.3",
|
|
23
|
-
"vite": "8.3.
|
|
23
|
+
"vite": "8.3.4"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { browserFile, nativeFile, type QuickLookFile } from 'virtual:quicklook';
|
|
3
|
-
import FileViewer from '
|
|
3
|
+
import FileViewer from '../lib/FileViewer.svelte';
|
|
4
4
|
|
|
5
5
|
let file = $state<QuickLookFile | undefined>(nativeFile());
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<!-- Only reachable in the browser:
|
|
15
|
+
<!-- Only reachable in the browser: Quick Look always injects a file. -->
|
|
16
16
|
<svelte:window
|
|
17
17
|
ondragover={(e) => e.preventDefault()}
|
|
18
18
|
ondrop={(e) => {
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import adapter from '@sveltejs/adapter-static';
|
|
1
2
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
2
3
|
import { quicklook } from 'quicklook-kit/vite';
|
|
3
4
|
import { defineConfig } from 'vite';
|
|
4
5
|
|
|
5
6
|
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
+
plugins: [
|
|
8
|
+
sveltekit({
|
|
9
|
+
// A static build; the extension serves it and sets the CSP from quicklook.config.ts.
|
|
10
|
+
adapter: adapter(),
|
|
11
|
+
|
|
12
|
+
// Builds a client-only app shell, which is all the preview needs.
|
|
13
|
+
router: { type: 'hash' },
|
|
14
|
+
}),
|
|
15
|
+
quicklook(),
|
|
16
|
+
],
|
|
7
17
|
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import adapter from '@sveltejs/adapter-static';
|
|
2
|
-
|
|
3
|
-
/** @type {import('@sveltejs/kit').Config} */
|
|
4
|
-
export default {
|
|
5
|
-
kit: {
|
|
6
|
-
// A static build; the extension serves it and sets the CSP from quicklook.config.ts.
|
|
7
|
-
adapter: adapter(),
|
|
8
|
-
// Builds a client-only app shell, which is all the preview needs.
|
|
9
|
-
router: { type: 'hash' },
|
|
10
|
-
},
|
|
11
|
-
};
|