bosia 0.5.9 → 0.5.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bosia",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "type": "module",
5
5
  "description": "A fast, batteries-included fullstack framework — SSR · Svelte 5 Runes · Bun · ElysiaJS. File-based routing inspired by SvelteKit. No Node.js, no Vite, no adapters.",
6
6
  "keywords": [
@@ -0,0 +1,45 @@
1
+ import { join } from "path";
2
+ import { existsSync } from "fs";
3
+ import { mergeFontImports } from "./fonts.ts";
4
+
5
+ // ─── bun x bosia@latest add font <family> <url> ─────────────
6
+ // Prepends a Google-Fonts-style `@import url(...)` to src/app.css
7
+ // with a `/* bosia-font: <family> */` marker so it's idempotent
8
+ // and survives Tailwind v4 / LightningCSS @import-ordering rules.
9
+ //
10
+ // Why a dedicated command: appending the @import at the bottom
11
+ // (or anywhere after `@import "tailwindcss"`) causes LightningCSS
12
+ // to silently drop the rule from public/bosia-tw.css. Hand-edits
13
+ // frequently get this wrong; this command always prepends.
14
+
15
+ export async function runAddFont(family: string | undefined, url: string | undefined) {
16
+ if (!family || !url) {
17
+ console.error(
18
+ "❌ Please provide a font family and URL.\n" +
19
+ ' Usage: bun x bosia@latest add font "<Family>" "<@import url>"\n' +
20
+ ' Example: bun x bosia@latest add font "Fredoka" \\\n' +
21
+ ' "https://fonts.googleapis.com/css2?family=Fredoka:wght@400;700&display=swap"',
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ const cwd = process.cwd();
27
+ const appCssPath = join(cwd, "src", "app.css");
28
+
29
+ if (!existsSync(appCssPath)) {
30
+ console.error(`❌ src/app.css not found at ${appCssPath}`);
31
+ process.exit(1);
32
+ }
33
+
34
+ const added = mergeFontImports(appCssPath, { [family]: url });
35
+
36
+ if (added.length === 0) {
37
+ console.log(`⬡ Font already present: ${family} (no changes)`);
38
+ return;
39
+ }
40
+
41
+ console.log(`✅ Added font: ${family}`);
42
+ console.log(` ✍️ src/app.css ← @import url("${url}");`);
43
+ console.log("\n💡 Next: declare it on a token in src/app.css, e.g.");
44
+ console.log(' @theme { --font-display: "' + family + '", sans-serif; }');
45
+ }
package/src/cli/index.ts CHANGED
@@ -48,6 +48,9 @@ async function main() {
48
48
  const themeFlags = args.filter((a) => a.startsWith("--"));
49
49
  const { runAddTheme } = await import("./theme.ts");
50
50
  await runAddTheme(positional[1], themeFlags);
51
+ } else if (sub === "font") {
52
+ const { runAddFont } = await import("./font.ts");
53
+ await runAddFont(positional[1], positional[2]);
51
54
  } else {
52
55
  const { runAdd } = await import("./add.ts");
53
56
  await runAdd(positional, flags);
@@ -77,6 +80,7 @@ Commands:
77
80
  add <component...> [-y] Add one or more UI components from the registry
78
81
  add block <cat>/<name> Add a composed block from the registry
79
82
  add theme <name> Add a theme (tokens.css) from the registry
83
+ add font <family> <url> Prepend an @import url(...) for a font family to src/app.css
80
84
  feat <feature> Add a feature scaffold from the registry [--local]
81
85
 
82
86
  Examples:
@@ -94,6 +98,7 @@ Examples:
94
98
  bun x bosia@latest add shop/cart → src/lib/components/shop/cart/
95
99
  bun x bosia@latest add block cards/feature-editorial
96
100
  bun x bosia@latest add theme editorial
101
+ bun x bosia@latest add font "Fredoka" "https://fonts.googleapis.com/css2?family=Fredoka:wght@400;700&display=swap"
97
102
  bun x bosia@latest feat login
98
103
  `);
99
104
  break;
@@ -6,6 +6,8 @@
6
6
  import { appState, clearDirty } from "./appState.svelte.ts";
7
7
  import { captureSnapshot, liveContext, shouldRerun, type CacheEntry } from "./loaderCache.ts";
8
8
  import { pickErrorPage } from "../errorMatch.ts";
9
+ import { fireAfterNavigate, type Navigation } from "./navListeners.ts";
10
+ import { drainNavResolvers } from "./navigation.ts";
9
11
 
10
12
  let {
11
13
  ssrMode = false,
@@ -129,6 +131,18 @@
129
131
  .catch(() => null)
130
132
  : Promise.resolve(null);
131
133
 
134
+ const settle = (target: { url: URL; params: Record<string, string> } | null) => {
135
+ const nav: Navigation = {
136
+ from: null,
137
+ to: target,
138
+ type: router.lastNavType,
139
+ willUnload: false,
140
+ cancel: () => {},
141
+ };
142
+ fireAfterNavigate(nav);
143
+ drainNavResolvers();
144
+ };
145
+
132
146
  Promise.all([
133
147
  match.route.page(),
134
148
  Promise.all(match.route.layouts.map((l: any) => l())),
@@ -184,7 +198,9 @@
184
198
  appState.errorComponent = errMod.default;
185
199
  appState.errorProps = { error: { status: errStatus, message: errMessage } };
186
200
  appState.errorDepth = K;
187
- if (router.isPush) window.scrollTo(0, 0);
201
+ if (router.isPush && !router.suppressScroll) window.scrollTo(0, 0);
202
+ router.suppressScroll = false;
203
+ settle({ url, params: match.params });
188
204
  } catch {
189
205
  window.location.href = path;
190
206
  }
@@ -272,8 +288,10 @@
272
288
  appState.errorProps = null;
273
289
  appState.errorDepth = null;
274
290
 
275
- // Scroll to top on forward navigation (not on popstate/back-forward)
276
- if (router.isPush) window.scrollTo(0, 0);
291
+ // Scroll to top on forward navigation (not on popstate/back-forward).
292
+ // goto({ noScroll: true }) flips `router.suppressScroll` for one nav.
293
+ if (router.isPush && !router.suppressScroll) window.scrollTo(0, 0);
294
+ router.suppressScroll = false;
277
295
 
278
296
  // Update document title and meta description from server metadata
279
297
  if (result?.metadata) {
@@ -290,6 +308,8 @@
290
308
  meta.content = result.metadata.description;
291
309
  }
292
310
  }
311
+
312
+ settle({ url, params: match.params });
293
313
  });
294
314
 
295
315
  return () => {
@@ -38,6 +38,10 @@ class AppState {
38
38
  // Bumped by `invalidate*()` to wake the App.svelte nav effect, so calling
39
39
  // `invalidate("k")` re-runs the loader pipeline without changing the URL.
40
40
  invalidationTick = $state(0);
41
+ // Resolvers waiting for the next navigation to settle. Drained by
42
+ // App.svelte after each nav effect finishes (success or error). Used by
43
+ // `goto()` to return a Promise that mirrors SvelteKit's contract.
44
+ navResolvers: Array<() => void> = [];
41
45
  }
42
46
 
43
47
  export const appState = new AppState();
@@ -130,7 +130,11 @@ async function main() {
130
130
  }
131
131
  }
132
132
 
133
- main();
133
+ main().catch((err) => {
134
+ // Without this, a hydration failure leaves "Loading..." stuck on screen
135
+ // with no console signal. Surface it loudly instead.
136
+ console.error("[bosia] hydration failed", err);
137
+ });
134
138
 
135
139
  // ─── Hot Reload (dev only) ────────────────────────────────
136
140
 
@@ -0,0 +1,51 @@
1
+ // ─── Navigation lifecycle registry ────────────────────────
2
+ // Shared listener storage for `beforeNavigate` / `afterNavigate`. Kept in a
3
+ // dedicated module so `router.svelte.ts` can fire events without importing
4
+ // `navigation.ts` (which transitively imports the router — would deadlock
5
+ // the ESM evaluation cycle).
6
+
7
+ export interface NavigationTarget {
8
+ url: URL;
9
+ params: Record<string, string>;
10
+ }
11
+
12
+ export interface Navigation {
13
+ from: NavigationTarget | null;
14
+ to: NavigationTarget | null;
15
+ type: "link" | "goto" | "popstate" | "form" | "enter";
16
+ willUnload: boolean;
17
+ cancel: () => void;
18
+ }
19
+
20
+ export type BeforeNavigateCallback = (nav: Navigation) => void | Promise<void>;
21
+ export type AfterNavigateCallback = (nav: Navigation) => void;
22
+
23
+ export const beforeListeners = new Set<BeforeNavigateCallback>();
24
+ export const afterListeners = new Set<AfterNavigateCallback>();
25
+
26
+ /** Returns true when navigation should proceed, false when a listener cancelled it. */
27
+ export function fireBeforeNavigate(nav: Navigation): boolean {
28
+ let cancelled = false;
29
+ nav.cancel = () => {
30
+ cancelled = true;
31
+ };
32
+ for (const fn of beforeListeners) {
33
+ try {
34
+ fn(nav);
35
+ } catch (err) {
36
+ console.warn("[bosia] beforeNavigate listener threw", err);
37
+ }
38
+ if (cancelled) return false;
39
+ }
40
+ return true;
41
+ }
42
+
43
+ export function fireAfterNavigate(nav: Navigation): void {
44
+ for (const fn of afterListeners) {
45
+ try {
46
+ fn(nav);
47
+ } catch (err) {
48
+ console.warn("[bosia] afterNavigate listener threw", err);
49
+ }
50
+ }
51
+ }
@@ -10,10 +10,47 @@
10
10
  // await invalidate((url) => url.pathname.startsWith("/api/"));
11
11
  // await invalidateAll();
12
12
 
13
+ import { onDestroy } from "svelte";
13
14
  import { appState } from "./appState.svelte.ts";
15
+ import { router } from "./router.svelte.ts";
16
+ import {
17
+ afterListeners,
18
+ beforeListeners,
19
+ type AfterNavigateCallback,
20
+ type BeforeNavigateCallback,
21
+ } from "./navListeners.ts";
14
22
 
15
23
  type InvalidateTarget = string | URL | ((url: URL) => boolean);
16
24
 
25
+ export type { Navigation, NavigationTarget } from "./navListeners.ts";
26
+
27
+ /**
28
+ * Register a callback that runs before each client-side navigation. The
29
+ * callback may call `nav.cancel()` to block the navigation. Auto-unregisters
30
+ * when the calling Svelte component is destroyed.
31
+ */
32
+ export function beforeNavigate(fn: BeforeNavigateCallback): void {
33
+ beforeListeners.add(fn);
34
+ try {
35
+ onDestroy(() => beforeListeners.delete(fn));
36
+ } catch {
37
+ // Not inside a component — caller is responsible for lifetime.
38
+ }
39
+ }
40
+
41
+ /**
42
+ * Register a callback that runs after each client-side navigation settles.
43
+ * Auto-unregisters when the calling Svelte component is destroyed.
44
+ */
45
+ export function afterNavigate(fn: AfterNavigateCallback): void {
46
+ afterListeners.add(fn);
47
+ try {
48
+ onDestroy(() => afterListeners.delete(fn));
49
+ } catch {
50
+ // Not inside a component — caller is responsible for lifetime.
51
+ }
52
+ }
53
+
17
54
  function bumpTick() {
18
55
  appState.invalidationTick = appState.invalidationTick + 1;
19
56
  }
@@ -57,3 +94,65 @@ export function invalidateAll(): Promise<void> {
57
94
  bumpTick();
58
95
  return Promise.resolve();
59
96
  }
97
+
98
+ // ─── goto ─────────────────────────────────────────────────
99
+ // Programmatic SPA navigation. Counterpart to SvelteKit's `goto()`.
100
+ //
101
+ // Usage:
102
+ // import { goto } from "bosia/client";
103
+ // await goto("/dashboard");
104
+ // await goto("/login", { replaceState: true, invalidateAll: true });
105
+
106
+ export interface GotoOptions {
107
+ /** Use `history.replaceState` instead of `history.pushState`. */
108
+ replaceState?: boolean;
109
+ /** Mark every loader dirty so the next nav re-runs all of them. */
110
+ invalidateAll?: boolean;
111
+ /** Skip the default scroll-to-top after navigation. */
112
+ noScroll?: boolean;
113
+ /** Reserved — not yet honored by the framework. */
114
+ keepFocus?: boolean;
115
+ /** Reserved — not yet honored (no shallow routing). */
116
+ state?: Record<string, unknown>;
117
+ }
118
+
119
+ /**
120
+ * Navigate to `url` via the client router. Returns a Promise that resolves
121
+ * after the navigation has settled (loaders ran, components mounted) or
122
+ * immediately if the URL matches the current route.
123
+ */
124
+ export function goto(url: string, opts: GotoOptions = {}): Promise<void> {
125
+ if (typeof window === "undefined") return Promise.resolve();
126
+
127
+ if (opts.invalidateAll) {
128
+ appState.dirty.all = true;
129
+ }
130
+ if (opts.noScroll) {
131
+ router.suppressScroll = true;
132
+ }
133
+
134
+ const beforePath = router.currentRoute;
135
+
136
+ return new Promise<void>((resolve) => {
137
+ appState.navResolvers.push(resolve);
138
+ router.navigate(url, { replace: opts.replaceState, source: "goto" });
139
+ // `navigate()` short-circuits when `currentRoute === path` — the nav
140
+ // effect won't fire, so nothing will drain the resolver. Resolve now.
141
+ if (router.currentRoute === beforePath) {
142
+ drainNavResolvers();
143
+ }
144
+ });
145
+ }
146
+
147
+ /** Internal — App.svelte calls this after each nav effect settles. */
148
+ export function drainNavResolvers(): void {
149
+ const queue = appState.navResolvers;
150
+ appState.navResolvers = [];
151
+ for (const fn of queue) {
152
+ try {
153
+ fn();
154
+ } catch (err) {
155
+ console.warn("[bosia] navResolver threw", err);
156
+ }
157
+ }
158
+ }
@@ -4,6 +4,17 @@
4
4
 
5
5
  import { findMatch, canonicalPathname } from "../matcher.ts";
6
6
  import { clientRoutes } from "bosia:routes";
7
+ import { fireBeforeNavigate, type Navigation } from "./navListeners.ts";
8
+
9
+ export type NavType = "link" | "goto" | "popstate" | "form" | "enter";
10
+
11
+ function buildTarget(path: string): { url: URL; params: Record<string, string> } | null {
12
+ if (typeof window === "undefined") return null;
13
+ const pathname = path.split("?")[0].split("#")[0];
14
+ const match = findMatch(clientRoutes, pathname);
15
+ const url = new URL(path, window.location.origin);
16
+ return { url, params: match?.params ?? {} };
17
+ }
7
18
 
8
19
  export const router = new (class Router {
9
20
  currentRoute = $state(
@@ -14,8 +25,12 @@ export const router = new (class Router {
14
25
  params = $state<Record<string, string>>({});
15
26
  /** True when navigation was triggered by a link click / navigate() call, false on popstate (back/forward). */
16
27
  isPush = $state(true);
28
+ /** Source of the most recent navigation — feeds the Navigation object passed to lifecycle hooks. */
29
+ lastNavType: NavType = "enter";
30
+ /** Set by `goto({ noScroll: true })`; consumed once by App.svelte after the next nav settles. */
31
+ suppressScroll = false;
17
32
 
18
- navigate(path: string) {
33
+ navigate(path: string, opts: { replace?: boolean; source?: NavType } = {}) {
19
34
  if (this.currentRoute === path) return;
20
35
  // Unknown route — let the server handle it (renders +error.svelte with 404)
21
36
  const queryHash = path.slice(path.split("?")[0].split("#")[0].length);
@@ -31,10 +46,28 @@ export const router = new (class Router {
31
46
  (match.route as any).trailingSlash ?? "never",
32
47
  );
33
48
  const finalPath = canonical !== null ? canonical + queryHash : path;
49
+
50
+ const navType: NavType = opts.source ?? "link";
51
+ const fromTarget = buildTarget(this.currentRoute);
52
+ const toTarget = buildTarget(finalPath);
53
+ const nav: Navigation = {
54
+ from: fromTarget,
55
+ to: toTarget,
56
+ type: navType,
57
+ willUnload: false,
58
+ cancel: () => {},
59
+ };
60
+ if (!fireBeforeNavigate(nav)) return;
61
+
62
+ this.lastNavType = navType;
34
63
  this.isPush = true;
35
64
  this.currentRoute = finalPath;
36
65
  if (typeof history !== "undefined") {
37
- history.pushState({}, "", finalPath);
66
+ if (opts.replace) {
67
+ history.replaceState({}, "", finalPath);
68
+ } else {
69
+ history.pushState({}, "", finalPath);
70
+ }
38
71
  }
39
72
  }
40
73
 
@@ -57,14 +90,45 @@ export const router = new (class Router {
57
90
  if (anchor.protocol !== "https:" && anchor.protocol !== "http:") return;
58
91
 
59
92
  e.preventDefault();
60
- this.navigate(anchor.pathname + anchor.search + anchor.hash);
93
+ this.navigate(anchor.pathname + anchor.search + anchor.hash, { source: "link" });
61
94
  });
62
95
 
63
96
  // Browser back/forward
64
97
  window.addEventListener("popstate", () => {
65
- this.isPush = false;
66
- this.currentRoute =
98
+ const finalPath =
67
99
  window.location.pathname + window.location.search + window.location.hash;
100
+ // Fire beforeNavigate listeners; popstate can't be reliably cancelled
101
+ // (browser history already advanced), so we surface the event for
102
+ // observation only — `cancel()` is a no-op for this source.
103
+ const fromTarget = buildTarget(this.currentRoute);
104
+ const toTarget = buildTarget(finalPath);
105
+ const nav: Navigation = {
106
+ from: fromTarget,
107
+ to: toTarget,
108
+ type: "popstate",
109
+ willUnload: false,
110
+ cancel: () => {},
111
+ };
112
+ fireBeforeNavigate(nav);
113
+
114
+ this.lastNavType = "popstate";
115
+ this.isPush = false;
116
+ this.currentRoute = finalPath;
117
+ });
118
+
119
+ // Full-page unload — fire beforeNavigate with willUnload=true so
120
+ // listeners can warn-on-leave (return value ignored; cancellation here
121
+ // requires `beforeunload`, not in scope).
122
+ window.addEventListener("beforeunload", () => {
123
+ const fromTarget = buildTarget(this.currentRoute);
124
+ const nav: Navigation = {
125
+ from: fromTarget,
126
+ to: null,
127
+ type: "link",
128
+ willUnload: true,
129
+ cancel: () => {},
130
+ };
131
+ fireBeforeNavigate(nav);
68
132
  });
69
133
  }
70
134
  })();
package/src/lib/client.ts CHANGED
@@ -10,4 +10,11 @@
10
10
 
11
11
  export { enhance } from "../core/client/enhance.ts";
12
12
  export type { SubmitFunction, ActionResult } from "../core/client/enhance.ts";
13
- export { invalidate, invalidateAll } from "../core/client/navigation.ts";
13
+ export {
14
+ afterNavigate,
15
+ beforeNavigate,
16
+ goto,
17
+ invalidate,
18
+ invalidateAll,
19
+ } from "../core/client/navigation.ts";
20
+ export type { GotoOptions, Navigation, NavigationTarget } from "../core/client/navigation.ts";
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#f0f0f0" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#f0f0f0" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#f0f0f0" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#1a1a1a" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#1a1a1a" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#1a1a1a" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#f0f0f0" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#f0f0f0" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#f0f0f0" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#1a1a1a" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#1a1a1a" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#1a1a1a" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#f0f0f0" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#f0f0f0" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#f0f0f0" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#f0f0f0" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Top block -->
3
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="28" rx="6"/>
4
+ <rect fill="#1a1a1a" x="86" y="50" width="60" height="28" rx="6"/>
5
+
6
+ <!-- Middle block -->
7
+ <rect fill="#1a1a1a" x="86" y="86" width="72" height="28" rx="6"/>
8
+
9
+ <!-- Bottom block -->
10
+ <rect fill="#1a1a1a" x="86" y="122" width="60" height="28" rx="6"/>
11
+
12
+ <!-- Connector bar on left -->
13
+ <rect fill="#1a1a1a" x="50" y="50" width="28" height="100" rx="6"/>
14
+ </svg>