feat: @gsc/web-kit v0.1.0 — Phase 1 scaffold
The kit. Drop into any GSC Next.js frontend; everything that's not domain content lives here. Wraps @limitless/ui primitives with the app-shaped patterns we keep reimplementing: layout, auth, data display, forms, feedback, navigation. Phase 1 ships the package skeleton: - package.json with 14 sub-exports (./layout · ./auth · ./auth/server · ./auth/middleware · ./shell · ./shell/server · ./data · ./forms · ./feedback · ./navigation · ./api · ./utils + the root and ./css). - Empty module stubs so the import map resolves while later phases fill in real surface area. - Canonical CSS bundle at @gsc/web-kit/css — all.min.css + sidebar-overrides.css + the seven layout-3 background images, copied from chronos and committed in one place so no app has to ship the 1MB sidecar on its own anymore. - tsc-based build + a postbuild script that mirrors @limitless/ui: emits .js + .d.ts, copies styles/, rewrites bare ESM imports to include .js extensions. - Peer deps on next, react, react-dom, bootstrap. - Hard deps on @limitless/ui (file: dep), next-auth, next-intl, zod. Build verified: tsc emits, all 14 export paths resolve under dist/. No functional code yet — Phase 2 lands AppLayout / createAuth / fetchShellConfig and the gscCRM pilot cuts over. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2
src/api/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/api — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/auth/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/auth — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/auth/middleware.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/auth/middleware — Phase 1 stub. Real createAuthMiddleware() lands in Phase 2.
|
||||
export {};
|
||||
2
src/auth/server.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/auth/server — Phase 1 stub. Real createAuth() / requireAuth() lands in Phase 2.
|
||||
export {};
|
||||
2
src/data/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/data — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/feedback/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/feedback — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/forms/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/forms — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
15
src/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// @gsc/web-kit — top-level re-exports.
|
||||
//
|
||||
// Prefer the sub-exports (`@gsc/web-kit/layout`, `…/auth`, etc.) so
|
||||
// tree-shaking can drop modules you don't use. This index is here
|
||||
// for convenience and discovery.
|
||||
|
||||
export * from "./layout/index";
|
||||
export * from "./shell/index";
|
||||
export * from "./data/index";
|
||||
export * from "./forms/index";
|
||||
export * from "./feedback/index";
|
||||
export * from "./navigation/index";
|
||||
export * from "./api/index";
|
||||
export * from "./utils/index";
|
||||
// auth is client-only; auth/server is server-only. Don't aggregate.
|
||||
2
src/layout/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/layout — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/navigation/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/navigation — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/shell/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/shell — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||
2
src/shell/server.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/shell/server — Phase 1 stub. Real fetchShellConfig() lands in Phase 2.
|
||||
export {};
|
||||
32135
src/styles/all.min.css
vendored
Executable file
BIN
src/styles/images/boxed_bg.png
Executable file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/styles/images/layers-2x.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/styles/images/layers.png
Executable file
|
After Width: | Height: | Size: 696 B |
BIN
src/styles/images/login_cover.jpg
Executable file
|
After Width: | Height: | Size: 202 KiB |
BIN
src/styles/images/marker-icon-2x.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/styles/images/marker-icon.png
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/styles/images/marker-shadow.png
Executable file
|
After Width: | Height: | Size: 618 B |
16
src/styles/index.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/* @gsc/web-kit canonical stylesheet.
|
||||
*
|
||||
* Consumers should ALSO import (in this order, before this file):
|
||||
* import "bootstrap/dist/css/bootstrap.min.css";
|
||||
* import "@limitless/ui/css";
|
||||
* import "@gsc/web-kit/css";
|
||||
* import "@phosphor-icons/web/regular";
|
||||
*
|
||||
* The two sheets below own the layout-3 chrome (sidebar/page-content/
|
||||
* navbar-footer rules and the JetBrains Mono font face). Bundlers
|
||||
* inline them; the image refs in all.min.css resolve to ./images/
|
||||
* relative to this file.
|
||||
*/
|
||||
|
||||
@import "./all.min.css";
|
||||
@import "./sidebar-overrides.css";
|
||||
187
src/styles/sidebar-overrides.css
Normal file
@@ -0,0 +1,187 @@
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 200;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-ExtraLight.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 200;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-ExtraLightItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-Light.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-LightItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-Regular.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-Italic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-Medium.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-MediumItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-SemiBold.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-SemiBoldItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-Bold.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-BoldItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-ExtraBold.woff2") format("woff2");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
font-style: italic;
|
||||
font-weight: 800;
|
||||
font-display: swap;
|
||||
src: url("https://assets.gosec.cloud/fonts/jetbrains/JetBrainsMono-ExtraBoldItalic.woff2") format("woff2");
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
font-family: "JetBrains Mono", monospace !important;
|
||||
}
|
||||
|
||||
:root {
|
||||
--body-font-family: "JetBrains Mono", monospace;
|
||||
--font-sans-serif: "JetBrains Mono", monospace;
|
||||
}
|
||||
|
||||
.sidebar-main-resized .nav-sidebar > .nav-item > .nav-link,
|
||||
.sidebar-main-resized .nav-sidebar > .nav-item-submenu > .nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.sidebar-main-resized .nav-sidebar > .nav-item > .nav-link i,
|
||||
.sidebar-main-resized .nav-sidebar > .nav-item-submenu > .nav-link i {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
.sidebar-main-resized .nav-item-submenu > .nav-link:after {
|
||||
content: none !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.sidebar-main-resized .nav-item-submenu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebar-main-resized .nav-item-submenu > .nav-group-sub.nav-group-sub-flyout {
|
||||
position: absolute;
|
||||
top: calc(var(--nav-link-padding-y) * -1);
|
||||
left: 100%;
|
||||
right: auto;
|
||||
width: var(--ll-sidebar-width, 18.75rem);
|
||||
background-color: var(--sidebar-bg, #fff);
|
||||
border: 1px solid var(--border-color-translucent, #dee2e6);
|
||||
box-shadow: var(--box-shadow, 0 0 1rem rgba(0, 0, 0, 0.15));
|
||||
border-radius: var(--border-radius, 0.25rem);
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
display: none !important;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.sidebar-main-resized
|
||||
.nav-item-submenu
|
||||
> .nav-group-sub.nav-group-sub-flyout[data-submenu-title]:before {
|
||||
content: attr(data-submenu-title);
|
||||
display: block;
|
||||
padding: var(--nav-link-padding-y) var(--nav-link-padding-x);
|
||||
padding-bottom: 0;
|
||||
margin-top: var(--nav-link-padding-y);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.sidebar-main-resized
|
||||
.nav-item-submenu.nav-group-sub-visible
|
||||
> .nav-group-sub,
|
||||
.sidebar-main-resized
|
||||
.nav-item-submenu:hover
|
||||
> .nav-group-sub,
|
||||
.sidebar-main-resized
|
||||
.nav-item-submenu:focus-within
|
||||
> .nav-group-sub {
|
||||
display: block !important;
|
||||
}
|
||||
2
src/utils/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// @gsc/web-kit/utils — Phase 1 stub. Real surface lands in later phases.
|
||||
export {};
|
||||