Compare commits
38 Commits
@marknow/w
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fdad98663 | ||
|
|
681f9ba788 | ||
|
|
6ca1fc7fbc | ||
|
|
10c6db7ebc | ||
|
|
c93c979e3f | ||
|
|
280117e9ec | ||
|
|
386c556650 | ||
|
|
1fb8a0185e | ||
|
|
c0341eac68 | ||
|
|
f5b43337a6 | ||
|
|
51424bf3f7 | ||
|
|
2c4f38f916 | ||
|
|
e951837f36 | ||
|
|
4b103e2804 | ||
|
|
d173651b50 | ||
|
|
1dd662c425 | ||
|
|
1cca8a1623 | ||
|
|
8f552ad600 | ||
|
|
cc928a45a4 | ||
|
|
2612c4a0f3 | ||
|
|
66101be6c0 | ||
|
|
63f4d24317 | ||
|
|
65ead53191 | ||
|
|
41c6f275ad | ||
|
|
890b768a4e | ||
|
|
e83de84f5c | ||
|
|
8c81704f8b | ||
|
|
8380a980ba | ||
|
|
9b7a3aed62 | ||
|
|
827eb80d0f | ||
|
|
07013dfc0f | ||
|
|
56eb8af91b | ||
|
|
48bd5ee419 | ||
|
|
16897f956a | ||
|
|
16a13c2c6a | ||
|
|
aecb212d0c | ||
|
|
5e4a6ccc3f | ||
|
|
07a627db9f |
@@ -4,8 +4,8 @@
|
|||||||
"commit": false,
|
"commit": false,
|
||||||
"fixed": [],
|
"fixed": [],
|
||||||
"linked": [],
|
"linked": [],
|
||||||
"access": "restricted",
|
"access": "public",
|
||||||
"baseBranch": "main",
|
"baseBranch": "dev",
|
||||||
"updateInternalDependencies": "patch",
|
"updateInternalDependencies": "patch",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"privatePackages": {
|
"privatePackages": {
|
||||||
|
|||||||
@@ -233,6 +233,9 @@ module.exports = {
|
|||||||
'xml',
|
'xml',
|
||||||
'jsconfig',
|
'jsconfig',
|
||||||
'vitest',
|
'vitest',
|
||||||
|
'matcher',
|
||||||
|
'minimalistic',
|
||||||
|
'xmlns',
|
||||||
],
|
],
|
||||||
minLength: 4,
|
minLength: 4,
|
||||||
}],
|
}],
|
||||||
|
|||||||
10
.github/workflows/checks.yml
vendored
10
.github/workflows/checks.yml
vendored
@@ -5,8 +5,16 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- main
|
- main
|
||||||
|
- changeset-release/main
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- changeset-release/main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linting:
|
linting:
|
||||||
|
|||||||
12
.github/workflows/deploy-preview.yml
vendored
12
.github/workflows/deploy-preview.yml
vendored
@@ -1,14 +1,22 @@
|
|||||||
name: ▲ Deploy preview to Vercel
|
name: ▲ Deploy preview
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- changeset-release/main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
if: github.repository == 'loreddev/marknow'
|
||||||
uses: loreddev/.github/.github/workflows/vercel-deploy.yml@main
|
uses: loreddev/.github/.github/workflows/vercel-deploy.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
|
|||||||
10
.github/workflows/deploy.yml
vendored
10
.github/workflows/deploy.yml
vendored
@@ -1,12 +1,18 @@
|
|||||||
name: ▲ Deploy to Vercel
|
name: ▲ Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- 🧪 Code checking
|
||||||
|
- 🎉 Release
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'loreddev/marknow' }}
|
||||||
uses: loreddev/.github/.github/workflows/vercel-deploy.yml@main
|
uses: loreddev/.github/.github/workflows/vercel-deploy.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
|
|||||||
1
.github/workflows/mirror.yml
vendored
1
.github/workflows/mirror.yml
vendored
@@ -8,6 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mirror:
|
mirror:
|
||||||
|
if: github.repository == 'loreddev/marknow'
|
||||||
uses: loreddev/.github/.github/workflows/mirrors.yml@main
|
uses: loreddev/.github/.github/workflows/mirrors.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
|
|||||||
49
.github/workflows/release-branch.yml
vendored
Normal file
49
.github/workflows/release-branch.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: 🦋 Release branch
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
name: Update/Create release branch
|
||||||
|
env:
|
||||||
|
HUSKY: 0
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup environment
|
||||||
|
uses: ./.github/actions/pnpm-setup
|
||||||
|
|
||||||
|
- name: Update release PR
|
||||||
|
id: changesets
|
||||||
|
uses: loreddev/changeset-action@main
|
||||||
|
with:
|
||||||
|
branch: main
|
||||||
|
commit: 'ci: 👷🦋 version packages'
|
||||||
|
title: 🦋 Release branch
|
||||||
|
publish: pnpm run release
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Update dev branch
|
||||||
|
if: steps.changesets.outputs.hasChangesets == 'false'
|
||||||
|
uses: devmasx/merge-branch@master
|
||||||
|
with:
|
||||||
|
type: now
|
||||||
|
from_branch: changeset-release/main
|
||||||
|
target_branch: dev
|
||||||
|
message: 'ci: 👷 update dev branch'
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
34
.github/workflows/release-preview.yml
vendored
Normal file
34
.github/workflows/release-preview.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: 👷 Release preview
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- 🧪 Code checking
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'loreddev/marknow' }}
|
||||||
|
name: Release preview
|
||||||
|
env:
|
||||||
|
HUSKY: 0
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup environment
|
||||||
|
uses: ./.github/actions/pnpm-setup
|
||||||
|
|
||||||
|
- name: Update versions
|
||||||
|
run: pnpm changeset version --snapshot next
|
||||||
|
|
||||||
|
- name: Release packages
|
||||||
|
run: pnpm run release --tag next
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: 🎉 Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
if: github.repository == 'loreddev/marknow'
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup environment
|
|
||||||
uses: ./.github/actions/pnpm-setup
|
|
||||||
- name: Create Release PR or Public to NPM
|
|
||||||
id: changesets
|
|
||||||
uses: changesets/action@v1
|
|
||||||
with:
|
|
||||||
publish: pnpm release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
3
.vscode/project.code-workspace
vendored
3
.vscode/project.code-workspace
vendored
@@ -34,6 +34,9 @@
|
|||||||
"editor.formatOnSave": false,
|
"editor.formatOnSave": false,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
|
},
|
||||||
|
"svelte.plugin.svelte.compilerWarnings": {
|
||||||
|
"missing-declaration": "ignore"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023-preset Gustavo "Guz" L. de Mello
|
Copyright (c) 2023-present Gustavo "Guz" L. de Mello
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
"linear": true,
|
"linear": true,
|
||||||
"onDestroy": true,
|
"onDestroy": true,
|
||||||
"onMount": true,
|
"onMount": true,
|
||||||
|
"pastSvg": true,
|
||||||
"quadIn": true,
|
"quadIn": true,
|
||||||
"quadInOut": true,
|
"quadInOut": true,
|
||||||
"quadOut": true,
|
"quadOut": true,
|
||||||
@@ -55,14 +56,6 @@
|
|||||||
"tick": true,
|
"tick": true,
|
||||||
"tweened": true,
|
"tweened": true,
|
||||||
"writable": true,
|
"writable": true,
|
||||||
"csr": true,
|
"encodeSvg": true
|
||||||
"ssr": true,
|
|
||||||
"render": true,
|
|
||||||
"banner": true,
|
|
||||||
"Banner": true,
|
|
||||||
"load": true,
|
|
||||||
"data": true,
|
|
||||||
"PageData": true,
|
|
||||||
"GET": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,8 @@ module.exports = {
|
|||||||
extends: [
|
extends: [
|
||||||
'./.eslintrc-auto-import.json',
|
'./.eslintrc-auto-import.json',
|
||||||
],
|
],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-throw-literal': 'off',
|
||||||
|
'import/default': 'warn',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
11
apps/www/CHANGELOG.md
Normal file
11
apps/www/CHANGELOG.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# @marknow/www
|
||||||
|
|
||||||
|
## 1.0.0
|
||||||
|
|
||||||
|
### Major Changes
|
||||||
|
|
||||||
|
- 2612c4a: Created the basic web editor for the banners. It is just a minimal viable product, and in some way still a proof-of-concept.
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 56eb8af: Added a simple rest api for creating the banners
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@marknow/www",
|
"name": "@marknow/www",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.0.0",
|
"packageManager": "pnpm@8.0.0",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"@marknow/banners": "workspace:*",
|
"@marknow/banners": "workspace:*",
|
||||||
"@poppanator/sveltekit-svg": "^3.0.1",
|
"@poppanator/sveltekit-svg": "^3.0.1",
|
||||||
"@sveltejs/adapter-vercel": "^3.0.1",
|
"@sveltejs/adapter-vercel": "^3.0.1",
|
||||||
"@sveltejs/kit": "^1.20.2",
|
"@sveltejs/kit": "^1.20.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
||||||
"@typescript-eslint/parser": "^5.59.11",
|
"@typescript-eslint/parser": "^5.59.11",
|
||||||
"@unocss/extractor-svelte": "^0.52.7",
|
"@unocss/extractor-svelte": "^0.52.7",
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
"rehype-external-links": "^2.1.0",
|
"rehype-external-links": "^2.1.0",
|
||||||
"sass": "^1.63.6",
|
"sass": "^1.63.6",
|
||||||
"satori": "^0.10.1",
|
"satori": "^0.10.1",
|
||||||
"svelte": "^3.59.1",
|
"svelte": "^4.0.0",
|
||||||
"svelte-check": "^3.4.3",
|
"svelte-check": "^3.4.3",
|
||||||
"svelte-preprocess": "^5.0.4",
|
"svelte-preprocess": "^5.0.3",
|
||||||
"tslib": "^2.5.3",
|
"tslib": "^2.5.3",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.0.0",
|
||||||
"unocss": "^0.52.7",
|
"unocss": "^0.52.7",
|
||||||
"unocss-preset-radix": "^2.5.1",
|
"unocss-preset-radix": "^2.5.1",
|
||||||
"unocss-preset-scrollbar": "^0.2.1",
|
"unocss-preset-scrollbar": "^0.2.1",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body data-sveltekit-preload-data="hover" un-bg="#0d1117">
|
<body data-sveltekit-preload-data="hover" style="margin: 0; overflow: hidden;">
|
||||||
<div style="display: contents">%sveltekit.body%</div>
|
<div style="display: contents; position: absolute;">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
2
apps/www/src/lib/components.d.ts
vendored
2
apps/www/src/lib/components.d.ts
vendored
@@ -1,7 +1,7 @@
|
|||||||
// generated by unplugin-svelte-components
|
// generated by unplugin-svelte-components
|
||||||
// We suggest you to commit this file into source control
|
// We suggest you to commit this file into source control
|
||||||
declare global {
|
declare global {
|
||||||
const Test: typeof import("./Test.svelte")["default"]
|
const Banner: typeof import("./components/Banner.svelte")["default"]
|
||||||
}
|
}
|
||||||
|
|
||||||
export {}
|
export {}
|
||||||
|
|||||||
37
apps/www/src/lib/components/Banner.svelte
Normal file
37
apps/www/src/lib/components/Banner.svelte
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { BannerOptions } from '@marknow/banners';
|
||||||
|
import newBanner from '@marknow/banners';
|
||||||
|
|
||||||
|
export let options: BannerOptions;
|
||||||
|
|
||||||
|
async function loadSvg() {
|
||||||
|
const bannerSvg = newBanner(options);
|
||||||
|
|
||||||
|
pastSvg.set((await bannerSvg).svg);
|
||||||
|
|
||||||
|
return bannerSvg;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<picture un-w="1000px" un-h="280px" un-relative>
|
||||||
|
{#await loadSvg()}
|
||||||
|
<img src={`data:image/svg+xml, ${encodeSvg(get(pastSvg))}`} alt="Resulting banner">
|
||||||
|
<div un-m="l-2">
|
||||||
|
<span un-i-svg-spinners-blocks-shuffle-3 un-inline-block un-m="r-1">
|
||||||
|
Spinner
|
||||||
|
</span>Creating svg
|
||||||
|
</div>
|
||||||
|
{:then banner}
|
||||||
|
<img src={`data:image/svg+xml, ${encodeSvg(banner.svg)}`} alt="Resulting banner">
|
||||||
|
{/await}
|
||||||
|
</picture>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:global(#bannerHtml) {
|
||||||
|
padding: 0 !important;
|
||||||
|
height: var(--height) !important;
|
||||||
|
}
|
||||||
|
:global(#bannerHtml > div > div > div:first-child) {
|
||||||
|
margin: 0 0 0 2.5em !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
9
apps/www/src/lib/imports.d.ts
vendored
9
apps/www/src/lib/imports.d.ts
vendored
@@ -4,8 +4,6 @@
|
|||||||
// Generated by unplugin-auto-import
|
// Generated by unplugin-auto-import
|
||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const Banner: typeof import('./Banner')['default']
|
|
||||||
const GET: typeof import('../routes/api.svg/+server')['GET']
|
|
||||||
const afterUpdate: typeof import('svelte')['afterUpdate']
|
const afterUpdate: typeof import('svelte')['afterUpdate']
|
||||||
const backIn: typeof import('svelte/easing')['backIn']
|
const backIn: typeof import('svelte/easing')['backIn']
|
||||||
const backInOut: typeof import('svelte/easing')['backInOut']
|
const backInOut: typeof import('svelte/easing')['backInOut']
|
||||||
@@ -20,16 +18,15 @@ declare global {
|
|||||||
const circOut: typeof import('svelte/easing')['circOut']
|
const circOut: typeof import('svelte/easing')['circOut']
|
||||||
const createEventDispatcher: typeof import('svelte')['createEventDispatcher']
|
const createEventDispatcher: typeof import('svelte')['createEventDispatcher']
|
||||||
const crossfade: typeof import('svelte/transition')['crossfade']
|
const crossfade: typeof import('svelte/transition')['crossfade']
|
||||||
const csr: typeof import('../routes/+page')['csr']
|
|
||||||
const cubicIn: typeof import('svelte/easing')['cubicIn']
|
const cubicIn: typeof import('svelte/easing')['cubicIn']
|
||||||
const cubicInOut: typeof import('svelte/easing')['cubicInOut']
|
const cubicInOut: typeof import('svelte/easing')['cubicInOut']
|
||||||
const cubicOut: typeof import('svelte/easing')['cubicOut']
|
const cubicOut: typeof import('svelte/easing')['cubicOut']
|
||||||
const data: typeof import('../routes/+page.svelte')['data']
|
|
||||||
const derived: typeof import('svelte/store')['derived']
|
const derived: typeof import('svelte/store')['derived']
|
||||||
const draw: typeof import('svelte/transition')['draw']
|
const draw: typeof import('svelte/transition')['draw']
|
||||||
const elasticIn: typeof import('svelte/easing')['elasticIn']
|
const elasticIn: typeof import('svelte/easing')['elasticIn']
|
||||||
const elasticInOut: typeof import('svelte/easing')['elasticInOut']
|
const elasticInOut: typeof import('svelte/easing')['elasticInOut']
|
||||||
const elasticOut: typeof import('svelte/easing')['elasticOut']
|
const elasticOut: typeof import('svelte/easing')['elasticOut']
|
||||||
|
const encodeSvg: typeof import('./utils')['encodeSvg']
|
||||||
const expoIn: typeof import('svelte/easing')['expoIn']
|
const expoIn: typeof import('svelte/easing')['expoIn']
|
||||||
const expoInOut: typeof import('svelte/easing')['expoInOut']
|
const expoInOut: typeof import('svelte/easing')['expoInOut']
|
||||||
const expoOut: typeof import('svelte/easing')['expoOut']
|
const expoOut: typeof import('svelte/easing')['expoOut']
|
||||||
@@ -41,9 +38,9 @@ declare global {
|
|||||||
const getContext: typeof import('svelte')['getContext']
|
const getContext: typeof import('svelte')['getContext']
|
||||||
const hasContext: typeof import('svelte')['hasContext']
|
const hasContext: typeof import('svelte')['hasContext']
|
||||||
const linear: typeof import('svelte/easing')['linear']
|
const linear: typeof import('svelte/easing')['linear']
|
||||||
const load: typeof import('../routes/+page')['load']
|
|
||||||
const onDestroy: typeof import('svelte')['onDestroy']
|
const onDestroy: typeof import('svelte')['onDestroy']
|
||||||
const onMount: typeof import('svelte')['onMount']
|
const onMount: typeof import('svelte')['onMount']
|
||||||
|
const pastSvg: typeof import('./state')['pastSvg']
|
||||||
const quadIn: typeof import('svelte/easing')['quadIn']
|
const quadIn: typeof import('svelte/easing')['quadIn']
|
||||||
const quadInOut: typeof import('svelte/easing')['quadInOut']
|
const quadInOut: typeof import('svelte/easing')['quadInOut']
|
||||||
const quadOut: typeof import('svelte/easing')['quadOut']
|
const quadOut: typeof import('svelte/easing')['quadOut']
|
||||||
@@ -54,7 +51,6 @@ declare global {
|
|||||||
const quintInOut: typeof import('svelte/easing')['quintInOut']
|
const quintInOut: typeof import('svelte/easing')['quintInOut']
|
||||||
const quintOut: typeof import('svelte/easing')['quintOut']
|
const quintOut: typeof import('svelte/easing')['quintOut']
|
||||||
const readable: typeof import('svelte/store')['readable']
|
const readable: typeof import('svelte/store')['readable']
|
||||||
const render: typeof import('./render')['default']
|
|
||||||
const scale: typeof import('svelte/transition')['scale']
|
const scale: typeof import('svelte/transition')['scale']
|
||||||
const setContext: typeof import('svelte')['setContext']
|
const setContext: typeof import('svelte')['setContext']
|
||||||
const sineIn: typeof import('svelte/easing')['sineIn']
|
const sineIn: typeof import('svelte/easing')['sineIn']
|
||||||
@@ -62,7 +58,6 @@ declare global {
|
|||||||
const sineOut: typeof import('svelte/easing')['sineOut']
|
const sineOut: typeof import('svelte/easing')['sineOut']
|
||||||
const slide: typeof import('svelte/transition')['slide']
|
const slide: typeof import('svelte/transition')['slide']
|
||||||
const spring: typeof import('svelte/motion')['spring']
|
const spring: typeof import('svelte/motion')['spring']
|
||||||
const ssr: typeof import('../routes/+page')['ssr']
|
|
||||||
const tick: typeof import('svelte')['tick']
|
const tick: typeof import('svelte')['tick']
|
||||||
const tweened: typeof import('svelte/motion')['tweened']
|
const tweened: typeof import('svelte/motion')['tweened']
|
||||||
const writable: typeof import('svelte/store')['writable']
|
const writable: typeof import('svelte/store')['writable']
|
||||||
|
|||||||
1
apps/www/src/lib/state.ts
Normal file
1
apps/www/src/lib/state.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const pastSvg = writable('');
|
||||||
17
apps/www/src/lib/utils.ts
Normal file
17
apps/www/src/lib/utils.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* @author Taylor Hunt
|
||||||
|
* @see {@link https://codepen.io/tigt/post/optimizing-svgs-in-data-uris}
|
||||||
|
* @see {@link https://gist.github.com/jennyknuth/222825e315d45a738ed9d6e04c7a88d0}
|
||||||
|
*/
|
||||||
|
export function encodeSvg(svg: string) {
|
||||||
|
return svg.replace('<svg', (~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"'))
|
||||||
|
.replace(/"/g, '\'')
|
||||||
|
.replace(/%/g, '%25')
|
||||||
|
.replace(/#/g, '%23')
|
||||||
|
.replace(/{/g, '%7B')
|
||||||
|
.replace(/}/g, '%7D')
|
||||||
|
.replace(/</g, '%3C')
|
||||||
|
.replace(/>/g, '%3E')
|
||||||
|
|
||||||
|
.replace(/\s+/g, ' ');
|
||||||
|
}
|
||||||
11
apps/www/src/params/layout.ts
Normal file
11
apps/www/src/params/layout.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import type { ParamMatcher } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export const match = ((param) => {
|
||||||
|
if (
|
||||||
|
param === 'horizontal.svg'
|
||||||
|
|| param === 'vertical.svg'
|
||||||
|
|| param === 'horizontal'
|
||||||
|
|| param === 'vertical'
|
||||||
|
) return true;
|
||||||
|
else return false;
|
||||||
|
}) satisfies ParamMatcher;
|
||||||
@@ -4,6 +4,13 @@
|
|||||||
import '../app.css';
|
import '../app.css';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div un-bg="#0d1117">
|
<main
|
||||||
|
un-w="screen"
|
||||||
|
un-h="screen"
|
||||||
|
un-bg="black"
|
||||||
|
un-text="white"
|
||||||
|
un-font="sans"
|
||||||
|
un-flex="~ justify-center items-center"
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</main>
|
||||||
|
|||||||
@@ -1,22 +1,191 @@
|
|||||||
<main un-grid="~ rows-4">
|
<script lang="ts">
|
||||||
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#33578a">
|
import type { PageData } from './$types';
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
import { page } from '$app/stores';
|
||||||
<img src="/api.svg" alt="">
|
|
||||||
</div>
|
export let data: PageData;
|
||||||
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#0d1117">
|
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
let title = 'Hello World';
|
||||||
<img src="/api.svg" alt="">
|
let subtitle = 'Welcome to marknow';
|
||||||
</div>
|
let iconName = 'solar:book-bookmark-minimalistic-bold';
|
||||||
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#ffffff">
|
let foreground = '#000000';
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
let background = '#ffffff';
|
||||||
<img src="/api.svg" alt="">
|
let isVertical = false;
|
||||||
</div>
|
let isRtl = false;
|
||||||
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#0a0c10">
|
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
const id = writable(Math.random());
|
||||||
<img src="/api.svg" alt="">
|
|
||||||
</div>
|
let copied = false;
|
||||||
<div un-h="sm" un-flex="~ justify-center items-center" un-bg="#22272e">
|
|
||||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
$: url = new URL(
|
||||||
<img src="/api.svg" alt="">
|
`${$page.url.protocol}//${$page.url.host}/v1/banners/${
|
||||||
</div>
|
isVertical ? 'vertical' : 'horizontal'
|
||||||
</main>
|
}.svg?title=${title}${subtitle ? `&subtitle=${subtitle}` : ''}${
|
||||||
|
iconName ? `&icon=${iconName}` : ''
|
||||||
|
}${
|
||||||
|
foreground !== '#000000'
|
||||||
|
? `&foreground=${foreground.replace('#', '')}`
|
||||||
|
: ''
|
||||||
|
}${
|
||||||
|
background !== '#ffffff'
|
||||||
|
? `&background=${background.replace('#', '')}`
|
||||||
|
: ''
|
||||||
|
}${isRtl ? '&rtl=true' : ''}`,
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div un-h="sm" un-flex="~">
|
||||||
|
<section un-flex="~ col" un-m="r-5" un-w="20em" un-max-w="20em">
|
||||||
|
<div un-flex="~ col">
|
||||||
|
<label un-text="sm" for="title-input">Title</label>
|
||||||
|
<textarea
|
||||||
|
type="text"
|
||||||
|
name="title text"
|
||||||
|
id="title-input"
|
||||||
|
un-p="2"
|
||||||
|
un-font="bold"
|
||||||
|
un-min-h="1em"
|
||||||
|
un-max-h="5em"
|
||||||
|
un-resize-y
|
||||||
|
un-outline="0"
|
||||||
|
bind:value={title}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div un-m="t-3" un-flex="~ col">
|
||||||
|
<label un-text="sm" for="subtitle-input">Subtitle</label>
|
||||||
|
<textarea
|
||||||
|
type="text"
|
||||||
|
name="subtitle text"
|
||||||
|
id="subtitle-input"
|
||||||
|
un-p="2"
|
||||||
|
un-font="bold"
|
||||||
|
un-min-h="4em"
|
||||||
|
un-max-h="9em"
|
||||||
|
un-resize-y
|
||||||
|
un-outline="0"
|
||||||
|
bind:value={subtitle}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div un-m="t-3" un-flex="~ col">
|
||||||
|
<label un-text="sm" for="icon-input">Iconify Icon</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="icon name"
|
||||||
|
id="icon-input"
|
||||||
|
un-p="2"
|
||||||
|
un-font="bold"
|
||||||
|
un-outline="0"
|
||||||
|
bind:value={iconName}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div un-m="t-3">
|
||||||
|
<input
|
||||||
|
type="color"
|
||||||
|
class="p-0 w-1.5em h-1.5em b-0 rounded-md bg-transparent"
|
||||||
|
name="foreground color"
|
||||||
|
id="foreground-input"
|
||||||
|
bind:value={foreground}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
<label un-text="sm" for="foreground-input">Foreground color</label>
|
||||||
|
<input
|
||||||
|
type="color"
|
||||||
|
class="p-0 w-1.5em h-1.5em b-0 rounded-md bg-transparent"
|
||||||
|
name="background color"
|
||||||
|
id="background-input"
|
||||||
|
bind:value={background}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
<label un-text="sm" for="background-input">Background color</label>
|
||||||
|
</div>
|
||||||
|
<div un-m="t-3">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="vertical layout"
|
||||||
|
id="vertical-input"
|
||||||
|
bind:checked={isVertical}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
<label un-text="sm" for="vertical-input">Vertical layout</label>
|
||||||
|
<input
|
||||||
|
un-m="l-5"
|
||||||
|
type="checkbox"
|
||||||
|
name="right to left"
|
||||||
|
id="rtl-input"
|
||||||
|
bind:checked={isRtl}
|
||||||
|
on:input={() => ($id = Math.random())}
|
||||||
|
/>
|
||||||
|
<label un-text="sm" for="rtl-input">Right-to-Left</label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section un-flex="~ col">
|
||||||
|
{#key isVertical || isRtl}
|
||||||
|
{#key $id}
|
||||||
|
<Banner
|
||||||
|
options={{
|
||||||
|
title,
|
||||||
|
subtitle,
|
||||||
|
fonts: data.banner.fonts,
|
||||||
|
layout: isVertical ? 'vertical' : 'horizontal',
|
||||||
|
colors: { background, foreground },
|
||||||
|
icon: iconName,
|
||||||
|
rtl: isRtl,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/key}
|
||||||
|
{/key}
|
||||||
|
<button
|
||||||
|
un-m="1em"
|
||||||
|
un-appearance-none
|
||||||
|
un-bg="transparent"
|
||||||
|
un-text="white opacity-50 start"
|
||||||
|
un-border="0"
|
||||||
|
un-max-w="1000px"
|
||||||
|
un-cursor="pointer"
|
||||||
|
un-relative
|
||||||
|
on:click={() => {
|
||||||
|
navigator.clipboard.writeText(url.toString());
|
||||||
|
copied = true;
|
||||||
|
}}
|
||||||
|
data-tooltip-target
|
||||||
|
on:mouseleave={() => (copied = false)}
|
||||||
|
>
|
||||||
|
<p
|
||||||
|
id="tooltip"
|
||||||
|
role="tooltip"
|
||||||
|
un-absolute
|
||||||
|
un-invisible
|
||||||
|
un-top="-3em"
|
||||||
|
un-z="1"
|
||||||
|
un-transition="all"
|
||||||
|
un-opacity="0"
|
||||||
|
un-transform="translate-y-5px"
|
||||||
|
>
|
||||||
|
<span un-i-solar-clipboard-add-bold un-inline-block un-m="r-1">
|
||||||
|
Pointer
|
||||||
|
</span>
|
||||||
|
{#if copied}
|
||||||
|
Copied to clipboard!
|
||||||
|
{:else}
|
||||||
|
Copy to clipboard
|
||||||
|
{/if}
|
||||||
|
</p>
|
||||||
|
<code>{url}</code>
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
input[type="text"],
|
||||||
|
textarea {
|
||||||
|
@apply bg-transparent b-0 bg-white text-black rounded-md font-sans;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-tooltip-target]:hover > [role="tooltip"] {
|
||||||
|
transform: translateY(0);
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
19
apps/www/src/routes/+page.ts
Normal file
19
apps/www/src/routes/+page.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import type { BannerOptions } from '@marknow/banners';
|
||||||
|
import type { PageLoad } from './$types';
|
||||||
|
|
||||||
|
export const load = (async ({ fetch }) => {
|
||||||
|
const fonts: BannerOptions['fonts'] = {
|
||||||
|
title: {
|
||||||
|
data: await (await fetch('/Mona-Sans-SemiBold.woff')).arrayBuffer(),
|
||||||
|
name: 'Mona Sans',
|
||||||
|
weight: 600,
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
data: await (await fetch('/Mona-Sans-Regular.woff')).arrayBuffer(),
|
||||||
|
name: 'Mona Sans',
|
||||||
|
weight: 400,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { banner: { fonts } };
|
||||||
|
}) satisfies PageLoad;
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
import type { RequestHandler } from '@sveltejs/kit';
|
|
||||||
import newBanner from '@marknow/banners';
|
|
||||||
|
|
||||||
export const GET = (async ({ fetch }): Promise<Response> => {
|
|
||||||
const banner = await newBanner({
|
|
||||||
title: 'Hello world',
|
|
||||||
subtitle: 'This is a test!',
|
|
||||||
icon: 'solar:hand-shake-bold-duotone',
|
|
||||||
colors: {
|
|
||||||
background: '#000000',
|
|
||||||
foreground: '#ffffff',
|
|
||||||
},
|
|
||||||
fonts: {
|
|
||||||
title: {
|
|
||||||
data: await (await fetch('/Mona-Sans-SemiBold.woff')).arrayBuffer(),
|
|
||||||
name: 'Mona Sans',
|
|
||||||
weight: 600,
|
|
||||||
style: 'normal',
|
|
||||||
},
|
|
||||||
subtitle: {
|
|
||||||
data: await (await fetch('/Mona-Sans-Regular.woff')).arrayBuffer(),
|
|
||||||
name: 'Mona Sans',
|
|
||||||
weight: 400,
|
|
||||||
style: 'normal',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
libConfig: {
|
|
||||||
fetcher: fetch,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return new Response(`${banner.toString()}`, {
|
|
||||||
status: 200,
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'image/svg+xml',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}) satisfies RequestHandler;
|
|
||||||
50
apps/www/src/routes/v1/banners/[layout=layout]/+server.ts
Normal file
50
apps/www/src/routes/v1/banners/[layout=layout]/+server.ts
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import type { BannerOptions } from '@marknow/banners';
|
||||||
|
import createBanner from '@marknow/banners';
|
||||||
|
import { type RequestHandler, error } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export const GET = (async ({ params, url, fetch }) => {
|
||||||
|
const title: string | null = url.searchParams.get('title');
|
||||||
|
if (!title)
|
||||||
|
throw error(400, { message: 'Please provide a title parameter for the banner' });
|
||||||
|
|
||||||
|
const layout = <BannerOptions['layout']>params.layout?.replace('.svg', '');
|
||||||
|
const subtitle: string | undefined = url.searchParams.get('subtitle') ?? undefined;
|
||||||
|
const icon: string | undefined = url.searchParams.get('icon') ?? undefined;
|
||||||
|
const rtl: boolean = url.searchParams.get('rtl') !== 'false' && url.searchParams.get('rtl') !== null;
|
||||||
|
|
||||||
|
const colors: BannerOptions['colors'] = {
|
||||||
|
foreground: `#${url.searchParams.get('foreground') ?? '000000'}`,
|
||||||
|
background: `#${url.searchParams.get('background') ?? 'ffffff'}`,
|
||||||
|
};
|
||||||
|
|
||||||
|
const banner = await createBanner({
|
||||||
|
title,
|
||||||
|
layout,
|
||||||
|
subtitle,
|
||||||
|
icon,
|
||||||
|
rtl,
|
||||||
|
colors,
|
||||||
|
fonts: {
|
||||||
|
title: {
|
||||||
|
data: await (await fetch('/Mona-Sans-SemiBold.woff')).arrayBuffer(),
|
||||||
|
name: 'Mona Sans',
|
||||||
|
weight: 600,
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
data: await (await fetch('/Mona-Sans-Regular.woff')).arrayBuffer(),
|
||||||
|
name: 'Mona Sans',
|
||||||
|
weight: 400,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
libConfig: {
|
||||||
|
fetcher: fetch,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return new Response(banner.svg, {
|
||||||
|
headers: {
|
||||||
|
'Content-type': 'image/svg+xml',
|
||||||
|
},
|
||||||
|
status: 200,
|
||||||
|
});
|
||||||
|
}) satisfies RequestHandler;
|
||||||
@@ -46,7 +46,8 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
dirs: [
|
dirs: [
|
||||||
'./src/lib',
|
'./src/lib/components',
|
||||||
|
'./src/routes',
|
||||||
],
|
],
|
||||||
importPathTransform: (importPath) => {
|
importPathTransform: (importPath) => {
|
||||||
if (path.extname(importPath) === '.svg')
|
if (path.extname(importPath) === '.svg')
|
||||||
@@ -69,7 +70,7 @@ export default defineConfig({
|
|||||||
'svelte/transition',
|
'svelte/transition',
|
||||||
],
|
],
|
||||||
dirs: [
|
dirs: [
|
||||||
'./src/**/*',
|
'./src/lib/*',
|
||||||
],
|
],
|
||||||
dts: './src/lib/imports.d.ts',
|
dts: './src/lib/imports.d.ts',
|
||||||
eslintrc: {
|
eslintrc: {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"build:pkg": "turbo run build --filter='./packages/*'",
|
"build:pkg": "turbo run build --filter='./packages/*'",
|
||||||
"dev": "turbo run dev --filter=\"@marknow/www\"",
|
"dev": "turbo run dev --filter=\"@marknow/www\"",
|
||||||
"preview": "turbo run preview --filter=\"@marknow/www\"",
|
"preview": "turbo run preview --filter=\"@marknow/www\"",
|
||||||
"release": "pnpm run build:pkg && changeset publish --access public"
|
"release": "pnpm run build:pkg && changeset publish"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.39.5",
|
"@antfu/eslint-config": "^0.39.5",
|
||||||
|
|||||||
7
packages/banners/CHANGELOG.md
Normal file
7
packages/banners/CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# @marknow/banners
|
||||||
|
|
||||||
|
## 1.1.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 2612c4a: Exposed helper functions of the package, so it can be easier to integrate in things like the live editor.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@marknow/banners",
|
"name": "@marknow/banners",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"source": "./src/index.js",
|
"source": "./src/index.js",
|
||||||
"description": "",
|
"description": "",
|
||||||
@@ -42,5 +42,8 @@
|
|||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
* MIT OR Apache-2.0
|
* MIT OR Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { dirname, join } from 'node:path';
|
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {import('./types').Reader | undefined} [reader=import('node:fs').readFile]
|
* @param {import('./types').Reader | undefined} [reader=import('node:fs').readFile]
|
||||||
* The function to be used as reader of the local files.
|
* The function to be used as reader of the local files.
|
||||||
@@ -28,6 +25,8 @@ import { fileURLToPath } from 'node:url';
|
|||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
export async function getMonaSansFonts(reader) {
|
export async function getMonaSansFonts(reader) {
|
||||||
|
const { dirname, join } = await import('node:path');
|
||||||
|
const { fileURLToPath } = await import('node:url');
|
||||||
reader ||= (await import('node:fs/promises')).readFile;
|
reader ||= (await import('node:fs/promises')).readFile;
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*
|
*
|
||||||
* @module \@marknow/banners
|
* @module \@marknow/banners
|
||||||
* @access protected
|
* @access public
|
||||||
*/
|
*/
|
||||||
export default function html({
|
export default function html({
|
||||||
dimensions,
|
dimensions,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*
|
*
|
||||||
* @module \@marknow/banners
|
* @module \@marknow/banners
|
||||||
* @access protected
|
* @access public
|
||||||
*/
|
*/
|
||||||
export async function getIcon(icon, fetcher = fetch) {
|
export async function getIcon(icon, fetcher = fetch) {
|
||||||
if (!isIconName(icon) && !isValidUrl(icon)) {
|
if (!isIconName(icon) && !isValidUrl(icon)) {
|
||||||
|
|||||||
88
packages/banners/src/index.d.ts
vendored
88
packages/banners/src/index.d.ts
vendored
@@ -19,6 +19,8 @@
|
|||||||
* MIT OR Apache-2.0
|
* MIT OR Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { BannerOptions, Colors, Fetcher, Font } from './types'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The banner constructor function. Use the options to customize the
|
* The banner constructor function. Use the options to customize the
|
||||||
* appearance of the resulting banner.
|
* appearance of the resulting banner.
|
||||||
@@ -64,6 +66,88 @@
|
|||||||
* @module \@marknow/banners
|
* @module \@marknow/banners
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
export default function banner({ title, subtitle, icon, layout, config, }: import('./types').BannerOptions): Promise<import('./types').Banner>;
|
export default function banner(options: BannerOptions): Promise<import('./types').Banner>;
|
||||||
|
|
||||||
export type { BannerOptions, Banner } from './types'
|
/**
|
||||||
|
* Constructor of the HTML banner converted to VNodes to be used in satori.
|
||||||
|
* Use the properties to customize and complete it.
|
||||||
|
*
|
||||||
|
* @typedef {{
|
||||||
|
* dimensions: { width: number, height: number },
|
||||||
|
* fonts: { title: Font, subtitle: Font },
|
||||||
|
* layout: 'vertical' | 'horizontal',
|
||||||
|
* colors: Colors,
|
||||||
|
* rtl: boolean,
|
||||||
|
* }} Props
|
||||||
|
* @param {Props} properties
|
||||||
|
* Properties to be applied on the html.
|
||||||
|
*
|
||||||
|
* @returns {string}
|
||||||
|
*
|
||||||
|
* @module \@marknow/banners
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
export function bannerHtml(properties: {
|
||||||
|
dimensions: { width: number, height: number },
|
||||||
|
layout: 'vertical' | 'horizontal'
|
||||||
|
fonts: { title: Font, subtitle: Font },
|
||||||
|
layout: 'vertical' | 'horizontal',
|
||||||
|
colors: Colors,
|
||||||
|
rtl: boolean,
|
||||||
|
}): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility function used to get a SVG icon from Iconify OR from an url passed as the icon.
|
||||||
|
*
|
||||||
|
* If the `icon` parameter is not a valid icon name or url,
|
||||||
|
* it returns the `icon` itself.
|
||||||
|
*
|
||||||
|
* @param {string} icon
|
||||||
|
* The icon's name or url endpoint.
|
||||||
|
*
|
||||||
|
* @param {import('./types').Fetcher | undefined} [fetcher=globalThis.fetch]
|
||||||
|
* Fetch function to be used.
|
||||||
|
*
|
||||||
|
* @returns {Promise<string>}
|
||||||
|
*
|
||||||
|
* @module \@marknow/banners
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
export function getIcon(icon: string, fetcher?: Fetcher): Promise<string>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility function used to set the icons SVG width and height to the specified dimensions.
|
||||||
|
*
|
||||||
|
* @param {string} svg
|
||||||
|
* The svg string.
|
||||||
|
*
|
||||||
|
* @param {{width?: string | number, height?: string | number}} dimensions
|
||||||
|
* The dimensions values, if type number it is converted to pixels.
|
||||||
|
*
|
||||||
|
* @returns {string}
|
||||||
|
*
|
||||||
|
* @module \@marknow/banners
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
export function setIconDimensions(
|
||||||
|
svg: string,
|
||||||
|
dimensions: {
|
||||||
|
width?: string | number,
|
||||||
|
height?: string | number
|
||||||
|
}
|
||||||
|
): string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Small utility function used to truncate long texts on the banner
|
||||||
|
*
|
||||||
|
* @param {string} string - Text string to be truncated.
|
||||||
|
* @param {number} maxChar - Maximum number of characters.
|
||||||
|
*
|
||||||
|
* @returns {string}
|
||||||
|
*
|
||||||
|
* @module \@marknow/banners
|
||||||
|
* @access package
|
||||||
|
*/
|
||||||
|
export function truncateText(string: string, maxChar: number): string;
|
||||||
|
|
||||||
|
export type { BannerOptions, Banner };
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import { getIcon, setIconDimensions } from './icons';
|
|||||||
* @module \@marknow/banners
|
* @module \@marknow/banners
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
export default async function banner({
|
export async function banner({
|
||||||
title,
|
title,
|
||||||
fonts,
|
fonts,
|
||||||
icon = '',
|
icon = '',
|
||||||
@@ -133,3 +133,5 @@ export default async function banner({
|
|||||||
function truncateText(string, maxChar) {
|
function truncateText(string, maxChar) {
|
||||||
return string.length > maxChar ? `${string.slice(0, maxChar)}...` : string;
|
return string.length > maxChar ? `${string.slice(0, maxChar)}...` : string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { bannerHtml, getIcon, setIconDimensions, banner as default, truncateText };
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ describe('Iconify icons', async () => {
|
|||||||
const result = await banner({
|
const result = await banner({
|
||||||
title: 'Hello World',
|
title: 'Hello World',
|
||||||
subtitle: 'This is a test',
|
subtitle: 'This is a test',
|
||||||
// eslint-disable-next-line spellcheck/spell-checker
|
|
||||||
icon: 'solar:test-tube-minimalistic-bold-duotone',
|
icon: 'solar:test-tube-minimalistic-bold-duotone',
|
||||||
});
|
});
|
||||||
expect(result.toString()).toMatchFileSnapshot('./__snapshots__/icons-withIconifyIcon.svg');
|
expect(result.toString()).toMatchFileSnapshot('./__snapshots__/icons-withIconifyIcon.svg');
|
||||||
|
|||||||
119
pnpm-lock.yaml
generated
119
pnpm-lock.yaml
generated
@@ -64,13 +64,13 @@ importers:
|
|||||||
version: link:../../packages/banners
|
version: link:../../packages/banners
|
||||||
'@poppanator/sveltekit-svg':
|
'@poppanator/sveltekit-svg':
|
||||||
specifier: ^3.0.1
|
specifier: ^3.0.1
|
||||||
version: 3.0.1(svelte@3.59.1)(vite@4.3.9)
|
version: 3.0.1(svelte@4.0.1)(vite@4.3.9)
|
||||||
'@sveltejs/adapter-vercel':
|
'@sveltejs/adapter-vercel':
|
||||||
specifier: ^3.0.1
|
specifier: ^3.0.1
|
||||||
version: 3.0.1(@sveltejs/kit@1.20.2)
|
version: 3.0.1(@sveltejs/kit@1.21.0)
|
||||||
'@sveltejs/kit':
|
'@sveltejs/kit':
|
||||||
specifier: ^1.20.2
|
specifier: ^1.20.4
|
||||||
version: 1.20.2(svelte@3.59.1)(vite@4.3.9)
|
version: 1.21.0(svelte@4.0.1)(vite@4.3.9)
|
||||||
'@typescript-eslint/eslint-plugin':
|
'@typescript-eslint/eslint-plugin':
|
||||||
specifier: ^5.59.11
|
specifier: ^5.59.11
|
||||||
version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3)
|
version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3)
|
||||||
@@ -82,7 +82,7 @@ importers:
|
|||||||
version: 0.52.7
|
version: 0.52.7
|
||||||
mdsvex:
|
mdsvex:
|
||||||
specifier: ^0.10.6
|
specifier: ^0.10.6
|
||||||
version: 0.10.6(svelte@3.59.1)
|
version: 0.10.6(svelte@4.0.1)
|
||||||
rehype-external-links:
|
rehype-external-links:
|
||||||
specifier: ^2.1.0
|
specifier: ^2.1.0
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
@@ -93,19 +93,19 @@ importers:
|
|||||||
specifier: ^0.10.1
|
specifier: ^0.10.1
|
||||||
version: 0.10.1
|
version: 0.10.1
|
||||||
svelte:
|
svelte:
|
||||||
specifier: ^3.59.1
|
specifier: ^4.0.0
|
||||||
version: 3.59.1
|
version: 4.0.1
|
||||||
svelte-check:
|
svelte-check:
|
||||||
specifier: ^3.4.3
|
specifier: ^3.4.3
|
||||||
version: 3.4.3(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@3.59.1)
|
version: 3.4.3(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@4.0.1)
|
||||||
svelte-preprocess:
|
svelte-preprocess:
|
||||||
specifier: ^5.0.4
|
specifier: ^5.0.3
|
||||||
version: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@3.59.1)(typescript@5.1.3)
|
version: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@4.0.1)(typescript@5.1.3)
|
||||||
tslib:
|
tslib:
|
||||||
specifier: ^2.5.3
|
specifier: ^2.5.3
|
||||||
version: 2.5.3
|
version: 2.5.3
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.1.3
|
specifier: ^5.0.0
|
||||||
version: 5.1.3
|
version: 5.1.3
|
||||||
unocss:
|
unocss:
|
||||||
specifier: ^0.52.7
|
specifier: ^0.52.7
|
||||||
@@ -2520,13 +2520,13 @@ packages:
|
|||||||
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
|
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@poppanator/sveltekit-svg@3.0.1(svelte@3.59.1)(vite@4.3.9):
|
/@poppanator/sveltekit-svg@3.0.1(svelte@4.0.1)(vite@4.3.9):
|
||||||
resolution: {integrity: sha512-bRvOZEwQLiM6bVnQ5Gj9Af11ifeuf1BS58wUXeMqc4YfzhENzqfT5SxZVwfQXrPOLYnVUmzxe+cxPXAXDgquJA==}
|
resolution: {integrity: sha512-bRvOZEwQLiM6bVnQ5Gj9Af11ifeuf1BS58wUXeMqc4YfzhENzqfT5SxZVwfQXrPOLYnVUmzxe+cxPXAXDgquJA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: 3.x
|
svelte: 3.x
|
||||||
vite: '>=3.x'
|
vite: '>=3.x'
|
||||||
dependencies:
|
dependencies:
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
svgo: 3.0.2
|
svgo: 3.0.2
|
||||||
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
||||||
dev: true
|
dev: true
|
||||||
@@ -2678,12 +2678,12 @@ packages:
|
|||||||
string.prototype.matchall: 4.0.8
|
string.prototype.matchall: 4.0.8
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sveltejs/adapter-vercel@3.0.1(@sveltejs/kit@1.20.2):
|
/@sveltejs/adapter-vercel@3.0.1(@sveltejs/kit@1.21.0):
|
||||||
resolution: {integrity: sha512-PBY3YRm7Q7Prax07mxD/rvcho2CntGkYncAIkz2DtG5NTcVG5JZ1RM627it5zYYtc2/RB3YjMkZuCMBqDCiPkA==}
|
resolution: {integrity: sha512-PBY3YRm7Q7Prax07mxD/rvcho2CntGkYncAIkz2DtG5NTcVG5JZ1RM627it5zYYtc2/RB3YjMkZuCMBqDCiPkA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@sveltejs/kit': ^1.5.0
|
'@sveltejs/kit': ^1.5.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/kit': 1.20.2(svelte@3.59.1)(vite@4.3.9)
|
'@sveltejs/kit': 1.21.0(svelte@4.0.1)(vite@4.3.9)
|
||||||
'@vercel/nft': 0.22.6
|
'@vercel/nft': 0.22.6
|
||||||
esbuild: 0.17.19
|
esbuild: 0.17.19
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -2691,8 +2691,8 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sveltejs/kit@1.20.2(svelte@3.59.1)(vite@4.3.9):
|
/@sveltejs/kit@1.21.0(svelte@4.0.1)(vite@4.3.9):
|
||||||
resolution: {integrity: sha512-MtR1i+HtmYWcRgtubw1GQqT/+CWXL/z24PegE0xYAdObbhdr7YtEfmoe705D/JZMtMmoPXrmSk4W0MfL5A3lYw==}
|
resolution: {integrity: sha512-CBsYoI34SjtOQp0eG85dmVnvTR3Pjs8VgAQhO0CgQja9BIorKl808F1X8EunPhCcyek5r5lKQE1Mmbi0RuzHqA==}
|
||||||
engines: {node: ^16.14 || >=18}
|
engines: {node: ^16.14 || >=18}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@@ -2700,7 +2700,7 @@ packages:
|
|||||||
svelte: ^3.54.0 || ^4.0.0-next.0
|
svelte: ^3.54.0 || ^4.0.0-next.0
|
||||||
vite: ^4.0.0
|
vite: ^4.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte': 2.4.1(svelte@3.59.1)(vite@4.3.9)
|
'@sveltejs/vite-plugin-svelte': 2.4.1(svelte@4.0.1)(vite@4.3.9)
|
||||||
'@types/cookie': 0.5.1
|
'@types/cookie': 0.5.1
|
||||||
cookie: 0.5.0
|
cookie: 0.5.0
|
||||||
devalue: 4.3.2
|
devalue: 4.3.2
|
||||||
@@ -2711,15 +2711,14 @@ packages:
|
|||||||
sade: 1.8.1
|
sade: 1.8.1
|
||||||
set-cookie-parser: 2.6.0
|
set-cookie-parser: 2.6.0
|
||||||
sirv: 2.0.3
|
sirv: 2.0.3
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
tiny-glob: 0.2.9
|
|
||||||
undici: 5.22.1
|
undici: 5.22.1
|
||||||
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sveltejs/vite-plugin-svelte-inspector@1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@3.59.1)(vite@4.3.9):
|
/@sveltejs/vite-plugin-svelte-inspector@1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@4.0.1)(vite@4.3.9):
|
||||||
resolution: {integrity: sha512-Cy1dUMcYCnDVV/hPLXa43YZJ2jGKVW5rA0xuNL9dlmYhT0yoS1g7+FOFSRlgk0BXKk/Oc7grs+8BVA5Iz2fr8A==}
|
resolution: {integrity: sha512-Cy1dUMcYCnDVV/hPLXa43YZJ2jGKVW5rA0xuNL9dlmYhT0yoS1g7+FOFSRlgk0BXKk/Oc7grs+8BVA5Iz2fr8A==}
|
||||||
engines: {node: ^14.18.0 || >= 16}
|
engines: {node: ^14.18.0 || >= 16}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -2727,28 +2726,28 @@ packages:
|
|||||||
svelte: ^3.54.0 || ^4.0.0-next.0
|
svelte: ^3.54.0 || ^4.0.0-next.0
|
||||||
vite: ^4.0.0
|
vite: ^4.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte': 2.4.1(svelte@3.59.1)(vite@4.3.9)
|
'@sveltejs/vite-plugin-svelte': 2.4.1(svelte@4.0.1)(vite@4.3.9)
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sveltejs/vite-plugin-svelte@2.4.1(svelte@3.59.1)(vite@4.3.9):
|
/@sveltejs/vite-plugin-svelte@2.4.1(svelte@4.0.1)(vite@4.3.9):
|
||||||
resolution: {integrity: sha512-bNNKvoRY89ptY7udeBSCmTdCVwkjmMcZ0j/z9J5MuedT8jPjq0zrknAo/jF1sToAza4NVaAgR9AkZoD9oJJmnA==}
|
resolution: {integrity: sha512-bNNKvoRY89ptY7udeBSCmTdCVwkjmMcZ0j/z9J5MuedT8jPjq0zrknAo/jF1sToAza4NVaAgR9AkZoD9oJJmnA==}
|
||||||
engines: {node: ^14.18.0 || >= 16}
|
engines: {node: ^14.18.0 || >= 16}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: ^3.54.0 || ^4.0.0-next.0
|
svelte: ^3.54.0 || ^4.0.0-next.0
|
||||||
vite: ^4.0.0
|
vite: ^4.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte-inspector': 1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@3.59.1)(vite@4.3.9)
|
'@sveltejs/vite-plugin-svelte-inspector': 1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@4.0.1)(vite@4.3.9)
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
deepmerge: 4.3.1
|
deepmerge: 4.3.1
|
||||||
kleur: 4.1.5
|
kleur: 4.1.5
|
||||||
magic-string: 0.30.0
|
magic-string: 0.30.0
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
svelte-hmr: 0.15.2(svelte@3.59.1)
|
svelte-hmr: 0.15.2(svelte@4.0.1)
|
||||||
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
vite: 4.3.9(@types/node@14.18.33)(sass@1.63.6)
|
||||||
vitefu: 0.2.4(vite@4.3.9)
|
vitefu: 0.2.4(vite@4.3.9)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -2983,7 +2982,7 @@ packages:
|
|||||||
grapheme-splitter: 1.0.4
|
grapheme-splitter: 1.0.4
|
||||||
ignore: 5.2.4
|
ignore: 5.2.4
|
||||||
natural-compare-lite: 1.4.0
|
natural-compare-lite: 1.4.0
|
||||||
semver: 7.5.3
|
semver: 7.5.1
|
||||||
tsutils: 3.21.0(typescript@5.1.3)
|
tsutils: 3.21.0(typescript@5.1.3)
|
||||||
typescript: 5.1.3
|
typescript: 5.1.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -3906,6 +3905,12 @@ packages:
|
|||||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/aria-query@5.3.0:
|
||||||
|
resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
|
||||||
|
dependencies:
|
||||||
|
dequal: 2.0.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
/array-buffer-byte-length@1.0.0:
|
/array-buffer-byte-length@1.0.0:
|
||||||
resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
|
resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4032,6 +4037,12 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/axobject-query@3.2.1:
|
||||||
|
resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==}
|
||||||
|
dependencies:
|
||||||
|
dequal: 2.0.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
/babel-plugin-macros@3.1.0:
|
/babel-plugin-macros@3.1.0:
|
||||||
resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==}
|
resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==}
|
||||||
engines: {node: '>=10', npm: '>=6'}
|
engines: {node: '>=10', npm: '>=6'}
|
||||||
@@ -4515,6 +4526,16 @@ packages:
|
|||||||
resolution: {integrity: sha512-67ueh2IRGst/51p0n6FvPrnRjAGHY5F8xdjkgrYE7DDzpJe6qA07RYQ9VcoUeo5ATOjSOiWpSL3SWBRRbempMw==}
|
resolution: {integrity: sha512-67ueh2IRGst/51p0n6FvPrnRjAGHY5F8xdjkgrYE7DDzpJe6qA07RYQ9VcoUeo5ATOjSOiWpSL3SWBRRbempMw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/code-red@1.0.3:
|
||||||
|
resolution: {integrity: sha512-kVwJELqiILQyG5aeuyKFbdsI1fmQy1Cmf7dQ8eGmVuJoaRVdwey7WaMknr2ZFeVSYSKT0rExsa8EGw0aoI/1QQ==}
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
|
'@types/estree': 1.0.1
|
||||||
|
acorn: 8.9.0
|
||||||
|
estree-walker: 3.0.3
|
||||||
|
periscopic: 3.1.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/color-convert@1.9.3:
|
/color-convert@1.9.3:
|
||||||
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
|
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -7581,6 +7602,10 @@ packages:
|
|||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/locate-character@3.0.0:
|
||||||
|
resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/locate-path@5.0.0:
|
/locate-path@5.0.0:
|
||||||
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
|
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@@ -7884,7 +7909,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
|
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/mdsvex@0.10.6(svelte@3.59.1):
|
/mdsvex@0.10.6(svelte@4.0.1):
|
||||||
resolution: {integrity: sha512-aGRDY0r5jx9+OOgFdyB9Xm3EBr9OUmcrTDPWLB7a7g8VPRxzPy4MOBmcVYgz7ErhAJ7bZ/coUoj6aHio3x/2mA==}
|
resolution: {integrity: sha512-aGRDY0r5jx9+OOgFdyB9Xm3EBr9OUmcrTDPWLB7a7g8VPRxzPy4MOBmcVYgz7ErhAJ7bZ/coUoj6aHio3x/2mA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: 3.x
|
svelte: 3.x
|
||||||
@@ -7892,7 +7917,7 @@ packages:
|
|||||||
'@types/unist': 2.0.6
|
'@types/unist': 2.0.6
|
||||||
prism-svelte: 0.4.7
|
prism-svelte: 0.4.7
|
||||||
prismjs: 1.29.0
|
prismjs: 1.29.0
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
vfile-message: 2.0.4
|
vfile-message: 2.0.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -10553,7 +10578,7 @@ packages:
|
|||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svelte-check@3.4.3(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@3.59.1):
|
/svelte-check@3.4.3(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@4.0.1):
|
||||||
resolution: {integrity: sha512-O07soQFY3X0VDt+bcGc6D5naz0cLtjwnmNP9JsEBPVyMemFEqUhL2OdLqvkl5H/u8Jwm50EiAU4BPRn5iin/kg==}
|
resolution: {integrity: sha512-O07soQFY3X0VDt+bcGc6D5naz0cLtjwnmNP9JsEBPVyMemFEqUhL2OdLqvkl5H/u8Jwm50EiAU4BPRn5iin/kg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -10565,8 +10590,8 @@ packages:
|
|||||||
import-fresh: 3.3.0
|
import-fresh: 3.3.0
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
sade: 1.8.1
|
sade: 1.8.1
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
svelte-preprocess: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@3.59.1)(typescript@5.1.3)
|
svelte-preprocess: 5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@4.0.1)(typescript@5.1.3)
|
||||||
typescript: 5.1.3
|
typescript: 5.1.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@babel/core'
|
- '@babel/core'
|
||||||
@@ -10594,16 +10619,16 @@ packages:
|
|||||||
espree: 9.5.2
|
espree: 9.5.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svelte-hmr@0.15.2(svelte@3.59.1):
|
/svelte-hmr@0.15.2(svelte@4.0.1):
|
||||||
resolution: {integrity: sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==}
|
resolution: {integrity: sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==}
|
||||||
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: ^3.19.0 || ^4.0.0-next.0
|
svelte: ^3.19.0 || ^4.0.0-next.0
|
||||||
dependencies:
|
dependencies:
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svelte-preprocess@5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@3.59.1)(typescript@5.1.3):
|
/svelte-preprocess@5.0.4(@babel/core@7.22.5)(postcss@8.4.24)(sass@1.63.6)(svelte@4.0.1)(typescript@5.1.3):
|
||||||
resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==}
|
resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==}
|
||||||
engines: {node: '>= 14.10.0'}
|
engines: {node: '>= 14.10.0'}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
@@ -10649,13 +10674,27 @@ packages:
|
|||||||
sass: 1.63.6
|
sass: 1.63.6
|
||||||
sorcery: 0.11.0
|
sorcery: 0.11.0
|
||||||
strip-indent: 3.0.0
|
strip-indent: 3.0.0
|
||||||
svelte: 3.59.1
|
svelte: 4.0.1
|
||||||
typescript: 5.1.3
|
typescript: 5.1.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svelte@3.59.1:
|
/svelte@4.0.1:
|
||||||
resolution: {integrity: sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==}
|
resolution: {integrity: sha512-7n2u7A5cu8xCY6MBiXh/Mg6Lh3+Mw2qXlTDBYhzvCvmSM4L4gc4MVo540UtGcjqBiA48E1VDW+EUpBr7iuBlPg==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>=16'}
|
||||||
|
dependencies:
|
||||||
|
'@ampproject/remapping': 2.2.1
|
||||||
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
|
'@jridgewell/trace-mapping': 0.3.18
|
||||||
|
acorn: 8.9.0
|
||||||
|
aria-query: 5.3.0
|
||||||
|
axobject-query: 3.2.1
|
||||||
|
code-red: 1.0.3
|
||||||
|
css-tree: 2.3.1
|
||||||
|
estree-walker: 3.0.3
|
||||||
|
is-reference: 3.0.1
|
||||||
|
locate-character: 3.0.0
|
||||||
|
magic-string: 0.30.0
|
||||||
|
periscopic: 3.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/svgo@2.8.0:
|
/svgo@2.8.0:
|
||||||
|
|||||||
Reference in New Issue
Block a user