@makoai/app-sdk 2.18.0 → 2.18.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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/ui.js +9 -2
package/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  * in a page (or this export) says which SDK a deployed app actually runs.
38
38
  * Kept in step with package.json by snapshot.test.mjs.
39
39
  */
40
- export const SDK_VERSION = "2.18.0";
40
+ export const SDK_VERSION = "2.18.1";
41
41
  if (typeof window !== "undefined") {
42
42
  try {
43
43
  window.__MAKO_APP_SDK__ = SDK_VERSION;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makoai/app-sdk",
3
- "version": "2.18.0",
3
+ "version": "2.18.1",
4
4
  "description": "Mako app SDK: data bindings (useQuery/useDuckDB), URL state, theme, and the house dashboard kit (/ui).",
5
5
  "license": "MIT",
6
6
  "repository": {
package/ui.js CHANGED
@@ -186,12 +186,19 @@ function usePopover(open, setOpen, wrapRef, align) {
186
186
  * like a MultiSelect option row, runs the label's activation behaviour: the
187
187
  * browser clicks the labelled control, the popover's trigger, which closed
188
188
  * the menu. Cancelling the click stops that. Clicks on links, buttons and
189
- * form fields keep their default, and the label ignores those anyway.
189
+ * form fields keep their default, and the label ignores those anyway. A label
190
+ * the app renders inside the popover (a FreshnessBadge action) keeps working.
190
191
  */
191
192
  const LABEL_SAFE = "a[href],button,input,select,textarea,summary";
192
193
  function cancelLabelActivation(e) {
193
194
  const t = e.target;
194
- if (!(t instanceof Element) || !t.closest(LABEL_SAFE)) e.preventDefault();
195
+ if (t instanceof Element) {
196
+ if (t.closest(LABEL_SAFE)) return;
197
+ // A label inside the popover is the app's own: let it click its control.
198
+ const own = t.closest("label");
199
+ if (own && e.currentTarget.contains(own)) return;
200
+ }
201
+ e.preventDefault();
195
202
  }
196
203
 
197
204
  // ---------------------------------------------------------------------------