orbiq-neural-ui-kit 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.
@@ -0,0 +1,36 @@
1
+ import themePlugin from './plugin.js'
2
+ import forms from '@tailwindcss/forms'
3
+ import typography from '@tailwindcss/typography'
4
+ import lucideIconsPlugin from './lucideIconsPlugin.js'
5
+
6
+ // NOTE: Tailwind v3 does NOT merge `content` from presets into the resolved
7
+ // config (it reads only the top-level config's content.files). So consuming
8
+ // apps must list frappe-ui's source globs in their own tailwind.config
9
+ // `content` — declaring them here would be silently ignored. Spread the
10
+ // `content` export from `frappe-ui/tailwind` (see content.js) instead of
11
+ // hand-maintaining the glob list; see docs/content/docs/foundations/tailwind.md.
12
+ // Stock Tailwind's numeric spacing scale has gaps above 12 (13, 15, 17, 18,
13
+ // 19, 21… are undefined), so `h-17` / `size-17` silently don't compile. Fill
14
+ // every integer 1–64 at the canonical 0.25rem step. Values match Tailwind's own
15
+ // formula, so overriding the already-defined keys is a no-op; the win is the
16
+ // in-between steps. Presets DO merge `theme` (unlike `content`), so this reaches
17
+ // consuming apps automatically.
18
+ const integerSpacing = Object.fromEntries(
19
+ Array.from({ length: 64 }, (_, i) => i + 1).map((n) => [n, `${n * 0.25}rem`]),
20
+ )
21
+
22
+ /** @type {import('tailwindcss').Config} */
23
+ export default {
24
+ darkMode: ['selector', '[data-theme="dark"]'],
25
+ theme: {
26
+ extend: {
27
+ spacing: integerSpacing,
28
+ },
29
+ },
30
+ // The editor applies `prose prose-v3` via a computed string in EditorContent,
31
+ // which the JIT scanner can miss (HMR rebuilds, or a consumer that didn't add
32
+ // the molecules glob to `content`) — then prose-v3 typography silently drops.
33
+ // Safelisting keeps the prose component rules emitted regardless of scanning.
34
+ safelist: ['prose', 'prose-v3'],
35
+ plugins: [forms, typography, themePlugin, lucideIconsPlugin],
36
+ }