@marimo-team/islands 0.23.14-dev39 → 0.23.14-dev43
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.
|
@@ -9,7 +9,7 @@ import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
|
9
9
|
import { lt as kioskModeAtom, pt as outputIsStale } from "./html-to-image-DLSOS-bE.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BbqSm5gU.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist--2Bqjvs0.js";
|
|
12
|
-
import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelGroup, i as DEFAULT_DECK_TRANSITION, lt as PanelResizeHandle, on as EyeOff, s as SlideSidebar, sn as Expand, st as Panel, t as useNotebookCodeAvailable, un as Code } from "./code-visibility-
|
|
12
|
+
import { a as DEFAULT_SLIDE_TYPE, c as Slide, ct as PanelGroup, i as DEFAULT_DECK_TRANSITION, lt as PanelResizeHandle, on as EyeOff, s as SlideSidebar, sn as Expand, st as Panel, t as useNotebookCodeAvailable, un as Code } from "./code-visibility-BCkKHNom.js";
|
|
13
13
|
import { X as useDebouncedCallback } from "./input-BSdZp5Ng.js";
|
|
14
14
|
import "./toDate-D1Z7ZXWh.js";
|
|
15
15
|
import "./react-dom-BTJzcVJ9.js";
|
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ export const ReadonlyCode = memo(
|
|
|
76
76
|
language = "python",
|
|
77
77
|
...rest
|
|
78
78
|
} = props;
|
|
79
|
-
const [hideCode, setHideCode] = useState(initiallyHideCode);
|
|
79
|
+
const [hideCode, setHideCode] = useState(!!initiallyHideCode);
|
|
80
80
|
|
|
81
81
|
const extensions = useMemo(
|
|
82
82
|
() => [
|
|
@@ -99,8 +99,8 @@ export const ReadonlyCode = memo(
|
|
|
99
99
|
{insertNewCell && <InsertNewCell code={code} />}
|
|
100
100
|
{showHideCode && (
|
|
101
101
|
<ToggleCodeButton
|
|
102
|
-
hidden={hideCode
|
|
103
|
-
onClick={() => setHideCode(!
|
|
102
|
+
hidden={hideCode}
|
|
103
|
+
onClick={() => setHideCode((prev) => !prev)}
|
|
104
104
|
/>
|
|
105
105
|
)}
|
|
106
106
|
</div>
|
|
@@ -128,7 +128,13 @@ const CopyButton = (props: { text: string }) => {
|
|
|
128
128
|
|
|
129
129
|
return (
|
|
130
130
|
<Tooltip content="Copy code" usePortal={false}>
|
|
131
|
-
<Button
|
|
131
|
+
<Button
|
|
132
|
+
onClick={copy}
|
|
133
|
+
size="xs"
|
|
134
|
+
className="py-0"
|
|
135
|
+
variant="secondary"
|
|
136
|
+
aria-label="Copy code"
|
|
137
|
+
>
|
|
132
138
|
<CopyIcon size={14} strokeWidth={1.5} />
|
|
133
139
|
</Button>
|
|
134
140
|
</Tooltip>
|
|
@@ -143,6 +149,7 @@ const ToggleCodeButton = (props: { hidden: boolean; onClick: () => void }) => {
|
|
|
143
149
|
>
|
|
144
150
|
<Button
|
|
145
151
|
onClick={props.onClick}
|
|
152
|
+
aria-label={props.hidden ? "Show code" : "Hide code"}
|
|
146
153
|
size="xs"
|
|
147
154
|
className="py-0"
|
|
148
155
|
variant="secondary"
|
|
@@ -171,6 +178,7 @@ const InsertNewCell = (props: { code: string }) => {
|
|
|
171
178
|
size="xs"
|
|
172
179
|
className="py-0"
|
|
173
180
|
variant="secondary"
|
|
181
|
+
aria-label="Add code to notebook"
|
|
174
182
|
>
|
|
175
183
|
<PlusIcon size={14} strokeWidth={1.5} />
|
|
176
184
|
</Button>
|