burne-ui 1.5.0 → 1.5.3
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.
- package/cli/init.js +14 -5
- package/dist/components/core/Button/buttonStyles.d.ts +1 -1
- package/dist/components/core/ToggleButton/useToggleButtonFillAnimation.d.ts +5 -0
- package/dist/index.cjs +10 -10
- package/dist/index.js +5068 -5064
- package/dist/ui.css +22 -2
- package/package.json +1 -1
package/cli/init.js
CHANGED
|
@@ -139,18 +139,26 @@ export function BurneProviders({ children }: { children: React.ReactNode }) {
|
|
|
139
139
|
*/
|
|
140
140
|
function resolveProviderPath(cwd, framework) {
|
|
141
141
|
if (framework === "vite") {
|
|
142
|
-
const dir = path.join(cwd, "src"
|
|
142
|
+
const dir = path.join(cwd, "src");
|
|
143
143
|
return {
|
|
144
144
|
dir,
|
|
145
145
|
file: path.join(dir, "burne-providers.tsx"),
|
|
146
|
-
importHint: "./
|
|
146
|
+
importHint: "./burne-providers",
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const dir = path.join(cwd, "app");
|
|
150
|
+
const srcApp = path.join(cwd, "src", "app");
|
|
151
|
+
if (fs.existsSync(srcApp) && !fs.existsSync(dir)) {
|
|
152
|
+
return {
|
|
153
|
+
dir: srcApp,
|
|
154
|
+
file: path.join(srcApp, "burne-providers.tsx"),
|
|
155
|
+
importHint: "./burne-providers",
|
|
147
156
|
};
|
|
148
157
|
}
|
|
149
|
-
const dir = path.join(cwd, "components", "providers");
|
|
150
158
|
return {
|
|
151
159
|
dir,
|
|
152
160
|
file: path.join(dir, "burne-providers.tsx"),
|
|
153
|
-
importHint: "
|
|
161
|
+
importHint: "./burne-providers",
|
|
154
162
|
};
|
|
155
163
|
}
|
|
156
164
|
|
|
@@ -174,6 +182,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
174
182
|
}
|
|
175
183
|
return `// app/layout.tsx
|
|
176
184
|
import { BurneProviders } from "${importHint}";
|
|
185
|
+
import "./globals.css";
|
|
177
186
|
|
|
178
187
|
export default function RootLayout({ children }) {
|
|
179
188
|
return (
|
|
@@ -288,7 +297,7 @@ export async function runInit(argv, cliVersion) {
|
|
|
288
297
|
console.log(`\nburne-ui init v${cliVersion}`);
|
|
289
298
|
console.log(
|
|
290
299
|
framework === "unknown"
|
|
291
|
-
? "Framework: not detected (will use
|
|
300
|
+
? "Framework: not detected (will use app/burne-providers.tsx)\n"
|
|
292
301
|
: `Detected: ${framework}\n`,
|
|
293
302
|
);
|
|
294
303
|
|
|
@@ -23,7 +23,7 @@ export declare const BUTTON_LABEL_LAYER_CLASS = "col-start-1 row-start-1 inline-
|
|
|
23
23
|
export declare const BUTTON_LEFT_ICON_SLOT_CLASS = "inline-flex shrink-0 items-center justify-center";
|
|
24
24
|
export declare const BUTTON_LABEL_TEXT_CLASS = "min-w-0 shrink";
|
|
25
25
|
export declare const BUTTON_ASYNC_GRID_LAYER_CLASS = "col-start-1 row-start-1 flex items-center justify-center";
|
|
26
|
-
/** SSR
|
|
26
|
+
/** SSR: inactive layers hidden in `styles.css` via `[data-button-async-layer][aria-hidden="true"]` */
|
|
27
27
|
export declare const BUTTON_ASYNC_LAYER_DATA_ATTR = "data-button-async-layer";
|
|
28
28
|
export declare const BUTTON_SUCCESS_LAYER_CLASS = "text-success";
|
|
29
29
|
export declare const BUTTON_ERROR_LAYER_CLASS = "text-danger";
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
/** Marks ToggleButton / Calendar cell fill for SSR CSS in `styles.css`. */
|
|
3
|
+
export declare const SELECTION_FILL_DATA_ATTR = "data-selection-fill";
|
|
4
|
+
/** Set by GSAP init — removes SSR hide rule so animations own visibility. */
|
|
5
|
+
export declare const SELECTION_FILL_READY_ATTR = "data-selection-fill-ready";
|
|
2
6
|
/**
|
|
3
7
|
* Fill for ToggleButton / CalendarInteractiveCell.
|
|
4
8
|
* Do not set `style={{ transform, opacity }}` on fill — React will overwrite GSAP on parent re-render.
|
|
9
|
+
* SSR: CSS hides via `[data-selection-fill]:not([data-selection-fill-ready])[data-pressed="false"]`.
|
|
5
10
|
*/
|
|
6
11
|
export declare function applyToggleButtonFillInstant(fill: HTMLElement, pressed: boolean): void;
|
|
7
12
|
export declare function createToggleButtonFillRefCallback(ref: RefObject<HTMLElement | null>, initialPressed: boolean): (node: HTMLElement | null) => void;
|