@md-code/styles 0.0.0-stage → 0.0.1

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.
Files changed (81) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +771 -2
  3. package/dist/colors-0AY7L5dk.js +244 -0
  4. package/dist/index.js +129 -0
  5. package/dist/themes/colors.js +1 -0
  6. package/dist/themes-BJwXZ1XG.js +419 -0
  7. package/dist/themes.js +3 -0
  8. package/dist/types/GlobalStyles.d.ts +9 -0
  9. package/dist/types/GlobalStyles.d.ts.map +1 -0
  10. package/dist/types/ThemeProviderWrapper.d.ts +4 -0
  11. package/dist/types/ThemeProviderWrapper.d.ts.map +1 -0
  12. package/dist/types/helpers/font.d.ts +2 -0
  13. package/dist/types/helpers/font.d.ts.map +1 -0
  14. package/dist/types/helpers/fullWidth.d.ts +3 -0
  15. package/dist/types/helpers/fullWidth.d.ts.map +1 -0
  16. package/dist/types/helpers/index.d.ts +5 -0
  17. package/dist/types/helpers/index.d.ts.map +1 -0
  18. package/dist/types/helpers/offsets.d.ts +3 -0
  19. package/dist/types/helpers/offsets.d.ts.map +1 -0
  20. package/dist/types/helpers/spaceBetween.d.ts +3 -0
  21. package/dist/types/helpers/spaceBetween.d.ts.map +1 -0
  22. package/dist/types/index.d.ts +9 -0
  23. package/dist/types/index.d.ts.map +1 -0
  24. package/dist/types/theme-provider/styles.d.ts +19 -0
  25. package/dist/types/theme-provider/styles.d.ts.map +1 -0
  26. package/dist/types/themes/baseTheme.d.ts +166 -0
  27. package/dist/types/themes/baseTheme.d.ts.map +1 -0
  28. package/dist/types/themes/board.d.ts +287 -0
  29. package/dist/types/themes/board.d.ts.map +1 -0
  30. package/dist/types/themes/colors.d.ts +3 -0
  31. package/dist/types/themes/colors.d.ts.map +1 -0
  32. package/dist/types/themes/contract/defineTheme.d.ts +17 -0
  33. package/dist/types/themes/contract/defineTheme.d.ts.map +1 -0
  34. package/dist/types/themes/contract/index.d.ts +102 -0
  35. package/dist/types/themes/contract/index.d.ts.map +1 -0
  36. package/dist/types/themes/editor.d.ts +170 -0
  37. package/dist/types/themes/editor.d.ts.map +1 -0
  38. package/dist/types/themes/index.d.ts +12 -0
  39. package/dist/types/themes/index.d.ts.map +1 -0
  40. package/dist/types/themes/liquidGlass.d.ts +157 -0
  41. package/dist/types/themes/liquidGlass.d.ts.map +1 -0
  42. package/dist/types/themes/tokens/base/animation.d.ts +17 -0
  43. package/dist/types/themes/tokens/base/animation.d.ts.map +1 -0
  44. package/dist/types/themes/tokens/base/colors.d.ts +10 -0
  45. package/dist/types/themes/tokens/base/colors.d.ts.map +1 -0
  46. package/dist/types/themes/tokens/base/effects.d.ts +11 -0
  47. package/dist/types/themes/tokens/base/effects.d.ts.map +1 -0
  48. package/dist/types/themes/tokens/base/offsets.d.ts +8 -0
  49. package/dist/types/themes/tokens/base/offsets.d.ts.map +1 -0
  50. package/dist/types/themes/tokens/base/shadows.d.ts +7 -0
  51. package/dist/types/themes/tokens/base/shadows.d.ts.map +1 -0
  52. package/dist/types/themes/tokens/base/shape.d.ts +10 -0
  53. package/dist/types/themes/tokens/base/shape.d.ts.map +1 -0
  54. package/dist/types/themes/tokens/base/typography.d.ts +22 -0
  55. package/dist/types/themes/tokens/base/typography.d.ts.map +1 -0
  56. package/dist/types/themes/tokens/board.d.ts +298 -0
  57. package/dist/types/themes/tokens/board.d.ts.map +1 -0
  58. package/dist/types/themes/tokens/elements.d.ts +24 -0
  59. package/dist/types/themes/tokens/elements.d.ts.map +1 -0
  60. package/dist/types/themes/tokens/offsets.d.ts +20 -0
  61. package/dist/types/themes/tokens/offsets.d.ts.map +1 -0
  62. package/dist/types/themes/tokens/report.d.ts +241 -0
  63. package/dist/types/themes/tokens/report.d.ts.map +1 -0
  64. package/dist/types/themes/tokens/screens.d.ts +24 -0
  65. package/dist/types/themes/tokens/screens.d.ts.map +1 -0
  66. package/dist/types/themes/tokens/variables.d.ts +39 -0
  67. package/dist/types/themes/tokens/variables.d.ts.map +1 -0
  68. package/dist/types/themes/tokens/zIndexes.d.ts +13 -0
  69. package/dist/types/themes/tokens/zIndexes.d.ts.map +1 -0
  70. package/dist/types/themes/types/index.d.ts +8 -0
  71. package/dist/types/themes/types/index.d.ts.map +1 -0
  72. package/dist/types/themes/viking.d.ts +157 -0
  73. package/dist/types/themes/viking.d.ts.map +1 -0
  74. package/dist/types/themes/zones/pair.d.ts +297 -0
  75. package/dist/types/themes/zones/pair.d.ts.map +1 -0
  76. package/dist/types/themes/zones/report.d.ts +451 -0
  77. package/dist/types/themes/zones/report.d.ts.map +1 -0
  78. package/dist/types/types.d.ts +179 -0
  79. package/dist/types/types.d.ts.map +1 -0
  80. package/dist/types.js +0 -0
  81. package/package.json +325 -5
@@ -0,0 +1,244 @@
1
+ // themes/contract/defineTheme.ts
2
+ var e = (e) => e(), t = {
3
+ page: "var(--page-offset)",
4
+ section: "var(--offset-section)",
5
+ betweenElements: "var(--offset-between-elements)",
6
+ elementContent: "var(--offset-element-content)"
7
+ }, n = {
8
+ family: {
9
+ text: "Norse",
10
+ title: "Norse"
11
+ },
12
+ weight: {
13
+ text: "400",
14
+ title: "700"
15
+ },
16
+ transform: {
17
+ text: "none",
18
+ title: "none"
19
+ },
20
+ sizes: {
21
+ small: "0.875rem",
22
+ regular: "1rem",
23
+ large: "1.25rem"
24
+ },
25
+ spacing: "0.1em"
26
+ }, r = {
27
+ header: { height: "var(--height-header)" },
28
+ form: {
29
+ height: "50px",
30
+ minWidth: "var(--min-width-form)"
31
+ },
32
+ icons: {
33
+ height: "20px",
34
+ width: "20px",
35
+ radius: "10px"
36
+ },
37
+ modal: {
38
+ width: "var(--modal-width)",
39
+ height: "var(--modal-height)"
40
+ },
41
+ sidebar: {
42
+ width: "var(--sidebar-width)",
43
+ collapsedWidth: "64px"
44
+ }
45
+ }, i = {
46
+ mobileWidth: 320,
47
+ tabletWidth: 600,
48
+ desktopWidth: 1600,
49
+ mobileHeight: 640,
50
+ tabletHeight: 720,
51
+ desktopHeight: 980
52
+ }, a = {
53
+ mobile: `(min-width: ${i.mobileWidth}px)`,
54
+ tablet: `(min-width: ${i.tabletWidth}px)`,
55
+ desktop: `(min-width: ${i.desktopWidth}px)`
56
+ }, o = {
57
+ mobile: {
58
+ device: a.mobile,
59
+ height: i.mobileHeight,
60
+ width: i.mobileWidth
61
+ },
62
+ tablet: {
63
+ device: a.tablet,
64
+ height: i.tabletHeight,
65
+ width: i.tabletWidth
66
+ },
67
+ desktop: {
68
+ device: a.desktop,
69
+ height: i.desktopHeight,
70
+ width: i.desktopWidth
71
+ }
72
+ }, s = {
73
+ border: {
74
+ size: 1,
75
+ radius: 4
76
+ },
77
+ header: { height: {
78
+ mobile: 75,
79
+ tablet: 100,
80
+ desktop: 100
81
+ } },
82
+ sidebar: { width: 250 },
83
+ font: {
84
+ weight: 500,
85
+ lineHeight: 1
86
+ },
87
+ offsets: {
88
+ section: {
89
+ mobile: 8,
90
+ tablet: 16,
91
+ desktop: 32
92
+ },
93
+ betweenElements: {
94
+ mobile: 8,
95
+ tablet: 8,
96
+ desktop: 16
97
+ },
98
+ elementContent: {
99
+ mobile: 8,
100
+ tablet: 8,
101
+ desktop: 8
102
+ }
103
+ }
104
+ }, c = {
105
+ animatedElements: -1,
106
+ content: 0,
107
+ overlay: 100,
108
+ alert: 1e4
109
+ }, l = "polygon(0% 1.5%, 25% 0%, 55% 2%, 80% 0.5%, 100% 1.5%, 100% 98.5%, 85% 100%, 50% 98%, 20% 100%, 0% 98.5%)", u = "#30d5c8", d = "1px", f = `content: ''; position: absolute; inset: 2px; pointer-events: none; border: ${d} solid ${u}; opacity: 0.2; clip-path: ${l};`, p = /* @__PURE__ */ e(() => ({
110
+ theme: "viking",
111
+ zIndex: c,
112
+ border: {
113
+ radius: "0",
114
+ size: d
115
+ },
116
+ shadows: {
117
+ section: "0 2px 4px rgba(0,0,0,0.3)",
118
+ notification: "0 8px 16px rgba(0,0,0,0.5)",
119
+ content: "0 0 8px rgba(48, 213, 200, 0.45)"
120
+ },
121
+ animation: {
122
+ speed: {
123
+ fast: "0.2s",
124
+ normal: "0.3s",
125
+ slow: "0.4s",
126
+ pulse: "2s"
127
+ },
128
+ easing: {
129
+ standard: "ease",
130
+ inOut: "ease-in-out",
131
+ out: "ease-out",
132
+ linear: "linear",
133
+ spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
134
+ }
135
+ },
136
+ colors: {
137
+ section: "#182022",
138
+ sectionContent: "#ecf0f1",
139
+ overlay: "#0b0e0f",
140
+ highlighted: u,
141
+ highlightedContent: "#081a18"
142
+ },
143
+ effects: {
144
+ texture: "url(\"data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E\")",
145
+ interaction: {
146
+ hover: "\n transform: translateY(-2px);\n filter: brightness(1.15);\n box-shadow: 0 10px 20px -5px rgba(48, 213, 200, 0.2);\n ",
147
+ active: "\n /* Pressed-in look lives ONLY on the active state: the plate sinks by\n 1px and darkens while the inset shadow reads as a cavity. */\n transform: translateY(1px);\n filter: brightness(0.9);\n box-shadow: inset 1px 1px 2px rgba(0,0,0,0.6), inset -0.5px -0.5px 1px rgba(255,255,255,0.05), 0 2px 10px -5px rgba(0,0,0,0.6);\n ",
148
+ focus: "\n outline: 2px solid rgba(48, 213, 200, 0.8);\n outline-offset: 2px;\n ",
149
+ disabled: "\n opacity: 0.45;\n filter: grayscale(0.6);\n cursor: not-allowed;\n "
150
+ }
151
+ },
152
+ geometry: {
153
+ shape: l,
154
+ imprint: f
155
+ },
156
+ font: {
157
+ family: {
158
+ text: "\"Cinzel\", serif",
159
+ title: "\"Cinzel\", serif"
160
+ },
161
+ weight: {
162
+ text: "700",
163
+ title: "700"
164
+ },
165
+ transform: {
166
+ text: "uppercase",
167
+ title: "uppercase"
168
+ },
169
+ sizes: n.sizes,
170
+ spacing: "normal"
171
+ },
172
+ variables: s,
173
+ screens: o,
174
+ offsets: t,
175
+ elements: r
176
+ })), m = "1px", h = "12px", g = "#1f2937", _ = `content: ''; position: absolute; inset: 0; pointer-events: none; border: ${m} solid ${g}; border-radius: ${h}; opacity: 0.35;`, v = /* @__PURE__ */ e(() => ({
177
+ theme: "liquidGlass",
178
+ zIndex: c,
179
+ border: {
180
+ radius: h,
181
+ size: m
182
+ },
183
+ shadows: {
184
+ section: "0 2px 4px rgba(0,0,0,0.1)",
185
+ notification: "0 8px 16px rgba(0,0,0,0.2)",
186
+ content: "0 1px 2px rgba(31, 41, 55, 0.25)"
187
+ },
188
+ animation: {
189
+ speed: {
190
+ fast: "0.2s",
191
+ normal: "0.3s",
192
+ slow: "0.4s",
193
+ pulse: "2s"
194
+ },
195
+ easing: {
196
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
197
+ inOut: "ease-in-out",
198
+ out: "ease-out",
199
+ linear: "linear",
200
+ spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
201
+ }
202
+ },
203
+ colors: {
204
+ section: "rgb(255 255 255 / 20%)",
205
+ sectionContent: g,
206
+ overlay: "rgba(0, 0, 0, 0.05)",
207
+ highlighted: "#3b82f6",
208
+ highlightedContent: "#ffffff"
209
+ },
210
+ effects: {
211
+ texture: "blur(10px)",
212
+ interaction: {
213
+ hover: "\n transform: translateY(-2px);\n filter: brightness(1.05);\n box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);\n ",
214
+ active: "\n transform: translateY(1px);\n filter: brightness(0.95);\n box-shadow: 0 2px 10px -5px rgba(0,0,0,0.1);\n ",
215
+ focus: "\n outline: 2px solid rgba(59, 130, 246, 0.6);\n outline-offset: 2px;\n ",
216
+ disabled: "\n opacity: 0.5;\n cursor: not-allowed;\n "
217
+ }
218
+ },
219
+ geometry: {
220
+ shape: "none",
221
+ imprint: _
222
+ },
223
+ font: {
224
+ family: {
225
+ text: "\"Inter\", sans-serif",
226
+ title: "\"Inter\", sans-serif"
227
+ },
228
+ weight: {
229
+ text: "400",
230
+ title: "400"
231
+ },
232
+ transform: {
233
+ text: "none",
234
+ title: "none"
235
+ },
236
+ sizes: n.sizes,
237
+ spacing: "normal"
238
+ },
239
+ variables: s,
240
+ screens: o,
241
+ offsets: t,
242
+ elements: r
243
+ }));
244
+ export { a, n as c, s as i, t as l, p as n, o, c as r, r as s, v as t, e as u };
package/dist/index.js ADDED
@@ -0,0 +1,129 @@
1
+ import e, { ThemeProvider as t, createGlobalStyle as n, css as r } from "styled-components";
2
+ import i from "styled-reset";
3
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ import { a as c, n as l, r as u, t as d } from "./colors-0AY7L5dk.js";
5
+ import { a as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./themes-BJwXZ1XG.js";
6
+ // theme-provider/styles.ts
7
+ var y = e.div`
8
+ ${({ theme: e }) => `
9
+ --border-radius: ${e.variables.border.radius}px;
10
+ --border-size: ${e.variables.border.size}px;
11
+ --glass-effect: ${e.effects.texture};
12
+
13
+ --page-offset: calc((100% - ${e.screens.desktop.width}px - ${e.offsets.section}) / 2);
14
+
15
+ --sidebar-width: ${e.variables.sidebar.width}px;
16
+ --height-header: ${e.variables.header.height.mobile}px;
17
+ --offset-section: ${e.variables.offsets.section.mobile}px;
18
+ --offset-between-elements: ${e.variables.offsets.betweenElements.mobile}px;
19
+ --offset-element-content: ${e.variables.offsets.elementContent.mobile}px;
20
+ --min-width-form: 100%;
21
+
22
+ --modal-width: 100%;
23
+ --modal-height: calc(100vh - ${e.variables.offsets.section.mobile * 2}px);
24
+
25
+ @media (min-width: ${e.screens.tablet.width}px) {
26
+ --height-header: ${e.variables.header.height.tablet}px;
27
+ --offset-section: ${e.variables.offsets.section.tablet}px;
28
+ --offset-between-elements: ${e.variables.offsets.betweenElements.tablet}px;
29
+ --offset-element-content: ${e.variables.offsets.elementContent.tablet}px;
30
+ --min-width-form: 120px;
31
+ }
32
+
33
+ @media (min-width: ${e.screens.desktop.width}px) {
34
+ --height-header: ${e.variables.header.height.desktop}px;
35
+ --offset-section: ${e.variables.offsets.section.desktop}px;
36
+ --offset-between-elements: ${e.variables.offsets.betweenElements.desktop}px;
37
+ --offset-element-content: ${e.variables.offsets.elementContent.desktop}px;
38
+ --min-width-form: 120px;
39
+
40
+ --modal-width: 90vw;
41
+ --modal-height: 90vh;
42
+ }
43
+ `}
44
+ `, b = n`
45
+ ${i}
46
+
47
+ html,
48
+ body {
49
+ margin: 0;
50
+ padding: 0;
51
+ font-weight: ${({ theme: e }) => e.variables.font.weight};
52
+ font-size: ${({ theme: e }) => e.font.sizes.regular};
53
+ font-family: ${({ theme: e }) => e.font.family.text};
54
+ background-color: ${({ theme: e }) => e.colors.section};
55
+ }
56
+
57
+ * {
58
+ box-sizing: border-box;
59
+ letter-spacing: ${({ theme: e }) => e.font.spacing};
60
+ }
61
+ `, x = ({ children: e, theme: n }) => /* @__PURE__ */ o(t, {
62
+ theme: n,
63
+ children: /* @__PURE__ */ s(a, { children: [
64
+ /* @__PURE__ */ o("link", {
65
+ href: "https://fonts.cdnfonts.com/css/norse",
66
+ rel: "stylesheet"
67
+ }),
68
+ /* @__PURE__ */ o(b, {}),
69
+ /* @__PURE__ */ o(y, { children: e })
70
+ ] })
71
+ }), S = r`
72
+ ${({ $offsetRight: e, theme: t }) => e && t.offsets.betweenElements}
73
+ `, C = r`
74
+ ${({ $offsetBottom: e, theme: t }) => e && t.offsets.betweenElements}
75
+ `, w = r`
76
+ ${({ $fullWidth: e }) => e ? "width: 100%" : ""}
77
+ `, T = r`
78
+ ${({ $spaceBetween: e }) => e ? "display: flex;" : ""}
79
+ ${({ $spaceBetween: e }) => e ? "justify-content: space-between;" : ""}
80
+ `, E = r`
81
+ ${({ theme: e }) => {
82
+ let t = e;
83
+ return `500 ${t?.font?.sizes?.regular || "1rem"} ${t?.font?.family?.text || "sans-serif"}`;
84
+ }}
85
+ `, D = n`
86
+ ${i}
87
+
88
+ /* HTML5 display-role reset for older browsers */
89
+ article, aside, details, figcaption, figure,
90
+ footer, header, hgroup, menu, nav, section {
91
+ display: block;
92
+ }
93
+
94
+ body {
95
+ line-height: ${({ theme: e }) => e.variables.font.lineHeight};
96
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
97
+ background-color: ${({ theme: e }) => e.colors.section};
98
+ color: ${({ theme: e }) => e.colors.sectionContent};
99
+ }
100
+
101
+ ol, ul {
102
+ list-style: none;
103
+ }
104
+
105
+ blockquote, q {
106
+ quotes: none;
107
+ }
108
+
109
+ blockquote::before, blockquote::after,
110
+ q::before, q::after {
111
+ content: '';
112
+ content: none;
113
+ }
114
+
115
+ table {
116
+ border-collapse: collapse;
117
+ border-spacing: 0;
118
+ }
119
+
120
+ * {
121
+ box-sizing: border-box;
122
+ }
123
+
124
+ a {
125
+ text-decoration: none;
126
+ color: inherit;
127
+ }
128
+ `;
129
+ export { D as GlobalStyles, x as ThemeProvider, h as baseTheme, E as basicFont, p as codeBoard, f as codeEditor, c as devices, _ as getZIndex, d as liquidGlass, g as pairTheme, v as reportPanelTheme, m as reportTheme, l as viking, w as withFullWidth, C as withOffsetBottom, S as withOffsetsRight, T as withSpaceBetween, u as zIndexes };
@@ -0,0 +1 @@
1
+ export { t as liquidGlass, n as viking } from "../colors-0AY7L5dk.js";