Skip to content

Commit 15101ad

Browse files
committed
[Release] v0.2.2
1 parent af8a88a commit 15101ad

File tree

91 files changed

+21244
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+21244
-17
lines changed

.npmignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
**/*
2-
!/extra/**/*
2+
!/app/**/*
33
!*.d.ts
4-
!index.js
5-
!platforms.js
64
!*.md
75
!*.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/dist
22
/build
3+
/examples
34
/node_modules
45
package-lock.json

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
# v0.2.1 (February 11, 2023)
1+
# v0.2.2 (February 11, 2023)
22

3-
- New Options: `viewport`
4-
- New Options: `policy`
5-
- Fix: HTML Regex
3+
- Fix: Docs
4+
- New: `/examples` folder
65

76
<!-- all-shields/sponsors-badges:START -->
87

98
[![Donate Paypal](https://img.shields.io/badge/donate-paypal-005EA6.svg?style=for-the-badge&logo=paypal)](https://www.paypal.me/ptkdev) [![Donate Ko-Fi](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?style=for-the-badge&logo=ko-fi)](https://ko-fi.com/ptkdev) [![Donate GitHub Sponsors](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?style=for-the-badge&logo=github)](https://github.com/sponsors/ptkdev) [![Donate Patreon](https://img.shields.io/badge/donate-patreon-F87668.svg?style=for-the-badge&logo=patreon)](https://www.patreon.com/join/ptkdev) [![Donate Bitcoin](https://img.shields.io/badge/BTC-35jQmZCy4nsxoMM3QPFrnZePDVhdKaHMRH-E38B29.svg?style=flat-square&logo=bitcoin)](https://ptk.dev/img/icons/menu/bitcoin_wallet.png) [![Donate Ethereum](https://img.shields.io/badge/ETH-0x8b8171661bEb032828e82baBb0B5B98Ba8fBEBFc-4E8EE9.svg?style=flat-square&logo=ethereum)](https://ptk.dev/img/icons/menu/ethereum_wallet.png)
109

1110
<!-- all-shields/sponsors-badges:END -->
1211

12+
# v0.2.1 (February 11, 2023)
13+
14+
- New Options: `viewport`
15+
- New Options: `policy`
16+
- Fix: HTML Regex
17+
1318
# v0.1.0 (February 06, 2023)
1419

1520
- First release

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import adapter from "@ptkdev/sveltekit-electron-adapter";
5757
const config = {
5858
kit: {
5959
adapter: adapter({
60-
strict: true,
60+
strict: false,
6161
}),
6262
},
6363
};
@@ -72,7 +72,7 @@ I make a boilerplate that "automate" this process, but is working in progress: c
7272

7373
## 🧰 Options
7474

75-
The `adatper({ options })` parameters list:
75+
The `adapter({ options })` parameters list:
7676

7777
| Parameter | Description | Values | Default value | Available since |
7878
| ----------- | --------------------------------------------------------------- | ------ | ----------------------------------------------------------- | --------------- |
@@ -81,7 +81,7 @@ The `adatper({ options })` parameters list:
8181
| fallback | See official [docs](https://kit.svelte.dev/docs/adapter-static) | | | |
8282
| precompress | See official [docs](https://kit.svelte.dev/docs/adapter-static) | | | |
8383
| strict | See official [docs](https://kit.svelte.dev/docs/adapter-static) | | | |
84-
| policy | Set meta-tag `content-security-policy` | String | `default-src 'self'; script-src 'self'` | v0.2.0 |
84+
| policy | Set meta-tag `content-security-policy` | String | Empty | v0.2.0 |
8585
| viewport | Set meta-tag `viewport` | String | `width=device-width, initial-scale=1.0, viewport-fit=cover` | v0.2.0 |
8686

8787
#### Example:
@@ -90,8 +90,8 @@ The `adatper({ options })` parameters list:
9090
const config = {
9191
kit: {
9292
adapter: adapter({
93-
strict: true,
94-
policy: "",
93+
strict: false,
94+
policy: "default-src 'self'; script-src 'self'",
9595
viewport: `width=device-width`,
9696
}),
9797
},

app/adapter/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ See https://kit.svelte.dev/docs/page-options#prerender for more details`,
109109
});
110110

111111
let regex_input = new RegExp(`http-equiv="content-security-policy" content=""`, "g");
112-
const policy = "default-src 'self'; script-src 'self'";
112+
const policy = "";
113113
let regex_replace = `http-equiv="content-security-policy" content="${
114114
options?.policy ? options.policy : policy
115115
}"`;

examples/electron-app/.gitignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
.DS_Store
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# TypeScript cache
43+
*.tsbuildinfo
44+
45+
# Optional npm cache directory
46+
.npm
47+
48+
# Optional eslint cache
49+
.eslintcache
50+
51+
# Optional REPL history
52+
.node_repl_history
53+
54+
# Output of 'npm pack'
55+
*.tgz
56+
57+
# Yarn Integrity file
58+
.yarn-integrity
59+
60+
# dotenv environment variables file
61+
.env
62+
.env.test
63+
64+
# parcel-bundler cache (https://parceljs.org/)
65+
.cache
66+
67+
# next.js build output
68+
.next
69+
70+
# nuxt.js build output
71+
.nuxt
72+
73+
# vuepress build output
74+
.vuepress/dist
75+
76+
# Serverless directories
77+
.serverless/
78+
79+
# FuseBox cache
80+
.fusebox/
81+
82+
# DynamoDB Local files
83+
.dynamodb/
84+
85+
# Webpack
86+
.webpack/
87+
88+
# Electron-Forge
89+
out/
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
packagerConfig: {},
3+
rebuildConfig: {},
4+
makers: [
5+
{
6+
name: '@electron-forge/maker-squirrel',
7+
config: {},
8+
},
9+
{
10+
name: '@electron-forge/maker-zip',
11+
platforms: ['darwin'],
12+
},
13+
{
14+
name: '@electron-forge/maker-deb',
15+
config: {},
16+
},
17+
{
18+
name: '@electron-forge/maker-rpm',
19+
config: {},
20+
},
21+
],
22+
};

examples/electron-app/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "electron-app",
3+
"productName": "electron-app",
4+
"version": "1.0.0",
5+
"description": "My Electron application description",
6+
"main": "src/index.js",
7+
"scripts": {
8+
"start": "electron-forge start",
9+
"package": "electron-forge package",
10+
"make": "electron-forge make",
11+
"publish": "electron-forge publish",
12+
"lint": "echo \"No linting configured\""
13+
},
14+
"keywords": [],
15+
"author": {
16+
"name": "Patryk Rzucidlo (PTKDev)",
17+
"email": "[email protected]"
18+
},
19+
"license": "MIT",
20+
"dependencies": {
21+
"electron-squirrel-startup": "^1.0.0"
22+
},
23+
"devDependencies": {
24+
"@electron-forge/cli": "^6.0.5",
25+
"@electron-forge/maker-deb": "^6.0.5",
26+
"@electron-forge/maker-rpm": "^6.0.5",
27+
"@electron-forge/maker-squirrel": "^6.0.5",
28+
"@electron-forge/maker-zip": "^6.0.5",
29+
"electron": "23.0.0"
30+
}
31+
}
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
header.svelte-1u9z1tp.svelte-1u9z1tp{display:flex;justify-content:space-between}.corner.svelte-1u9z1tp.svelte-1u9z1tp{width:3em;height:3em}.corner.svelte-1u9z1tp a.svelte-1u9z1tp{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.corner.svelte-1u9z1tp img.svelte-1u9z1tp{width:2em;height:2em;object-fit:contain}nav.svelte-1u9z1tp.svelte-1u9z1tp{display:flex;justify-content:center;--background:rgba(255, 255, 255, 0.7)}svg.svelte-1u9z1tp.svelte-1u9z1tp{width:2em;height:3em;display:block}path.svelte-1u9z1tp.svelte-1u9z1tp{fill:var(--background)}ul.svelte-1u9z1tp.svelte-1u9z1tp{position:relative;padding:0;margin:0;height:3em;display:flex;justify-content:center;align-items:center;list-style:none;background:var(--background);background-size:contain}li.svelte-1u9z1tp.svelte-1u9z1tp{position:relative;height:100%}li[aria-current='page'].svelte-1u9z1tp.svelte-1u9z1tp::before{--size:6px;content:'';width:0;height:0;position:absolute;top:0;left:calc(50% - var(--size));border:var(--size) solid transparent;border-top:var(--size) solid var(--color-theme-1)}nav.svelte-1u9z1tp a.svelte-1u9z1tp{display:flex;height:100%;align-items:center;padding:0 0.5rem;color:var(--color-text);font-weight:700;font-size:0.8rem;text-transform:uppercase;letter-spacing:0.1em;text-decoration:none;transition:color 0.2s linear}a.svelte-1u9z1tp.svelte-1u9z1tp:hover{color:var(--color-theme-1)}/* fira-mono-cyrillic-ext-400-normal*/
2+
@font-face {
3+
font-family: 'Fira Mono';
4+
font-style: normal;
5+
font-display: swap;
6+
font-weight: 400;
7+
src: url('./fira-mono-cyrillic-ext-400-normal-3df7909e.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
8+
unicode-range: U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
9+
}
10+
/* fira-mono-cyrillic-400-normal*/
11+
@font-face {
12+
font-family: 'Fira Mono';
13+
font-style: normal;
14+
font-display: swap;
15+
font-weight: 400;
16+
src: url('./fira-mono-cyrillic-400-normal-c7d433fd.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
17+
unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
18+
}
19+
/* fira-mono-greek-ext-400-normal*/
20+
@font-face {
21+
font-family: 'Fira Mono';
22+
font-style: normal;
23+
font-display: swap;
24+
font-weight: 400;
25+
src: url('./fira-mono-greek-ext-400-normal-9e2fe623.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
26+
unicode-range: U+1F00-1FFF;
27+
}
28+
/* fira-mono-greek-400-normal*/
29+
@font-face {
30+
font-family: 'Fira Mono';
31+
font-style: normal;
32+
font-display: swap;
33+
font-weight: 400;
34+
src: url('./fira-mono-greek-400-normal-a8be01ce.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
35+
unicode-range: U+0370-03FF;
36+
}
37+
/* fira-mono-latin-ext-400-normal*/
38+
@font-face {
39+
font-family: 'Fira Mono';
40+
font-style: normal;
41+
font-display: swap;
42+
font-weight: 400;
43+
src: url('./fira-mono-latin-ext-400-normal-6bfabd30.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
44+
unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
45+
}
46+
/* fira-mono-latin-400-normal*/
47+
@font-face {
48+
font-family: 'Fira Mono';
49+
font-style: normal;
50+
font-display: swap;
51+
font-weight: 400;
52+
src: url('./fira-mono-latin-400-normal-e43b3538.woff2') format('woff2'), url('./fira-mono-all-400-normal-1e3b098c.woff') format('woff');
53+
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
54+
}
55+
:root {
56+
--font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
57+
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
58+
--font-mono: 'Fira Mono', monospace;
59+
--color-bg-0: rgb(202, 216, 228);
60+
--color-bg-1: hsl(209, 36%, 86%);
61+
--color-bg-2: hsl(224, 44%, 95%);
62+
--color-theme-1: #ff3e00;
63+
--color-theme-2: #4075a6;
64+
--color-text: rgba(0, 0, 0, 0.7);
65+
--column-width: 42rem;
66+
--column-margin-top: 4rem;
67+
font-family: var(--font-body);
68+
color: var(--color-text);
69+
}
70+
body {
71+
min-height: 100vh;
72+
margin: 0;
73+
background-attachment: fixed;
74+
background-color: var(--color-bg-1);
75+
background-size: 100vw 100vh;
76+
background-image: radial-gradient(
77+
50% 50% at 50% 50%,
78+
rgba(255, 255, 255, 0.75) 0%,
79+
rgba(255, 255, 255, 0) 100%
80+
),
81+
linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%);
82+
}
83+
h1,
84+
h2,
85+
p {
86+
font-weight: 400;
87+
}
88+
p {
89+
line-height: 1.5;
90+
}
91+
a {
92+
color: var(--color-theme-1);
93+
text-decoration: none;
94+
}
95+
a:hover {
96+
text-decoration: underline;
97+
}
98+
h1 {
99+
font-size: 2rem;
100+
text-align: center;
101+
}
102+
h2 {
103+
font-size: 1rem;
104+
}
105+
pre {
106+
font-size: 16px;
107+
font-family: var(--font-mono);
108+
background-color: rgba(255, 255, 255, 0.45);
109+
border-radius: 3px;
110+
box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);
111+
padding: 0.5em;
112+
overflow-x: auto;
113+
color: var(--color-text);
114+
}
115+
.text-column {
116+
display: flex;
117+
max-width: 48rem;
118+
flex: 0.6;
119+
flex-direction: column;
120+
justify-content: center;
121+
margin: 0 auto;
122+
}
123+
input,
124+
button {
125+
font-size: inherit;
126+
font-family: inherit;
127+
}
128+
button:focus:not(:focus-visible) {
129+
outline: none;
130+
}
131+
@media (min-width: 720px) {
132+
h1 {
133+
font-size: 2.4rem;
134+
}
135+
}
136+
.visually-hidden {
137+
border: 0;
138+
clip: rect(0 0 0 0);
139+
height: auto;
140+
margin: 0;
141+
overflow: hidden;
142+
padding: 0;
143+
position: absolute;
144+
width: 1px;
145+
white-space: nowrap;
146+
}
147+
.app.svelte-8o1gnw.svelte-8o1gnw{display:flex;flex-direction:column;min-height:100vh}main.svelte-8o1gnw.svelte-8o1gnw{flex:1;display:flex;flex-direction:column;padding:1rem;width:100%;max-width:64rem;margin:0 auto;box-sizing:border-box}footer.svelte-8o1gnw.svelte-8o1gnw{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:12px}footer.svelte-8o1gnw a.svelte-8o1gnw{font-weight:bold}@media(min-width: 480px){footer.svelte-8o1gnw.svelte-8o1gnw{padding:12px 0}}

examples/electron-app/src/_app/immutable/assets/_page-08e4d5ca.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)