@super-ic/web-patterns 0.0.0-oidc-bootstrap.0 → 0.1.9

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.
@@ -0,0 +1,30 @@
1
+ export const SURFACE_RADIUS_TOKENS = {
2
+ card: "--radius-card",
3
+ border: "--surface-border",
4
+ inset: "--surface-inset",
5
+ cardFrame: "--radius-card-frame",
6
+ cardInset: "--radius-card-inset",
7
+ };
8
+ export const SURFACE_RADIUS_CLASSES = {
9
+ card: "rounded-[var(--radius-card)]",
10
+ cardFrame: "rounded-[var(--radius-card-frame)]",
11
+ cardFrameTop: "rounded-t-[var(--radius-card-frame)]",
12
+ cardInset: "rounded-[var(--radius-card-inset)]",
13
+ };
14
+ function cssVariable(token) {
15
+ if (!/^--[a-z][a-z0-9-]*$/u.test(token)) {
16
+ throw new Error(`Nested surface radii require CSS custom-property tokens, received: ${token}`);
17
+ }
18
+ return `var(${token})`;
19
+ }
20
+ /**
21
+ * The inner radius follows the actual uniform gap between two nested surfaces.
22
+ * max() prevents a small parent token from producing an invalid negative radius.
23
+ */
24
+ export function nestedSurfaceRadius(parentToken = SURFACE_RADIUS_TOKENS.cardFrame, insetToken = SURFACE_RADIUS_TOKENS.inset) {
25
+ return `max(0px, calc(${cssVariable(parentToken)} - ${cssVariable(insetToken)}))`;
26
+ }
27
+ /** Numeric proof helper for responsive recipes that declare their actual inset in pixels. */
28
+ export function nestedSurfaceRadiusValue(parentRadius, inset) {
29
+ return Math.max(0, parentRadius - inset);
30
+ }
package/package.json CHANGED
@@ -1,19 +1,61 @@
1
1
  {
2
2
  "name": "@super-ic/web-patterns",
3
- "version": "0.0.0-oidc-bootstrap.0",
4
- "description": "One-time OIDC name reservation only. No runtime or API. Do not use in production.",
3
+ "version": "0.1.9",
4
+ "description": "Shared marketing patterns for SuperIC: the case-study card contract, surface-radius helpers, and the candidate NeighborhoodLanding recipe.",
5
5
  "license": "UNLICENSED",
6
+ "type": "module",
7
+ "sideEffects": [
8
+ "**/*.css"
9
+ ],
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
6
13
  "files": [
7
- "README.md"
14
+ "dist",
15
+ "README.md",
16
+ "css",
17
+ "contracts"
8
18
  ],
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "./contact-section": {
25
+ "types": "./dist/contact-section.d.ts",
26
+ "default": "./dist/contact-section.js"
27
+ },
28
+ "./contact-section.css": "./css/contact-section.css",
29
+ "./neighborhood-landing.css": "./css/neighborhood-landing.css",
30
+ "./public-content.css": "./css/public-content.css",
31
+ "./tailwind.css": "./css/tailwind.css",
32
+ "./powered-by-superic": {
33
+ "types": "./dist/powered-by-superic.d.ts",
34
+ "default": "./dist/powered-by-superic.js"
35
+ },
36
+ "./powered-by-superic.css": "./css/powered-by-superic.css"
37
+ },
38
+ "scripts": {
39
+ "build": "tsc -b tsconfig.json --force",
40
+ "prepack": "node ../../scripts/prepack-check.mjs"
41
+ },
42
+ "dependencies": {
43
+ "@super-ic/icon-contracts": "0.1.3"
44
+ },
45
+ "peerDependencies": {
46
+ "@super-ic/foundation": "0.2.4",
47
+ "react": ">=19.0.0",
48
+ "react-dom": ">=19.0.0",
49
+ "@super-ic/primitives": "0.1.4",
50
+ "@super-ic/brand-contracts": "0.1.3"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public",
54
+ "registry": "https://registry.npmjs.org/"
55
+ },
9
56
  "repository": {
10
57
  "type": "git",
11
58
  "url": "git+https://github.com/superic-hq/superic-hq.git",
12
59
  "directory": "ds/packages/web-patterns"
13
- },
14
- "publishConfig": {
15
- "access": "public",
16
- "registry": "https://registry.npmjs.org/",
17
- "tag": "oidc-bootstrap"
18
60
  }
19
61
  }