@floegence/floe-webapp-core 0.60.1 → 0.61.0
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/app/ActivityAppsMain.d.ts +2 -0
- package/dist/app/ActivityAppsMain.js +15 -12
- package/dist/components/file-browser/Breadcrumb.js +6 -6
- package/dist/components/file-browser/FileGridView.js +29 -27
- package/dist/components/file-browser/FileListView.js +15 -13
- package/dist/components/layout/KeepAliveStack.d.ts +2 -0
- package/dist/components/layout/KeepAliveStack.js +118 -101
- package/dist/components/ui/Settings.d.ts +52 -0
- package/dist/components/ui/Settings.js +183 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/context/ViewActivationContext.d.ts +4 -1
- package/dist/context/ViewActivationContext.js +14 -11
- package/dist/full.js +399 -393
- package/dist/hooks/useResizeObserver.d.ts +5 -1
- package/dist/hooks/useResizeObserver.js +13 -14
- package/dist/hooks/useVirtualWindow.js +13 -13
- package/dist/styles.css +1 -1
- package/dist/ui.css +86 -0
- package/dist/ui.js +77 -71
- package/package.json +1 -1
|
@@ -1,154 +1,171 @@
|
|
|
1
|
-
import { insert as
|
|
2
|
-
import { createMemo as
|
|
3
|
-
import { ViewActivationProvider as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { deferAfterPaint as
|
|
6
|
-
var
|
|
1
|
+
import { insert as P, createComponent as g, effect as B, className as E, setStyleProperty as K, template as R, memo as N, setAttribute as z } from "solid-js/web";
|
|
2
|
+
import { createMemo as S, createSignal as k, untrack as F, createEffect as x, For as j, createRenderEffect as D, onCleanup as G, Suspense as H } from "solid-js";
|
|
3
|
+
import { ViewActivationProvider as J } from "../../context/ViewActivationContext.js";
|
|
4
|
+
import { cn as V } from "../../utils/cn.js";
|
|
5
|
+
import { deferAfterPaint as L } from "../../utils/defer.js";
|
|
6
|
+
var O = /* @__PURE__ */ R("<div>");
|
|
7
7
|
function M(e) {
|
|
8
8
|
return String(e ?? "").trim();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const u = [],
|
|
10
|
+
function C(e) {
|
|
11
|
+
const u = [], s = /* @__PURE__ */ new Set();
|
|
12
12
|
for (const f of e) {
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const a = M(f?.id);
|
|
14
|
+
a && (s.has(a) || (s.add(a), u.push(a)));
|
|
15
15
|
}
|
|
16
16
|
return u;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
for (const
|
|
21
|
-
const
|
|
22
|
-
|
|
18
|
+
function Q(e, u) {
|
|
19
|
+
const s = new Set(e), f = /* @__PURE__ */ new Map();
|
|
20
|
+
for (const a of u) {
|
|
21
|
+
const d = M(a?.id);
|
|
22
|
+
d && s.has(d) && (f.has(d) || f.set(d, a));
|
|
23
23
|
}
|
|
24
24
|
return f;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const [u,
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
if (!
|
|
34
|
-
|
|
26
|
+
function T(e) {
|
|
27
|
+
const [u, s] = k(0), [f, a] = k(!1);
|
|
28
|
+
let d = 0;
|
|
29
|
+
D(() => {
|
|
30
|
+
const c = e.active(), t = e.activationMode();
|
|
31
|
+
d += 1;
|
|
32
|
+
const h = d;
|
|
33
|
+
if (!c) {
|
|
34
|
+
a(!1);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
const v = () => {
|
|
38
|
-
|
|
38
|
+
h !== d || !e.active() || F(f) || (a(!0), s((w) => w + 1));
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
}),
|
|
42
|
-
|
|
40
|
+
t === "after-paint" ? L(v) : v();
|
|
41
|
+
}), G(() => {
|
|
42
|
+
d += 1;
|
|
43
43
|
});
|
|
44
|
-
const A =
|
|
44
|
+
const A = F(() => ({
|
|
45
45
|
id: e.id,
|
|
46
|
+
visible: e.active,
|
|
46
47
|
active: f,
|
|
47
48
|
activationSeq: u
|
|
48
49
|
}));
|
|
49
|
-
return g(
|
|
50
|
+
return g(J, {
|
|
50
51
|
value: A,
|
|
51
52
|
get children() {
|
|
52
|
-
var
|
|
53
|
-
return
|
|
54
|
-
var
|
|
55
|
-
return
|
|
53
|
+
var c = O();
|
|
54
|
+
return P(c, (() => {
|
|
55
|
+
var t = N(() => !!e.renderFallback);
|
|
56
|
+
return () => t() ? g(H, {
|
|
57
|
+
get fallback() {
|
|
58
|
+
return e.renderFallback(e.id);
|
|
59
|
+
},
|
|
60
|
+
get children() {
|
|
61
|
+
return e.children;
|
|
62
|
+
}
|
|
63
|
+
}) : e.children;
|
|
64
|
+
})()), B((t) => {
|
|
65
|
+
var h = e.class, v = e.id, w = e.active() ? void 0 : "true", b = !e.active(), y = e.active() ? "block" : "none";
|
|
66
|
+
return h !== t.e && E(c, t.e = h), v !== t.t && z(c, "data-floe-keep-alive-view", t.t = v), w !== t.a && z(c, "aria-hidden", t.a = w), b !== t.o && (c.inert = t.o = b), y !== t.i && K(c, "display", t.i = y), t;
|
|
56
67
|
}, {
|
|
57
68
|
e: void 0,
|
|
58
|
-
t: void 0
|
|
59
|
-
|
|
69
|
+
t: void 0,
|
|
70
|
+
a: void 0,
|
|
71
|
+
o: void 0,
|
|
72
|
+
i: void 0
|
|
73
|
+
}), c;
|
|
60
74
|
}
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
|
-
function
|
|
64
|
-
const u = () => e.lazyMount !== !1,
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
A((
|
|
68
|
-
let
|
|
69
|
-
const l = new Map(
|
|
70
|
-
for (const
|
|
71
|
-
|
|
72
|
-
for (const
|
|
73
|
-
const
|
|
74
|
-
|
|
77
|
+
function _(e) {
|
|
78
|
+
const u = () => e.lazyMount !== !1, s = () => e.keepMounted !== !1, f = () => e.activationMode ?? "sync", a = S(() => C(e.views)), [d, A] = k(F(() => Q(C(e.views), e.views))), c = S(() => M(e.activeId));
|
|
79
|
+
x(() => {
|
|
80
|
+
const n = a(), i = e.views;
|
|
81
|
+
A((r) => {
|
|
82
|
+
let o = !1;
|
|
83
|
+
const l = new Map(r), q = new Set(n);
|
|
84
|
+
for (const m of l.keys())
|
|
85
|
+
q.has(m) || (l.delete(m), o = !0);
|
|
86
|
+
for (const m of i) {
|
|
87
|
+
const I = M(m?.id);
|
|
88
|
+
I && q.has(I) && (l.has(I) || (l.set(I, m), o = !0));
|
|
75
89
|
}
|
|
76
|
-
return
|
|
90
|
+
return o ? l : r;
|
|
77
91
|
});
|
|
78
92
|
});
|
|
79
|
-
const
|
|
80
|
-
order:
|
|
81
|
-
byId:
|
|
82
|
-
})),
|
|
83
|
-
if (!
|
|
84
|
-
if (!u()) return new Set(
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
}, [v,
|
|
88
|
-
|
|
89
|
-
if (!
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
let
|
|
93
|
-
const
|
|
94
|
-
for (const l of
|
|
95
|
-
if (!
|
|
96
|
-
|
|
93
|
+
const t = S(() => ({
|
|
94
|
+
order: a(),
|
|
95
|
+
byId: d()
|
|
96
|
+
})), h = () => {
|
|
97
|
+
if (!s()) return /* @__PURE__ */ new Set();
|
|
98
|
+
if (!u()) return new Set(t().order);
|
|
99
|
+
const n = c();
|
|
100
|
+
return n ? t().byId.has(n) ? /* @__PURE__ */ new Set([n]) : /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set();
|
|
101
|
+
}, [v, w] = k(h());
|
|
102
|
+
x(() => {
|
|
103
|
+
if (!s()) return;
|
|
104
|
+
const n = new Set(t().order);
|
|
105
|
+
w((i) => {
|
|
106
|
+
let r = !1;
|
|
107
|
+
const o = /* @__PURE__ */ new Set();
|
|
108
|
+
for (const l of i) {
|
|
109
|
+
if (!n.has(l)) {
|
|
110
|
+
r = !0;
|
|
97
111
|
continue;
|
|
98
112
|
}
|
|
99
|
-
|
|
113
|
+
o.add(l);
|
|
100
114
|
}
|
|
101
|
-
return
|
|
115
|
+
return r ? o : i;
|
|
102
116
|
});
|
|
103
|
-
}),
|
|
104
|
-
if (!
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
109
|
-
return
|
|
117
|
+
}), x(() => {
|
|
118
|
+
if (!s() || !u()) return;
|
|
119
|
+
const n = c();
|
|
120
|
+
n && t().byId.has(n) && w((i) => {
|
|
121
|
+
if (i.has(n)) return i;
|
|
122
|
+
const r = new Set(i);
|
|
123
|
+
return r.add(n), r;
|
|
110
124
|
});
|
|
111
125
|
});
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
115
|
-
return
|
|
116
|
-
if (!u()) return
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
}),
|
|
120
|
-
const
|
|
121
|
-
return
|
|
126
|
+
const b = S(() => {
|
|
127
|
+
const n = t().order, i = c();
|
|
128
|
+
if (!s())
|
|
129
|
+
return i ? t().byId.has(i) ? [i] : [] : [];
|
|
130
|
+
if (!u()) return n;
|
|
131
|
+
const r = v();
|
|
132
|
+
return n.filter((o) => r.has(o) || o === i);
|
|
133
|
+
}), y = S(() => {
|
|
134
|
+
const n = c();
|
|
135
|
+
return n ? t().byId.has(n) : !1;
|
|
122
136
|
});
|
|
123
137
|
return (() => {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
138
|
+
var n = O();
|
|
139
|
+
return P(n, g(j, {
|
|
126
140
|
get each() {
|
|
127
|
-
return
|
|
141
|
+
return b();
|
|
128
142
|
},
|
|
129
|
-
children: (
|
|
130
|
-
const
|
|
131
|
-
return g(
|
|
132
|
-
id:
|
|
133
|
-
active: () =>
|
|
143
|
+
children: (i) => {
|
|
144
|
+
const r = () => d().get(i);
|
|
145
|
+
return g(T, {
|
|
146
|
+
id: i,
|
|
147
|
+
active: () => c() === i,
|
|
134
148
|
activationMode: f,
|
|
149
|
+
get renderFallback() {
|
|
150
|
+
return e.renderFallback;
|
|
151
|
+
},
|
|
135
152
|
get class() {
|
|
136
|
-
return
|
|
153
|
+
return V("absolute inset-0", r()?.class);
|
|
137
154
|
},
|
|
138
155
|
get children() {
|
|
139
|
-
return
|
|
156
|
+
return r()?.render();
|
|
140
157
|
}
|
|
141
158
|
});
|
|
142
159
|
}
|
|
143
|
-
})),
|
|
144
|
-
var
|
|
145
|
-
return
|
|
160
|
+
})), B((i) => {
|
|
161
|
+
var r = V("relative h-full min-h-0 w-full", e.class), o = y() ? "block" : "none";
|
|
162
|
+
return r !== i.e && E(n, i.e = r), o !== i.t && K(n, "display", i.t = o), i;
|
|
146
163
|
}, {
|
|
147
164
|
e: void 0,
|
|
148
165
|
t: void 0
|
|
149
|
-
}),
|
|
166
|
+
}), n;
|
|
150
167
|
})();
|
|
151
168
|
}
|
|
152
169
|
export {
|
|
153
|
-
|
|
170
|
+
_ as KeepAliveStack
|
|
154
171
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
/** Host-owned routing and state stay outside this responsive settings frame. */
|
|
3
|
+
export declare function SettingsLayout(props: {
|
|
4
|
+
sidebar: JSX.Element;
|
|
5
|
+
mobileNavigation?: JSX.Element;
|
|
6
|
+
children: JSX.Element;
|
|
7
|
+
class?: string;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
export interface SettingsNavigationItem {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: (props: {
|
|
13
|
+
class?: string;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
attributes?: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
+
}
|
|
17
|
+
export interface SettingsNavigationGroup {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
items: readonly SettingsNavigationItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface SettingsNavigationProps {
|
|
23
|
+
label: string;
|
|
24
|
+
groups: readonly SettingsNavigationGroup[];
|
|
25
|
+
value: string;
|
|
26
|
+
onChange: (id: string) => void;
|
|
27
|
+
search?: JSX.Element;
|
|
28
|
+
empty?: JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
export declare function SettingsNavigation(props: SettingsNavigationProps): JSX.Element;
|
|
31
|
+
export interface SettingsSectionProps extends Omit<JSX.HTMLAttributes<HTMLElement>, 'title'> {
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
badge?: JSX.Element;
|
|
35
|
+
actions?: JSX.Element;
|
|
36
|
+
/** A page owns its primary heading; sections are subordinate groups. */
|
|
37
|
+
variant?: 'page' | 'section';
|
|
38
|
+
}
|
|
39
|
+
export declare function SettingsSection(props: SettingsSectionProps): JSX.Element;
|
|
40
|
+
export declare function SettingsList(props: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
41
|
+
export interface SettingRowProps {
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
icon?: (props: {
|
|
45
|
+
class?: string;
|
|
46
|
+
}) => JSX.Element;
|
|
47
|
+
control?: JSX.Element;
|
|
48
|
+
children?: JSX.Element;
|
|
49
|
+
tone?: 'default' | 'info' | 'success' | 'warning' | 'danger';
|
|
50
|
+
class?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function SettingRow(props: SettingRowProps): JSX.Element;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { insert as n, createComponent as s, effect as v, className as b, setAttribute as h, spread as f, mergeProps as $, template as c } from "solid-js/web";
|
|
2
|
+
import { Show as d, splitProps as w, For as m } from "solid-js";
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
4
|
+
var x = /* @__PURE__ */ c("<div><aside class=floe-settings-layout__sidebar></aside><div class=floe-settings-layout__mobile></div><div class=floe-settings-layout__content>"), k = /* @__PURE__ */ c("<div class=floe-settings-navigation__search>"), N = /* @__PURE__ */ c("<nav class=floe-settings-navigation><div class=floe-settings-navigation__groups>"), L = /* @__PURE__ */ c("<div class=floe-settings-navigation__group><div class=floe-settings-navigation__label>"), P = /* @__PURE__ */ c("<button><span>"), A = /* @__PURE__ */ c("<h1>"), C = /* @__PURE__ */ c("<p>"), F = /* @__PURE__ */ c("<div class=floe-settings-section__actions>"), R = /* @__PURE__ */ c("<section><header class=floe-settings-section__header><div class=floe-settings-section__heading><div class=floe-settings-section__title></div></div></header><div class=floe-settings-section__body>"), j = /* @__PURE__ */ c("<h2>"), q = /* @__PURE__ */ c("<div>"), z = /* @__PURE__ */ c("<div class=floe-setting-row__control>"), B = /* @__PURE__ */ c("<div class=floe-setting-row__body>"), D = /* @__PURE__ */ c("<div><div class=floe-setting-row__main><div class=floe-setting-row__label><div><div class=floe-setting-row__title>");
|
|
5
|
+
function I(t) {
|
|
6
|
+
return (() => {
|
|
7
|
+
var e = x(), o = e.firstChild, i = o.nextSibling, a = i.nextSibling;
|
|
8
|
+
return n(o, () => t.sidebar), n(i, () => t.mobileNavigation), n(a, () => t.children), v(() => b(e, u("floe-settings-layout", t.class))), e;
|
|
9
|
+
})();
|
|
10
|
+
}
|
|
11
|
+
function J(t) {
|
|
12
|
+
return (() => {
|
|
13
|
+
var e = N(), o = e.firstChild;
|
|
14
|
+
return n(e, s(d, {
|
|
15
|
+
get when() {
|
|
16
|
+
return t.search;
|
|
17
|
+
},
|
|
18
|
+
get children() {
|
|
19
|
+
var i = k();
|
|
20
|
+
return n(i, () => t.search), i;
|
|
21
|
+
}
|
|
22
|
+
}), o), n(o, s(d, {
|
|
23
|
+
get when() {
|
|
24
|
+
return t.groups.some((i) => i.items.length);
|
|
25
|
+
},
|
|
26
|
+
get fallback() {
|
|
27
|
+
return t.empty;
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
return s(m, {
|
|
31
|
+
get each() {
|
|
32
|
+
return t.groups;
|
|
33
|
+
},
|
|
34
|
+
children: (i) => s(d, {
|
|
35
|
+
get when() {
|
|
36
|
+
return i.items.length;
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
var a = L(), _ = a.firstChild;
|
|
40
|
+
return n(_, () => i.label), n(a, s(m, {
|
|
41
|
+
get each() {
|
|
42
|
+
return i.items;
|
|
43
|
+
},
|
|
44
|
+
children: (l) => (() => {
|
|
45
|
+
var g = P(), r = g.firstChild;
|
|
46
|
+
return f(g, $(() => l.attributes, {
|
|
47
|
+
type: "button",
|
|
48
|
+
get class() {
|
|
49
|
+
return u("floe-settings-navigation__item", l.attributes?.class);
|
|
50
|
+
},
|
|
51
|
+
get "aria-current"() {
|
|
52
|
+
return t.value === l.id ? "page" : void 0;
|
|
53
|
+
},
|
|
54
|
+
onClick: () => t.onChange(l.id)
|
|
55
|
+
}), !1, !0), n(g, s(d, {
|
|
56
|
+
get when() {
|
|
57
|
+
return l.icon;
|
|
58
|
+
},
|
|
59
|
+
children: (S) => {
|
|
60
|
+
const y = S();
|
|
61
|
+
return s(y, {
|
|
62
|
+
class: "floe-settings-navigation__icon"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}), r), n(r, () => l.label), g;
|
|
66
|
+
})()
|
|
67
|
+
}), null), v(() => h(a, "data-settings-group", i.id)), a;
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
})), v(() => h(e, "aria-label", t.label)), e;
|
|
73
|
+
})();
|
|
74
|
+
}
|
|
75
|
+
function K(t) {
|
|
76
|
+
const [e, o] = w(t, ["title", "description", "badge", "actions", "variant", "class", "children"]);
|
|
77
|
+
return (() => {
|
|
78
|
+
var i = R(), a = i.firstChild, _ = a.firstChild, l = _.firstChild, g = a.nextSibling;
|
|
79
|
+
return f(i, $(o, {
|
|
80
|
+
get class() {
|
|
81
|
+
return u("floe-settings-section", e.class);
|
|
82
|
+
},
|
|
83
|
+
get "data-settings-variant"() {
|
|
84
|
+
return e.variant ?? "section";
|
|
85
|
+
}
|
|
86
|
+
}), !1, !0), n(l, s(d, {
|
|
87
|
+
get when() {
|
|
88
|
+
return e.variant === "page";
|
|
89
|
+
},
|
|
90
|
+
get fallback() {
|
|
91
|
+
return (() => {
|
|
92
|
+
var r = j();
|
|
93
|
+
return n(r, () => e.title), r;
|
|
94
|
+
})();
|
|
95
|
+
},
|
|
96
|
+
get children() {
|
|
97
|
+
var r = A();
|
|
98
|
+
return n(r, () => e.title), r;
|
|
99
|
+
}
|
|
100
|
+
}), null), n(l, () => e.badge, null), n(_, s(d, {
|
|
101
|
+
get when() {
|
|
102
|
+
return e.description;
|
|
103
|
+
},
|
|
104
|
+
get children() {
|
|
105
|
+
var r = C();
|
|
106
|
+
return n(r, () => e.description), r;
|
|
107
|
+
}
|
|
108
|
+
}), null), n(a, s(d, {
|
|
109
|
+
get when() {
|
|
110
|
+
return e.actions;
|
|
111
|
+
},
|
|
112
|
+
get children() {
|
|
113
|
+
var r = F();
|
|
114
|
+
return n(r, () => e.actions), r;
|
|
115
|
+
}
|
|
116
|
+
}), null), n(g, () => e.children), i;
|
|
117
|
+
})();
|
|
118
|
+
}
|
|
119
|
+
function M(t) {
|
|
120
|
+
const [e, o] = w(t, ["class", "children"]);
|
|
121
|
+
return (() => {
|
|
122
|
+
var i = q();
|
|
123
|
+
return f(i, $(o, {
|
|
124
|
+
get class() {
|
|
125
|
+
return u("floe-settings-list", e.class);
|
|
126
|
+
},
|
|
127
|
+
"data-floe-surface": "card"
|
|
128
|
+
}), !1, !0), n(i, () => e.children), i;
|
|
129
|
+
})();
|
|
130
|
+
}
|
|
131
|
+
function O(t) {
|
|
132
|
+
return (() => {
|
|
133
|
+
var e = D(), o = e.firstChild, i = o.firstChild, a = i.firstChild, _ = a.firstChild;
|
|
134
|
+
return n(i, s(d, {
|
|
135
|
+
get when() {
|
|
136
|
+
return t.icon;
|
|
137
|
+
},
|
|
138
|
+
children: (l) => {
|
|
139
|
+
const g = l();
|
|
140
|
+
return s(g, {
|
|
141
|
+
class: "floe-setting-row__icon"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}), a), n(_, () => t.title), n(a, s(d, {
|
|
145
|
+
get when() {
|
|
146
|
+
return t.description;
|
|
147
|
+
},
|
|
148
|
+
get children() {
|
|
149
|
+
var l = C();
|
|
150
|
+
return n(l, () => t.description), l;
|
|
151
|
+
}
|
|
152
|
+
}), null), n(o, s(d, {
|
|
153
|
+
get when() {
|
|
154
|
+
return t.control;
|
|
155
|
+
},
|
|
156
|
+
get children() {
|
|
157
|
+
var l = z();
|
|
158
|
+
return n(l, () => t.control), l;
|
|
159
|
+
}
|
|
160
|
+
}), null), n(e, s(d, {
|
|
161
|
+
get when() {
|
|
162
|
+
return t.children;
|
|
163
|
+
},
|
|
164
|
+
get children() {
|
|
165
|
+
var l = B();
|
|
166
|
+
return n(l, () => t.children), l;
|
|
167
|
+
}
|
|
168
|
+
}), null), v((l) => {
|
|
169
|
+
var g = u("floe-setting-row", t.class), r = t.tone ?? "default";
|
|
170
|
+
return g !== l.e && b(e, l.e = g), r !== l.t && h(e, "data-tone", l.t = r), l;
|
|
171
|
+
}, {
|
|
172
|
+
e: void 0,
|
|
173
|
+
t: void 0
|
|
174
|
+
}), e;
|
|
175
|
+
})();
|
|
176
|
+
}
|
|
177
|
+
export {
|
|
178
|
+
O as SettingRow,
|
|
179
|
+
I as SettingsLayout,
|
|
180
|
+
M as SettingsList,
|
|
181
|
+
J as SettingsNavigation,
|
|
182
|
+
K as SettingsSection
|
|
183
|
+
};
|
|
@@ -42,3 +42,4 @@ export { MobileKeyboard, type MobileKeyboardProps, type MobileKeyboardSuggestion
|
|
|
42
42
|
export { LinearProgress, CircularProgress, SegmentedProgress, StepsProgress, type LinearProgressProps, type CircularProgressProps, type SegmentedProgressProps, type StepsProgressProps, type ProgressSize, type ProgressColor, } from './Progress';
|
|
43
43
|
export { SurfaceAnchoredLayer, type SurfaceAnchoredLayerProps } from './SurfaceAnchoredLayer';
|
|
44
44
|
export { PersistentHorizontalScrollbar, type PersistentHorizontalScrollbarProps } from './PersistentHorizontalScrollbar';
|
|
45
|
+
export { SettingsLayout, SettingsNavigation, SettingsSection, SettingsList, SettingRow, type SettingsNavigationItem, type SettingsNavigationGroup, type SettingsNavigationProps, type SettingsSectionProps, type SettingRowProps, } from './Settings';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type Accessor, type JSX } from 'solid-js';
|
|
2
2
|
export interface ViewActivationContextValue {
|
|
3
3
|
id: string;
|
|
4
|
+
/** Immediate presentation visibility. Custom providers default to their active accessor. */
|
|
5
|
+
visible?: Accessor<boolean>;
|
|
6
|
+
/** Activation effects may wait until after the visible content paints. */
|
|
4
7
|
active: Accessor<boolean>;
|
|
5
8
|
activationSeq: Accessor<number>;
|
|
6
9
|
}
|
|
@@ -9,4 +12,4 @@ export interface ViewActivationProviderProps {
|
|
|
9
12
|
children: JSX.Element;
|
|
10
13
|
}
|
|
11
14
|
export declare function ViewActivationProvider(props: ViewActivationProviderProps): JSX.Element;
|
|
12
|
-
export declare function useViewActivation(): ViewActivationContextValue
|
|
15
|
+
export declare function useViewActivation(): Required<ViewActivationContextValue>;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const o =
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { createComponent as a } from "solid-js/web";
|
|
2
|
+
import { useContext as o, untrack as v, createContext as u } from "solid-js";
|
|
3
|
+
const i = u();
|
|
4
|
+
function w(t) {
|
|
5
|
+
const n = o(i), e = v(() => t.value), r = e.visible ?? e.active, c = {
|
|
6
|
+
...e,
|
|
7
|
+
visible: () => (n?.visible() ?? !0) && r()
|
|
8
|
+
};
|
|
9
|
+
return a(i.Provider, {
|
|
10
|
+
value: c,
|
|
8
11
|
get children() {
|
|
9
12
|
return t.children;
|
|
10
13
|
}
|
|
11
14
|
});
|
|
12
15
|
}
|
|
13
|
-
function
|
|
14
|
-
const t =
|
|
16
|
+
function d() {
|
|
17
|
+
const t = o(i);
|
|
15
18
|
if (!t)
|
|
16
19
|
throw new Error("ViewActivationContext not found. Wrap your view with <ViewActivationProvider />.");
|
|
17
20
|
return t;
|
|
18
21
|
}
|
|
19
22
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
w as ViewActivationProvider,
|
|
24
|
+
d as useViewActivation
|
|
22
25
|
};
|