Files
headroom/frontend/node_modules/daisyui/index.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

62 lines
1.9 KiB
JavaScript

const version = "5.5.18"
import { pluginOptionsHandler } from "./functions/pluginOptionsHandler.js"
import { plugin } from "./functions/plugin.js"
import variables from "./functions/variables.js"
import themesObject from "./theme/object.js"
import { base, components, utilities } from "./imports.js"
export default plugin.withOptions(
(options) => {
return ({ addBase, addComponents, addUtilities, addVariant }) => {
const {
include,
exclude,
prefix = "",
} = pluginOptionsHandler(options, addBase, themesObject, version)
const shouldIncludeItem = (name) => {
if (include && exclude) {
return include.includes(name) && !exclude.includes(name)
}
if (include) {
return include.includes(name)
}
if (exclude) {
return !exclude.includes(name)
}
return true
}
Object.entries(base).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addBase, prefix })
})
Object.entries(components).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addComponents, prefix })
})
Object.entries(utilities).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addUtilities, prefix })
})
// drawer variants. Can not be nested in layers so defined here
addVariant(
`${prefix}is-drawer-close`,
`&:where(.${prefix}drawer-toggle:not(:checked) ~ .${prefix}drawer-side, .${prefix}drawer-toggle:not(:checked) ~ .${prefix}drawer-side *)`,
)
addVariant(
`${prefix}is-drawer-open`,
`&:where(.${prefix}drawer-toggle:checked ~ .${prefix}drawer-side, .${prefix}drawer-toggle:checked ~ .${prefix}drawer-side *)`,
)
}
},
() => ({
theme: {
extend: variables,
},
}),
)