@classic-homes/theme-react 0.5.0 → 0.5.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.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -498,6 +498,8 @@ interface StudioCanvasItemProps {
|
|
|
498
498
|
invalid?: boolean;
|
|
499
499
|
/** Where the "+" sits: centred on the item's bottom edge, or in the left gutter beside it */
|
|
500
500
|
insertPlacement?: 'center' | 'gutter';
|
|
501
|
+
/** Toolbar straddling the top edge (default) or wholly above the item, for items edited in place. */
|
|
502
|
+
toolbarPlacement?: 'edge' | 'above';
|
|
501
503
|
className?: string;
|
|
502
504
|
}
|
|
503
505
|
/**
|
|
@@ -508,7 +510,7 @@ interface StudioCanvasItemProps {
|
|
|
508
510
|
* scrolls it into view; picking it on the canvas does not. `insertPlacement=
|
|
509
511
|
* "gutter"` puts the "+" in the left margin, clear of text edited in place.
|
|
510
512
|
*/
|
|
511
|
-
declare function StudioCanvasItem({ children, selected, onSelect, label, toolbar, onInsert, insertLabel, invalid, insertPlacement, className, }: StudioCanvasItemProps): React$1.JSX.Element;
|
|
513
|
+
declare function StudioCanvasItem({ children, selected, onSelect, label, toolbar, onInsert, insertLabel, invalid, insertPlacement, toolbarPlacement, className, }: StudioCanvasItemProps): React$1.JSX.Element;
|
|
512
514
|
|
|
513
515
|
interface StudioInspectorTab {
|
|
514
516
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -498,6 +498,8 @@ interface StudioCanvasItemProps {
|
|
|
498
498
|
invalid?: boolean;
|
|
499
499
|
/** Where the "+" sits: centred on the item's bottom edge, or in the left gutter beside it */
|
|
500
500
|
insertPlacement?: 'center' | 'gutter';
|
|
501
|
+
/** Toolbar straddling the top edge (default) or wholly above the item, for items edited in place. */
|
|
502
|
+
toolbarPlacement?: 'edge' | 'above';
|
|
501
503
|
className?: string;
|
|
502
504
|
}
|
|
503
505
|
/**
|
|
@@ -508,7 +510,7 @@ interface StudioCanvasItemProps {
|
|
|
508
510
|
* scrolls it into view; picking it on the canvas does not. `insertPlacement=
|
|
509
511
|
* "gutter"` puts the "+" in the left margin, clear of text edited in place.
|
|
510
512
|
*/
|
|
511
|
-
declare function StudioCanvasItem({ children, selected, onSelect, label, toolbar, onInsert, insertLabel, invalid, insertPlacement, className, }: StudioCanvasItemProps): React$1.JSX.Element;
|
|
513
|
+
declare function StudioCanvasItem({ children, selected, onSelect, label, toolbar, onInsert, insertLabel, invalid, insertPlacement, toolbarPlacement, className, }: StudioCanvasItemProps): React$1.JSX.Element;
|
|
512
514
|
|
|
513
515
|
interface StudioInspectorTab {
|
|
514
516
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -1800,6 +1800,7 @@ function StudioCanvasItem({
|
|
|
1800
1800
|
insertLabel,
|
|
1801
1801
|
invalid = false,
|
|
1802
1802
|
insertPlacement = "center",
|
|
1803
|
+
toolbarPlacement = "edge",
|
|
1803
1804
|
className
|
|
1804
1805
|
}) {
|
|
1805
1806
|
const studio = useStudio();
|
|
@@ -1859,7 +1860,10 @@ function StudioCanvasItem({
|
|
|
1859
1860
|
"div",
|
|
1860
1861
|
{
|
|
1861
1862
|
"data-studio-quick-action": "",
|
|
1862
|
-
className:
|
|
1863
|
+
className: cn(
|
|
1864
|
+
"absolute right-3 z-10 flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5 shadow-md",
|
|
1865
|
+
toolbarPlacement === "above" ? "bottom-full mb-1" : "-top-4"
|
|
1866
|
+
),
|
|
1863
1867
|
children: toolbar
|
|
1864
1868
|
}
|
|
1865
1869
|
),
|
package/dist/index.mjs
CHANGED
|
@@ -1690,6 +1690,7 @@ function StudioCanvasItem({
|
|
|
1690
1690
|
insertLabel,
|
|
1691
1691
|
invalid = false,
|
|
1692
1692
|
insertPlacement = "center",
|
|
1693
|
+
toolbarPlacement = "edge",
|
|
1693
1694
|
className
|
|
1694
1695
|
}) {
|
|
1695
1696
|
const studio = useStudio();
|
|
@@ -1749,7 +1750,10 @@ function StudioCanvasItem({
|
|
|
1749
1750
|
"div",
|
|
1750
1751
|
{
|
|
1751
1752
|
"data-studio-quick-action": "",
|
|
1752
|
-
className:
|
|
1753
|
+
className: cn(
|
|
1754
|
+
"absolute right-3 z-10 flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5 shadow-md",
|
|
1755
|
+
toolbarPlacement === "above" ? "bottom-full mb-1" : "-top-4"
|
|
1756
|
+
),
|
|
1753
1757
|
children: toolbar
|
|
1754
1758
|
}
|
|
1755
1759
|
),
|