@tanstack/devtools 0.5.1 → 0.6.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/esm/components/main-panel.js +8 -2
- package/dist/esm/components/main-panel.js.map +1 -1
- package/dist/esm/components/tabs.js +10 -0
- package/dist/esm/components/tabs.js.map +1 -1
- package/dist/esm/context/draw-context.d.ts +13 -0
- package/dist/esm/context/draw-context.js +55 -0
- package/dist/esm/context/draw-context.js.map +1 -0
- package/dist/esm/context/use-devtools-context.js +10 -1
- package/dist/esm/context/use-devtools-context.js.map +1 -1
- package/dist/esm/hooks/use-head-changes.d.ts +39 -0
- package/dist/esm/hooks/use-head-changes.js +65 -0
- package/dist/esm/hooks/use-head-changes.js.map +1 -0
- package/dist/esm/styles/tokens.js +4 -1
- package/dist/esm/styles/tokens.js.map +1 -1
- package/dist/esm/styles/use-styles.d.ts +19 -0
- package/dist/esm/styles/use-styles.js +143 -3
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/dist/esm/tabs/index.d.ts +5 -0
- package/dist/esm/tabs/index.js +8 -2
- package/dist/esm/tabs/index.js.map +1 -1
- package/dist/esm/tabs/plugins-tab.js +31 -13
- package/dist/esm/tabs/plugins-tab.js.map +1 -1
- package/dist/esm/tabs/seo-tab.d.ts +1 -0
- package/dist/esm/tabs/seo-tab.js +291 -0
- package/dist/esm/tabs/seo-tab.js.map +1 -0
- package/package.json +1 -1
- package/src/components/main-panel.tsx +5 -1
- package/src/components/tabs.tsx +9 -0
- package/src/context/draw-context.tsx +67 -0
- package/src/context/use-devtools-context.ts +12 -2
- package/src/hooks/use-head-changes.ts +110 -0
- package/src/styles/use-styles.ts +148 -3
- package/src/tabs/index.tsx +25 -0
- package/src/tabs/plugins-tab.tsx +51 -23
- package/src/tabs/seo-tab.tsx +238 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { template, setAttribute, insert, effect, className } from "solid-js/web";
|
|
1
|
+
import { template, setAttribute, insert, createComponent, effect, className } from "solid-js/web";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
+
import { DrawClientProvider } from "../context/draw-context.js";
|
|
3
4
|
import { useHeight, useDevtoolsSettings } from "../context/use-devtools-context.js";
|
|
4
5
|
import { useStyles } from "../styles/use-styles.js";
|
|
5
6
|
import { TANSTACK_DEVTOOLS } from "../utils/storage.js";
|
|
@@ -17,7 +18,12 @@ const MainPanel = (props) => {
|
|
|
17
18
|
return (() => {
|
|
18
19
|
var _el$ = _tmpl$();
|
|
19
20
|
setAttribute(_el$, "id", TANSTACK_DEVTOOLS);
|
|
20
|
-
insert(_el$, (
|
|
21
|
+
insert(_el$, createComponent(DrawClientProvider, {
|
|
22
|
+
animationMs: 400,
|
|
23
|
+
get children() {
|
|
24
|
+
return props.children;
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
21
27
|
effect((_p$) => {
|
|
22
28
|
var _v$ = pip().pipWindow ? "100vh" : height() + "px", _v$2 = clsx(styles().devtoolsPanelContainer(settings().panelLocation, Boolean(pip().pipWindow)), styles().devtoolsPanelContainerAnimation(props.isOpen(), height()), styles().devtoolsPanelContainerVisibility(props.isOpen()), styles().devtoolsPanelContainerResizing(props.isResizing));
|
|
23
29
|
_v$ !== _p$.e && ((_p$.e = _v$) != null ? _el$.style.setProperty("height", _v$) : _el$.style.removeProperty("height"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-panel.js","sources":["../../../src/components/main-panel.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { useDevtoolsSettings, useHeight } from '../context/use-devtools-context'\nimport { useStyles } from '../styles/use-styles'\nimport { TANSTACK_DEVTOOLS } from '../utils/storage'\nimport { usePiPWindow } from '../context/pip-context'\nimport type { Accessor, JSX } from 'solid-js'\n\nexport const MainPanel = (props: {\n isOpen: Accessor<boolean>\n children: JSX.Element\n isResizing: Accessor<boolean>\n}) => {\n const styles = useStyles()\n const { height } = useHeight()\n const { settings } = useDevtoolsSettings()\n const pip = usePiPWindow()\n return (\n <div\n id={TANSTACK_DEVTOOLS}\n style={{\n height: pip().pipWindow ? '100vh' : height() + 'px',\n }}\n class={clsx(\n styles().devtoolsPanelContainer(\n settings().panelLocation,\n Boolean(pip().pipWindow),\n ),\n styles().devtoolsPanelContainerAnimation(props.isOpen(), height()),\n styles().devtoolsPanelContainerVisibility(props.isOpen()),\n styles().devtoolsPanelContainerResizing(props.isResizing),\n )}\n >\n {props.children}\n </div>\n )\n}\n"],"names":["MainPanel","props","styles","useStyles","height","useHeight","settings","useDevtoolsSettings","pip","usePiPWindow","_el$","_tmpl$","_$setAttribute","TANSTACK_DEVTOOLS","_$insert","children","_$effect","_p$","_v$","pipWindow","_v$2","clsx","devtoolsPanelContainer","panelLocation","Boolean","devtoolsPanelContainerAnimation","isOpen","devtoolsPanelContainerVisibility","devtoolsPanelContainerResizing","isResizing","e","style","setProperty","removeProperty","t","_$className","undefined"],"mappings":"
|
|
1
|
+
{"version":3,"file":"main-panel.js","sources":["../../../src/components/main-panel.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { DrawClientProvider } from '../context/draw-context'\nimport { useDevtoolsSettings, useHeight } from '../context/use-devtools-context'\nimport { useStyles } from '../styles/use-styles'\nimport { TANSTACK_DEVTOOLS } from '../utils/storage'\nimport { usePiPWindow } from '../context/pip-context'\n\nimport type { Accessor, JSX } from 'solid-js'\n\nexport const MainPanel = (props: {\n isOpen: Accessor<boolean>\n children: JSX.Element\n isResizing: Accessor<boolean>\n}) => {\n const styles = useStyles()\n const { height } = useHeight()\n const { settings } = useDevtoolsSettings()\n const pip = usePiPWindow()\n return (\n <div\n id={TANSTACK_DEVTOOLS}\n style={{\n height: pip().pipWindow ? '100vh' : height() + 'px',\n }}\n class={clsx(\n styles().devtoolsPanelContainer(\n settings().panelLocation,\n Boolean(pip().pipWindow),\n ),\n styles().devtoolsPanelContainerAnimation(props.isOpen(), height()),\n styles().devtoolsPanelContainerVisibility(props.isOpen()),\n styles().devtoolsPanelContainerResizing(props.isResizing),\n )}\n >\n <DrawClientProvider animationMs={400}>\n {props.children}\n </DrawClientProvider>\n </div>\n )\n}\n"],"names":["MainPanel","props","styles","useStyles","height","useHeight","settings","useDevtoolsSettings","pip","usePiPWindow","_el$","_tmpl$","_$setAttribute","TANSTACK_DEVTOOLS","_$insert","_$createComponent","DrawClientProvider","animationMs","children","_$effect","_p$","_v$","pipWindow","_v$2","clsx","devtoolsPanelContainer","panelLocation","Boolean","devtoolsPanelContainerAnimation","isOpen","devtoolsPanelContainerVisibility","devtoolsPanelContainerResizing","isResizing","e","style","setProperty","removeProperty","t","_$className","undefined"],"mappings":";;;;;;;;AASO,MAAMA,YAAYA,CAACC,UAIpB;AACJ,QAAMC,SAASC,UAAAA;AACf,QAAM;AAAA,IAAEC;AAAAA,EAAAA,IAAWC,UAAAA;AACnB,QAAM;AAAA,IAAEC;AAAAA,EAAAA,IAAaC,oBAAAA;AACrB,QAAMC,MAAMC,aAAAA;AACZ,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAAC,iBAAAF,MAAA,MAEQG,iBAAiB;AAAAC,WAAAJ,MAAAK,gBAcpBC,oBAAkB;AAAA,MAACC,aAAa;AAAA,MAAG,IAAAC,WAAA;AAAA,eACjCjB,MAAMiB;AAAAA,MAAQ;AAAA,IAAA,CAAA,CAAA;AAAAC,WAAAC,CAAAA,QAAA;AAAA,UAAAC,MAbPb,MAAMc,YAAY,UAAUlB,OAAAA,IAAW,MAAImB,OAE9CC,KACLtB,OAAAA,EAASuB,uBACPnB,SAAAA,EAAWoB,eACXC,QAAQnB,IAAAA,EAAMc,SAAS,CACzB,GACApB,OAAAA,EAAS0B,gCAAgC3B,MAAM4B,OAAAA,GAAUzB,OAAAA,CAAQ,GACjEF,OAAAA,EAAS4B,iCAAiC7B,MAAM4B,OAAAA,CAAQ,GACxD3B,OAAAA,EAAS6B,+BAA+B9B,MAAM+B,UAAU,CAC1D;AAACX,cAAAD,IAAAa,OAAAb,IAAAa,IAAAZ,QAAA,OAAAX,KAAAwB,MAAAC,YAAA,UAAAd,GAAA,IAAAX,KAAAwB,MAAAE,eAAA,QAAA;AAAAb,eAAAH,IAAAiB,KAAAC,UAAA5B,MAAAU,IAAAiB,IAAAd,IAAA;AAAA,aAAAH;AAAAA,IAAA,GAAA;AAAA,MAAAa,GAAAM;AAAAA,MAAAF,GAAAE;AAAAA,IAAAA,CAAA;AAAA,WAAA7B;AAAAA,EAAA,GAAA;AAOP;"}
|
|
@@ -3,6 +3,7 @@ import clsx from "clsx";
|
|
|
3
3
|
import { For } from "solid-js";
|
|
4
4
|
import { useStyles } from "../styles/use-styles.js";
|
|
5
5
|
import { useDevtoolsState } from "../context/use-devtools-context.js";
|
|
6
|
+
import { useDrawContext } from "../context/draw-context.js";
|
|
6
7
|
import { tabs } from "../tabs/index.js";
|
|
7
8
|
import { usePiPWindow } from "../context/pip-context.js";
|
|
8
9
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`), _tmpl$2 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$3 = /* @__PURE__ */ template(`<div><button type=button><svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="lucide lucide-picture-in-picture-icon lucide-picture-in-picture"><path d="M2 10h6V4"></path><path d="m2 4 6 6"></path><path d="M21 10V7a2 2 0 0 0-2-2h-7"></path><path d="M3 14v2a2 2 0 0 0 2 2h3"></path><rect x=12 y=14 width=10 height=7 rx=1></rect></svg></button><button type=button><svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M18 6 6 18"></path><path d="m6 6 12 12">`);
|
|
@@ -16,12 +17,21 @@ const Tabs = (props) => {
|
|
|
16
17
|
const handleDetachment = () => {
|
|
17
18
|
pipWindow().requestPipWindow(`width=${window.innerWidth},height=${state().height},top=${window.screen.height},left=${window.screenLeft}}`);
|
|
18
19
|
};
|
|
20
|
+
const {
|
|
21
|
+
hoverUtils
|
|
22
|
+
} = useDrawContext();
|
|
19
23
|
return (() => {
|
|
20
24
|
var _el$ = _tmpl$();
|
|
21
25
|
insert(_el$, createComponent(For, {
|
|
22
26
|
each: tabs,
|
|
23
27
|
children: (tab) => (() => {
|
|
24
28
|
var _el$2 = _tmpl$2();
|
|
29
|
+
_el$2.addEventListener("mouseleave", () => {
|
|
30
|
+
if (tab.id === "plugins") hoverUtils.leave();
|
|
31
|
+
});
|
|
32
|
+
_el$2.addEventListener("mouseenter", () => {
|
|
33
|
+
if (tab.id === "plugins") hoverUtils.enter();
|
|
34
|
+
});
|
|
25
35
|
_el$2.$$click = () => setState({
|
|
26
36
|
activeTab: tab.id
|
|
27
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../../src/components/tabs.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { For } from 'solid-js'\nimport { useStyles } from '../styles/use-styles'\nimport { useDevtoolsState } from '../context/use-devtools-context'\nimport { tabs } from '../tabs'\nimport { usePiPWindow } from '../context/pip-context'\n\ninterface TabsProps {\n toggleOpen: () => void\n}\n\nexport const Tabs = (props: TabsProps) => {\n const styles = useStyles()\n const { state, setState } = useDevtoolsState()\n const pipWindow = usePiPWindow()\n const handleDetachment = () => {\n pipWindow().requestPipWindow(\n `width=${window.innerWidth},height=${state().height},top=${window.screen.height},left=${window.screenLeft}}`,\n )\n }\n return (\n <div class={styles().tabContainer}>\n <For each={tabs}>\n {(tab) => (\n <button\n type=\"button\"\n onClick={() => setState({ activeTab: tab.id })}\n class={clsx(styles().tab, { active: state().activeTab === tab.id })}\n >\n {tab.icon}\n </button>\n )}\n </For>\n {pipWindow().pipWindow !== null ? null : (\n <div\n style={{\n 'margin-top': 'auto',\n }}\n >\n <button\n type=\"button\"\n class={clsx(styles().tab, 'detach')}\n onClick={handleDetachment}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-picture-in-picture-icon lucide-picture-in-picture\"\n >\n <path d=\"M2 10h6V4\" />\n <path d=\"m2 4 6 6\" />\n <path d=\"M21 10V7a2 2 0 0 0-2-2h-7\" />\n <path d=\"M3 14v2a2 2 0 0 0 2 2h3\" />\n <rect x=\"12\" y=\"14\" width=\"10\" height=\"7\" rx=\"1\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class={clsx(styles().tab, 'close')}\n onClick={() => props.toggleOpen()}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </div>\n )}\n </div>\n )\n}\n"],"names":["Tabs","props","styles","useStyles","state","setState","useDevtoolsState","pipWindow","usePiPWindow","handleDetachment","requestPipWindow","window","innerWidth","height","screen","screenLeft","_el$","_tmpl$","_$insert","_$createComponent","For","each","tabs","children","tab","_el$2","_tmpl$2","$$click","activeTab","
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../../src/components/tabs.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { For } from 'solid-js'\nimport { useStyles } from '../styles/use-styles'\nimport { useDevtoolsState } from '../context/use-devtools-context'\nimport { useDrawContext } from '../context/draw-context'\nimport { tabs } from '../tabs'\nimport { usePiPWindow } from '../context/pip-context'\n\ninterface TabsProps {\n toggleOpen: () => void\n}\n\nexport const Tabs = (props: TabsProps) => {\n const styles = useStyles()\n const { state, setState } = useDevtoolsState()\n const pipWindow = usePiPWindow()\n const handleDetachment = () => {\n pipWindow().requestPipWindow(\n `width=${window.innerWidth},height=${state().height},top=${window.screen.height},left=${window.screenLeft}}`,\n )\n }\n const { hoverUtils } = useDrawContext()\n\n return (\n <div class={styles().tabContainer}>\n <For each={tabs}>\n {(tab) => (\n <button\n type=\"button\"\n onClick={() => setState({ activeTab: tab.id })}\n class={clsx(styles().tab, { active: state().activeTab === tab.id })}\n onMouseEnter={() => {\n if (tab.id === 'plugins') hoverUtils.enter()\n }}\n onMouseLeave={() => {\n if (tab.id === 'plugins') hoverUtils.leave()\n }}\n >\n {tab.icon}\n </button>\n )}\n </For>\n {pipWindow().pipWindow !== null ? null : (\n <div\n style={{\n 'margin-top': 'auto',\n }}\n >\n <button\n type=\"button\"\n class={clsx(styles().tab, 'detach')}\n onClick={handleDetachment}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-picture-in-picture-icon lucide-picture-in-picture\"\n >\n <path d=\"M2 10h6V4\" />\n <path d=\"m2 4 6 6\" />\n <path d=\"M21 10V7a2 2 0 0 0-2-2h-7\" />\n <path d=\"M3 14v2a2 2 0 0 0 2 2h3\" />\n <rect x=\"12\" y=\"14\" width=\"10\" height=\"7\" rx=\"1\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class={clsx(styles().tab, 'close')}\n onClick={() => props.toggleOpen()}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </div>\n )}\n </div>\n )\n}\n"],"names":["Tabs","props","styles","useStyles","state","setState","useDevtoolsState","pipWindow","usePiPWindow","handleDetachment","requestPipWindow","window","innerWidth","height","screen","screenLeft","hoverUtils","useDrawContext","_el$","_tmpl$","_$insert","_$createComponent","For","each","tabs","children","tab","_el$2","_tmpl$2","addEventListener","id","leave","enter","$$click","activeTab","icon","_$effect","_$className","clsx","active","_c$","_$memo","_el$3","_tmpl$3","_el$4","firstChild","_el$5","nextSibling","style","setProperty","toggleOpen","_p$","_v$","_v$2","e","t","undefined","tabContainer","_$delegateEvents"],"mappings":";;;;;;;;;AAYO,MAAMA,OAAOA,CAACC,UAAqB;AACxC,QAAMC,SAASC,UAAAA;AACf,QAAM;AAAA,IAAEC;AAAAA,IAAOC;AAAAA,EAAAA,IAAaC,iBAAAA;AAC5B,QAAMC,YAAYC,aAAAA;AAClB,QAAMC,mBAAmBA,MAAM;AAC7BF,cAAAA,EAAYG,iBACV,SAASC,OAAOC,UAAU,WAAWR,MAAAA,EAAQS,MAAM,QAAQF,OAAOG,OAAOD,MAAM,SAASF,OAAOI,UAAU,GAC3G;AAAA,EACF;AACA,QAAM;AAAA,IAAEC;AAAAA,EAAAA,IAAeC,eAAAA;AAEvB,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAAC,WAAAF,MAAAG,gBAEKC,KAAG;AAAA,MAACC,MAAMC;AAAAA,MAAIC,UACXC,UAAG,MAAA;AAAA,YAAAC,QAAAC,QAAAA;AAAAD,cAAAE,iBAAA,cAQa,MAAM;AAClB,cAAIH,IAAII,OAAO,UAAWd,YAAWe,MAAAA;AAAAA,QACvC,CAAC;AAAAJ,cAAAE,iBAAA,cALa,MAAM;AAClB,cAAIH,IAAII,OAAO,UAAWd,YAAWgB,MAAAA;AAAAA,QACvC,CAAC;AAAAL,cAAAM,UAJQ,MAAM5B,SAAS;AAAA,UAAE6B,WAAWR,IAAII;AAAAA,QAAAA,CAAI;AAACV,eAAAO,OAAA,MAS7CD,IAAIS,IAAI;AAAAC,eAAA,MAAAC,UAAAV,OARFW,KAAKpC,OAAAA,EAASwB,KAAK;AAAA,UAAEa,QAAQnC,MAAAA,EAAQ8B,cAAcR,IAAII;AAAAA,QAAAA,CAAI,CAAC,CAAA;AAAA,eAAAH;AAAAA,MAAA,GAAA;AAAA,IAAA,CAUtE,GAAA,IAAA;AAAAP,WAAAF,OAAA,MAAA;AAAA,UAAAsB,MAAAC,KAAA,MAEFlC,UAAAA,EAAYA,cAAc,IAAI;AAAA,aAAA,MAA9BiC,IAAAA,IAAiC,QAAI,MAAA;AAAA,YAAAE,QAAAC,QAAAA,GAAAC,QAAAF,MAAAG,YAAAC,QAAAF,MAAAG;AAAAL,cAAAM,MAAAC,YAAA,cAAA,MAAA;AAAAL,cAAAX,UASvBxB;AAAgBqC,cAAAb,UAwBhB,MAAMhC,MAAMiD,WAAAA;AAAYd,eAAAe,CAAAA,QAAA;AAAA,cAAAC,MAzB1Bd,KAAKpC,OAAAA,EAASwB,KAAK,QAAQ,GAAC2B,OAwB5Bf,KAAKpC,SAASwB,KAAK,OAAO;AAAC0B,kBAAAD,IAAAG,KAAAjB,UAAAO,OAAAO,IAAAG,IAAAF,GAAA;AAAAC,mBAAAF,IAAAI,KAAAlB,UAAAS,OAAAK,IAAAI,IAAAF,IAAA;AAAA,iBAAAF;AAAAA,QAAA,GAAA;AAAA,UAAAG,GAAAE;AAAAA,UAAAD,GAAAC;AAAAA,QAAAA,CAAA;AAAA,eAAAd;AAAAA,MAAA,GAAA;AAAA,IAmBvC,GAAA,GAAA,IAAA;AAAAN,WAAA,MAAAC,UAAAnB,MArEShB,OAAAA,EAASuD,YAAY,CAAA;AAAA,WAAAvC;AAAAA,EAAA,GAAA;AAwErC;AAACwC,eAAA,CAAA,OAAA,CAAA;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ParentComponent } from 'solid-js';
|
|
2
|
+
export declare const DrawClientProvider: ParentComponent<{
|
|
3
|
+
animationMs: number;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function useDrawContext(): {
|
|
6
|
+
expanded: import('solid-js').Accessor<boolean>;
|
|
7
|
+
setForceExpand: import('solid-js').Setter<boolean>;
|
|
8
|
+
hoverUtils: {
|
|
9
|
+
enter: () => void;
|
|
10
|
+
leave: () => void;
|
|
11
|
+
};
|
|
12
|
+
animationMs: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createComponent } from "solid-js/web";
|
|
2
|
+
import { createContext, useContext, createSignal, createMemo, onCleanup } from "solid-js";
|
|
3
|
+
const useDraw = (props) => {
|
|
4
|
+
const [activeHover, setActiveHover] = createSignal(false);
|
|
5
|
+
const [forceExpand, setForceExpand] = createSignal(false);
|
|
6
|
+
const expanded = createMemo(() => activeHover() || forceExpand());
|
|
7
|
+
let hoverTimeout = null;
|
|
8
|
+
onCleanup(() => {
|
|
9
|
+
if (hoverTimeout) clearTimeout(hoverTimeout);
|
|
10
|
+
});
|
|
11
|
+
const hoverUtils = {
|
|
12
|
+
enter: () => {
|
|
13
|
+
if (hoverTimeout) {
|
|
14
|
+
clearTimeout(hoverTimeout);
|
|
15
|
+
hoverTimeout = null;
|
|
16
|
+
}
|
|
17
|
+
setActiveHover(true);
|
|
18
|
+
},
|
|
19
|
+
leave: () => {
|
|
20
|
+
hoverTimeout = setTimeout(() => {
|
|
21
|
+
setActiveHover(false);
|
|
22
|
+
}, props.animationMs);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
expanded,
|
|
27
|
+
setForceExpand,
|
|
28
|
+
hoverUtils,
|
|
29
|
+
animationMs: props.animationMs
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const DrawContext = createContext(void 0);
|
|
33
|
+
const DrawClientProvider = (props) => {
|
|
34
|
+
const value = useDraw({
|
|
35
|
+
animationMs: props.animationMs
|
|
36
|
+
});
|
|
37
|
+
return createComponent(DrawContext.Provider, {
|
|
38
|
+
value,
|
|
39
|
+
get children() {
|
|
40
|
+
return props.children;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
function useDrawContext() {
|
|
45
|
+
const context = useContext(DrawContext);
|
|
46
|
+
if (context === void 0) {
|
|
47
|
+
throw new Error(`useDrawContext must be used within a DrawClientProvider`);
|
|
48
|
+
}
|
|
49
|
+
return context;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
DrawClientProvider,
|
|
53
|
+
useDrawContext
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=draw-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-context.js","sources":["../../../src/context/draw-context.tsx"],"sourcesContent":["import {\n createContext,\n createMemo,\n createSignal,\n onCleanup,\n useContext,\n} from 'solid-js'\nimport type { ParentComponent } from 'solid-js'\n\nconst useDraw = (props: { animationMs: number }) => {\n const [activeHover, setActiveHover] = createSignal<boolean>(false)\n const [forceExpand, setForceExpand] = createSignal<boolean>(false)\n\n const expanded = createMemo(() => activeHover() || forceExpand())\n\n let hoverTimeout: ReturnType<typeof setTimeout> | null = null\n onCleanup(() => {\n if (hoverTimeout) clearTimeout(hoverTimeout)\n })\n\n const hoverUtils = {\n enter: () => {\n if (hoverTimeout) {\n clearTimeout(hoverTimeout)\n hoverTimeout = null\n }\n setActiveHover(true)\n },\n\n leave: () => {\n hoverTimeout = setTimeout(() => {\n setActiveHover(false)\n }, props.animationMs)\n },\n }\n\n return {\n expanded,\n setForceExpand,\n hoverUtils,\n animationMs: props.animationMs,\n }\n}\n\ntype ContextType = ReturnType<typeof useDraw>\n\nconst DrawContext = createContext<ContextType | undefined>(undefined)\n\nexport const DrawClientProvider: ParentComponent<{\n animationMs: number\n}> = (props) => {\n const value = useDraw({ animationMs: props.animationMs })\n\n return (\n <DrawContext.Provider value={value}>{props.children}</DrawContext.Provider>\n )\n}\n\nexport function useDrawContext() {\n const context = useContext(DrawContext)\n\n if (context === undefined) {\n throw new Error(`useDrawContext must be used within a DrawClientProvider`)\n }\n\n return context\n}\n"],"names":["useDraw","props","activeHover","setActiveHover","createSignal","forceExpand","setForceExpand","expanded","createMemo","hoverTimeout","onCleanup","hoverUtils","enter","clearTimeout","leave","setTimeout","animationMs","DrawContext","createContext","undefined","DrawClientProvider","value","_$createComponent","Provider","children","useDrawContext","context","useContext","Error"],"mappings":";;AASA,MAAMA,UAAUA,CAACC,UAAmC;AAClD,QAAM,CAACC,aAAaC,cAAc,IAAIC,aAAsB,KAAK;AACjE,QAAM,CAACC,aAAaC,cAAc,IAAIF,aAAsB,KAAK;AAEjE,QAAMG,WAAWC,WAAW,MAAMN,YAAAA,KAAiBG,aAAa;AAEhE,MAAII,eAAqD;AACzDC,YAAU,MAAM;AACd,QAAID,2BAA2BA,YAAY;AAAA,EAC7C,CAAC;AAED,QAAME,aAAa;AAAA,IACjBC,OAAOA,MAAM;AACX,UAAIH,cAAc;AAChBI,qBAAaJ,YAAY;AACzBA,uBAAe;AAAA,MACjB;AACAN,qBAAe,IAAI;AAAA,IACrB;AAAA,IAEAW,OAAOA,MAAM;AACXL,qBAAeM,WAAW,MAAM;AAC9BZ,uBAAe,KAAK;AAAA,MACtB,GAAGF,MAAMe,WAAW;AAAA,IACtB;AAAA,EAAA;AAGF,SAAO;AAAA,IACLT;AAAAA,IACAD;AAAAA,IACAK;AAAAA,IACAK,aAAaf,MAAMe;AAAAA,EAAAA;AAEvB;AAIA,MAAMC,cAAcC,cAAuCC,MAAS;AAE7D,MAAMC,qBAEPnB,CAAAA,UAAU;AACd,QAAMoB,QAAQrB,QAAQ;AAAA,IAAEgB,aAAaf,MAAMe;AAAAA,EAAAA,CAAa;AAExD,SAAAM,gBACGL,YAAYM,UAAQ;AAAA,IAACF;AAAAA,IAAY,IAAAG,WAAA;AAAA,aAAGvB,MAAMuB;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAEvD;AAEO,SAASC,iBAAiB;AAC/B,QAAMC,UAAUC,WAAWV,WAAW;AAEtC,MAAIS,YAAYP,QAAW;AACzB,UAAM,IAAIS,MAAM,yDAAyD;AAAA,EAC3E;AAEA,SAAOF;AACT;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createMemo, useContext } from "solid-js";
|
|
1
|
+
import { createMemo, useContext, createEffect } from "solid-js";
|
|
2
2
|
import { DevtoolsContext } from "./devtools-context.js";
|
|
3
|
+
import { useDrawContext } from "./draw-context.js";
|
|
3
4
|
const useDevtoolsContext = () => {
|
|
4
5
|
const context = useContext(DevtoolsContext);
|
|
5
6
|
if (context === void 0) {
|
|
@@ -11,8 +12,16 @@ const useDevtoolsContext = () => {
|
|
|
11
12
|
};
|
|
12
13
|
const usePlugins = () => {
|
|
13
14
|
const { store, setStore } = useDevtoolsContext();
|
|
15
|
+
const { setForceExpand } = useDrawContext();
|
|
14
16
|
const plugins = createMemo(() => store.plugins);
|
|
15
17
|
const activePlugin = createMemo(() => store.state.activePlugin);
|
|
18
|
+
createEffect(() => {
|
|
19
|
+
if (activePlugin() == null) {
|
|
20
|
+
setForceExpand(false);
|
|
21
|
+
} else {
|
|
22
|
+
setForceExpand(true);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
16
25
|
const setActivePlugin = (pluginId) => {
|
|
17
26
|
setStore((prev) => ({
|
|
18
27
|
...prev,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-devtools-context.js","sources":["../../../src/context/use-devtools-context.ts"],"sourcesContent":["import { createMemo, useContext } from 'solid-js'\nimport { DevtoolsContext } from './devtools-context.jsx'\
|
|
1
|
+
{"version":3,"file":"use-devtools-context.js","sources":["../../../src/context/use-devtools-context.ts"],"sourcesContent":["import { createEffect, createMemo, useContext } from 'solid-js'\nimport { DevtoolsContext } from './devtools-context.jsx'\nimport { useDrawContext } from './draw-context.jsx'\n\nimport type { DevtoolsStore } from './devtools-store.js'\n\n/**\n * Returns an object containing the current state and setState function of the ShellContext.\n * Throws an error if used outside of a ShellContextProvider.\n */\nconst useDevtoolsContext = () => {\n const context = useContext(DevtoolsContext)\n if (context === undefined) {\n throw new Error(\n 'useDevtoolsShellContext must be used within a ShellContextProvider',\n )\n }\n return context\n}\n\nexport const usePlugins = () => {\n const { store, setStore } = useDevtoolsContext()\n const { setForceExpand } = useDrawContext()\n\n const plugins = createMemo(() => store.plugins)\n const activePlugin = createMemo(() => store.state.activePlugin)\n\n createEffect(() => {\n if (activePlugin() == null) {\n setForceExpand(false)\n } else {\n setForceExpand(true)\n }\n })\n\n const setActivePlugin = (pluginId: string) => {\n setStore((prev) => ({\n ...prev,\n state: {\n ...prev.state,\n activePlugin: pluginId,\n },\n }))\n }\n\n return { plugins, setActivePlugin, activePlugin }\n}\n\nexport const useDevtoolsState = () => {\n const { store, setStore } = useDevtoolsContext()\n const state = createMemo(() => store.state)\n const setState = (newState: Partial<DevtoolsStore['state']>) => {\n setStore((prev) => ({\n ...prev,\n state: {\n ...prev.state,\n ...newState,\n },\n }))\n }\n return { state, setState }\n}\n\nexport const useDevtoolsSettings = () => {\n const { store, setStore } = useDevtoolsContext()\n\n const settings = createMemo(() => store.settings)\n\n const setSettings = (newSettings: Partial<DevtoolsStore['settings']>) => {\n setStore((prev) => ({\n ...prev,\n settings: {\n ...prev.settings,\n ...newSettings,\n },\n }))\n }\n\n return { setSettings, settings }\n}\n\nexport const usePersistOpen = () => {\n const { state, setState } = useDevtoolsState()\n\n const persistOpen = createMemo(() => state().persistOpen)\n\n const setPersistOpen = (value: boolean) => {\n setState({ persistOpen: value })\n }\n\n return { persistOpen, setPersistOpen }\n}\n\nexport const useHeight = () => {\n const { state, setState } = useDevtoolsState()\n\n const height = createMemo(() => state().height)\n\n const setHeight = (newHeight: number) => {\n setState({ height: newHeight })\n }\n\n return { height, setHeight }\n}\n"],"names":[],"mappings":";;;AAUA,MAAM,qBAAqB,MAAM;AAC/B,QAAM,UAAU,WAAW,eAAe;AAC1C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,MAAM,aAAa,MAAM;AAC9B,QAAM,EAAE,OAAO,SAAA,IAAa,mBAAA;AAC5B,QAAM,EAAE,eAAA,IAAmB,eAAA;AAE3B,QAAM,UAAU,WAAW,MAAM,MAAM,OAAO;AAC9C,QAAM,eAAe,WAAW,MAAM,MAAM,MAAM,YAAY;AAE9D,eAAa,MAAM;AACjB,QAAI,aAAA,KAAkB,MAAM;AAC1B,qBAAe,KAAK;AAAA,IACtB,OAAO;AACL,qBAAe,IAAI;AAAA,IACrB;AAAA,EACF,CAAC;AAED,QAAM,kBAAkB,CAAC,aAAqB;AAC5C,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,OAAO;AAAA,QACL,GAAG,KAAK;AAAA,QACR,cAAc;AAAA,MAAA;AAAA,IAChB,EACA;AAAA,EACJ;AAEA,SAAO,EAAE,SAAS,iBAAiB,aAAA;AACrC;AAEO,MAAM,mBAAmB,MAAM;AACpC,QAAM,EAAE,OAAO,SAAA,IAAa,mBAAA;AAC5B,QAAM,QAAQ,WAAW,MAAM,MAAM,KAAK;AAC1C,QAAM,WAAW,CAAC,aAA8C;AAC9D,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,OAAO;AAAA,QACL,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MAAA;AAAA,IACL,EACA;AAAA,EACJ;AACA,SAAO,EAAE,OAAO,SAAA;AAClB;AAEO,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,OAAO,SAAA,IAAa,mBAAA;AAE5B,QAAM,WAAW,WAAW,MAAM,MAAM,QAAQ;AAEhD,QAAM,cAAc,CAAC,gBAAoD;AACvE,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,UAAU;AAAA,QACR,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MAAA;AAAA,IACL,EACA;AAAA,EACJ;AAEA,SAAO,EAAE,aAAa,SAAA;AACxB;AAEO,MAAM,iBAAiB,MAAM;AAClC,QAAM,EAAE,OAAO,SAAA,IAAa,iBAAA;AAE5B,QAAM,cAAc,WAAW,MAAM,MAAA,EAAQ,WAAW;AAExD,QAAM,iBAAiB,CAAC,UAAmB;AACzC,aAAS,EAAE,aAAa,OAAO;AAAA,EACjC;AAEA,SAAO,EAAE,aAAa,eAAA;AACxB;AAEO,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,OAAO,SAAA,IAAa,iBAAA;AAE5B,QAAM,SAAS,WAAW,MAAM,MAAA,EAAQ,MAAM;AAE9C,QAAM,YAAY,CAAC,cAAsB;AACvC,aAAS,EAAE,QAAQ,WAAW;AAAA,EAChC;AAEA,SAAO,EAAE,QAAQ,UAAA;AACnB;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type HeadChange = {
|
|
2
|
+
kind: 'added';
|
|
3
|
+
node: Node;
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'removed';
|
|
6
|
+
node: Node;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'attr';
|
|
9
|
+
target: Element;
|
|
10
|
+
name: string | null;
|
|
11
|
+
oldValue: string | null;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'title';
|
|
14
|
+
title: string;
|
|
15
|
+
};
|
|
16
|
+
type UseHeadChangesOptions = {
|
|
17
|
+
/**
|
|
18
|
+
* Observe attribute changes on elements inside <head>
|
|
19
|
+
* Default: true
|
|
20
|
+
*/
|
|
21
|
+
attributes?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Observe added/removed nodes in <head>
|
|
24
|
+
* Default: true
|
|
25
|
+
*/
|
|
26
|
+
childList?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Observe descendants of <head>
|
|
29
|
+
* Default: true
|
|
30
|
+
*/
|
|
31
|
+
subtree?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Also observe <title> changes explicitly
|
|
34
|
+
* Default: true
|
|
35
|
+
*/
|
|
36
|
+
observeTitle?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare function useHeadChanges(onChange: (change: HeadChange, raw?: MutationRecord) => void, opts?: UseHeadChangesOptions): void;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { onMount, onCleanup } from "solid-js";
|
|
2
|
+
function useHeadChanges(onChange, opts = {}) {
|
|
3
|
+
const {
|
|
4
|
+
attributes = true,
|
|
5
|
+
childList = true,
|
|
6
|
+
subtree = true,
|
|
7
|
+
observeTitle = true
|
|
8
|
+
} = opts;
|
|
9
|
+
onMount(() => {
|
|
10
|
+
const headObserver = new MutationObserver((mutations) => {
|
|
11
|
+
for (const m of mutations) {
|
|
12
|
+
if (m.type === "childList") {
|
|
13
|
+
m.addedNodes.forEach((node) => onChange({ kind: "added", node }, m));
|
|
14
|
+
m.removedNodes.forEach(
|
|
15
|
+
(node) => onChange({ kind: "removed", node }, m)
|
|
16
|
+
);
|
|
17
|
+
} else if (m.type === "attributes") {
|
|
18
|
+
const el = m.target;
|
|
19
|
+
onChange(
|
|
20
|
+
{
|
|
21
|
+
kind: "attr",
|
|
22
|
+
target: el,
|
|
23
|
+
name: m.attributeName,
|
|
24
|
+
oldValue: m.oldValue ?? null
|
|
25
|
+
},
|
|
26
|
+
m
|
|
27
|
+
);
|
|
28
|
+
} else {
|
|
29
|
+
const isInTitle = m.target.parentNode && m.target.parentNode.tagName.toLowerCase() === "title";
|
|
30
|
+
if (isInTitle) onChange({ kind: "title", title: document.title }, m);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
headObserver.observe(document.head, {
|
|
35
|
+
childList,
|
|
36
|
+
attributes,
|
|
37
|
+
subtree,
|
|
38
|
+
attributeOldValue: attributes,
|
|
39
|
+
characterData: true,
|
|
40
|
+
// helps catch <title> text node edits
|
|
41
|
+
characterDataOldValue: false
|
|
42
|
+
});
|
|
43
|
+
let titleObserver;
|
|
44
|
+
if (observeTitle) {
|
|
45
|
+
const titleEl = document.head.querySelector("title") || // create a <title> if missing so future changes are observable
|
|
46
|
+
document.head.appendChild(document.createElement("title"));
|
|
47
|
+
titleObserver = new MutationObserver(() => {
|
|
48
|
+
onChange({ kind: "title", title: document.title });
|
|
49
|
+
});
|
|
50
|
+
titleObserver.observe(titleEl, {
|
|
51
|
+
childList: true,
|
|
52
|
+
characterData: true,
|
|
53
|
+
subtree: true
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
onCleanup(() => {
|
|
57
|
+
headObserver.disconnect();
|
|
58
|
+
titleObserver?.disconnect();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
useHeadChanges
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=use-head-changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-head-changes.js","sources":["../../../src/hooks/use-head-changes.ts"],"sourcesContent":["import { onCleanup, onMount } from 'solid-js'\n\ntype HeadChange =\n | { kind: 'added'; node: Node }\n | { kind: 'removed'; node: Node }\n | {\n kind: 'attr'\n target: Element\n name: string | null\n oldValue: string | null\n }\n | { kind: 'title'; title: string }\n\ntype UseHeadChangesOptions = {\n /**\n * Observe attribute changes on elements inside <head>\n * Default: true\n */\n attributes?: boolean\n /**\n * Observe added/removed nodes in <head>\n * Default: true\n */\n childList?: boolean\n /**\n * Observe descendants of <head>\n * Default: true\n */\n subtree?: boolean\n /**\n * Also observe <title> changes explicitly\n * Default: true\n */\n observeTitle?: boolean\n}\n\nexport function useHeadChanges(\n onChange: (change: HeadChange, raw?: MutationRecord) => void,\n opts: UseHeadChangesOptions = {},\n) {\n const {\n attributes = true,\n childList = true,\n subtree = true,\n observeTitle = true,\n } = opts\n\n onMount(() => {\n const headObserver = new MutationObserver((mutations) => {\n for (const m of mutations) {\n if (m.type === 'childList') {\n m.addedNodes.forEach((node) => onChange({ kind: 'added', node }, m))\n m.removedNodes.forEach((node) =>\n onChange({ kind: 'removed', node }, m),\n )\n } else if (m.type === 'attributes') {\n const el = m.target as Element\n onChange(\n {\n kind: 'attr',\n target: el,\n name: m.attributeName,\n oldValue: m.oldValue ?? null,\n },\n m,\n )\n } else {\n // If someone mutates a Text node inside <title>, surface it as a title change.\n const isInTitle =\n m.target.parentNode &&\n (m.target.parentNode as Element).tagName.toLowerCase() === 'title'\n if (isInTitle) onChange({ kind: 'title', title: document.title }, m)\n }\n }\n })\n\n headObserver.observe(document.head, {\n childList,\n attributes,\n subtree,\n attributeOldValue: attributes,\n characterData: true, // helps catch <title> text node edits\n characterDataOldValue: false,\n })\n\n // Extra explicit observer for <title>, since `document.title = \"...\"`\n // may not always bubble as a head mutation in all setups.\n let titleObserver: MutationObserver | undefined\n if (observeTitle) {\n const titleEl =\n document.head.querySelector('title') ||\n // create a <title> if missing so future changes are observable\n document.head.appendChild(document.createElement('title'))\n\n titleObserver = new MutationObserver(() => {\n onChange({ kind: 'title', title: document.title })\n })\n titleObserver.observe(titleEl, {\n childList: true,\n characterData: true,\n subtree: true,\n })\n }\n\n onCleanup(() => {\n headObserver.disconnect()\n titleObserver?.disconnect()\n })\n })\n}\n"],"names":[],"mappings":";AAoCO,SAAS,eACd,UACA,OAA8B,IAC9B;AACA,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,eAAe;AAAA,EAAA,IACb;AAEJ,UAAQ,MAAM;AACZ,UAAM,eAAe,IAAI,iBAAiB,CAAC,cAAc;AACvD,iBAAW,KAAK,WAAW;AACzB,YAAI,EAAE,SAAS,aAAa;AAC1B,YAAE,WAAW,QAAQ,CAAC,SAAS,SAAS,EAAE,MAAM,SAAS,KAAA,GAAQ,CAAC,CAAC;AACnE,YAAE,aAAa;AAAA,YAAQ,CAAC,SACtB,SAAS,EAAE,MAAM,WAAW,KAAA,GAAQ,CAAC;AAAA,UAAA;AAAA,QAEzC,WAAW,EAAE,SAAS,cAAc;AAClC,gBAAM,KAAK,EAAE;AACb;AAAA,YACE;AAAA,cACE,MAAM;AAAA,cACN,QAAQ;AAAA,cACR,MAAM,EAAE;AAAA,cACR,UAAU,EAAE,YAAY;AAAA,YAAA;AAAA,YAE1B;AAAA,UAAA;AAAA,QAEJ,OAAO;AAEL,gBAAM,YACJ,EAAE,OAAO,cACR,EAAE,OAAO,WAAuB,QAAQ,YAAA,MAAkB;AAC7D,cAAI,oBAAoB,EAAE,MAAM,SAAS,OAAO,SAAS,MAAA,GAAS,CAAC;AAAA,QACrE;AAAA,MACF;AAAA,IACF,CAAC;AAED,iBAAa,QAAQ,SAAS,MAAM;AAAA,MAClC;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAmB;AAAA,MACnB,eAAe;AAAA;AAAA,MACf,uBAAuB;AAAA,IAAA,CACxB;AAID,QAAI;AACJ,QAAI,cAAc;AAChB,YAAM,UACJ,SAAS,KAAK,cAAc,OAAO;AAAA,MAEnC,SAAS,KAAK,YAAY,SAAS,cAAc,OAAO,CAAC;AAE3D,sBAAgB,IAAI,iBAAiB,MAAM;AACzC,iBAAS,EAAE,MAAM,SAAS,OAAO,SAAS,OAAO;AAAA,MACnD,CAAC;AACD,oBAAc,QAAQ,SAAS;AAAA,QAC7B,WAAW;AAAA,QACX,eAAe;AAAA,QACf,SAAS;AAAA,MAAA,CACV;AAAA,IACH;AAEA,cAAU,MAAM;AACd,mBAAa,WAAA;AACb,qBAAe,WAAA;AAAA,IACjB,CAAC;AAAA,EACH,CAAC;AACH;"}
|
|
@@ -2,12 +2,14 @@ const tokens = {
|
|
|
2
2
|
colors: {
|
|
3
3
|
darkGray: {
|
|
4
4
|
700: "#191c24",
|
|
5
|
-
800: "#111318"
|
|
5
|
+
800: "#111318",
|
|
6
|
+
900: "#0b0d10"
|
|
6
7
|
},
|
|
7
8
|
gray: {
|
|
8
9
|
100: "#f2f4f7",
|
|
9
10
|
300: "#d0d5dd",
|
|
10
11
|
400: "#98a2b3",
|
|
12
|
+
500: "#667085",
|
|
11
13
|
700: "#344054"
|
|
12
14
|
},
|
|
13
15
|
blue: {
|
|
@@ -17,6 +19,7 @@ const tokens = {
|
|
|
17
19
|
500: "#12B76A"
|
|
18
20
|
},
|
|
19
21
|
red: {
|
|
22
|
+
400: "#f87171",
|
|
20
23
|
500: "#ef4444"
|
|
21
24
|
},
|
|
22
25
|
purple: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../src/styles/tokens.ts"],"sourcesContent":["export const tokens = {\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n neutral: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n darkGray: {\n 50: '#525c7a',\n 100: '#49536e',\n 200: '#414962',\n 300: '#394056',\n 400: '#313749',\n 500: '#292e3d',\n 600: '#212530',\n 700: '#191c24',\n 800: '#111318',\n 900: '#0b0d10',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n blue: {\n 25: '#F5FAFF',\n 50: '#EFF8FF',\n 100: '#D1E9FF',\n 200: '#B2DDFF',\n 300: '#84CAFF',\n 400: '#53B1FD',\n 500: '#2E90FA',\n 600: '#1570EF',\n 700: '#175CD3',\n 800: '#1849A9',\n 900: '#194185',\n },\n green: {\n 25: '#F6FEF9',\n 50: '#ECFDF3',\n 100: '#D1FADF',\n 200: '#A6F4C5',\n 300: '#6CE9A6',\n 400: '#32D583',\n 500: '#12B76A',\n 600: '#039855',\n 700: '#027A48',\n 800: '#05603A',\n 900: '#054F31',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n yellow: {\n 25: '#FFFCF5',\n 50: '#FFFAEB',\n 100: '#FEF0C7',\n 200: '#FEDF89',\n 300: '#FEC84B',\n 400: '#FDB022',\n 500: '#F79009',\n 600: '#DC6803',\n 700: '#B54708',\n 800: '#93370D',\n 900: '#7A2E0E',\n },\n purple: {\n 25: '#FAFAFF',\n 50: '#F4F3FF',\n 100: '#EBE9FE',\n 200: '#D9D6FE',\n 300: '#BDB4FE',\n 400: '#9B8AFB',\n 500: '#7A5AF8',\n 600: '#6938EF',\n 700: '#5925DC',\n 800: '#4A1FB8',\n 900: '#3E1C96',\n },\n teal: {\n 25: '#F6FEFC',\n 50: '#F0FDF9',\n 100: '#CCFBEF',\n 200: '#99F6E0',\n 300: '#5FE9D0',\n 400: '#2ED3B7',\n 500: '#15B79E',\n 600: '#0E9384',\n 700: '#107569',\n 800: '#125D56',\n 900: '#134E48',\n },\n pink: {\n 25: '#fdf2f8',\n 50: '#fce7f3',\n 100: '#fbcfe8',\n 200: '#f9a8d4',\n 300: '#f472b6',\n 400: '#ec4899',\n 500: '#db2777',\n 600: '#be185d',\n 700: '#9d174d',\n 800: '#831843',\n 900: '#500724',\n },\n cyan: {\n 25: '#ecfeff',\n 50: '#cffafe',\n 100: '#a5f3fc',\n 200: '#67e8f9',\n 300: '#22d3ee',\n 400: '#06b6d4',\n 500: '#0891b2',\n 600: '#0e7490',\n 700: '#155e75',\n 800: '#164e63',\n 900: '#083344',\n },\n },\n alpha: {\n 100: 'ff',\n 90: 'e5',\n 80: 'cc',\n 70: 'b3',\n 60: '99',\n 50: '80',\n 40: '66',\n 30: '4d',\n 20: '33',\n 10: '1a',\n 0: '00',\n },\n font: {\n size: {\n '2xs': 'calc(var(--tsrd-font-size) * 0.625)',\n xs: 'calc(var(--tsrd-font-size) * 0.75)',\n sm: 'calc(var(--tsrd-font-size) * 0.875)',\n md: 'var(--tsrd-font-size)',\n lg: 'calc(var(--tsrd-font-size) * 1.125)',\n xl: 'calc(var(--tsrd-font-size) * 1.25)',\n '2xl': 'calc(var(--tsrd-font-size) * 1.5)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.875)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '7xl': 'calc(var(--tsrd-font-size) * 4.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 6)',\n '9xl': 'calc(var(--tsrd-font-size) * 8)',\n },\n lineHeight: {\n '3xs': 'calc(var(--tsrd-font-size) * 0.75)',\n '2xs': 'calc(var(--tsrd-font-size) * 0.875)',\n xs: 'calc(var(--tsrd-font-size) * 1)',\n sm: 'calc(var(--tsrd-font-size) * 1.25)',\n md: 'calc(var(--tsrd-font-size) * 1.5)',\n lg: 'calc(var(--tsrd-font-size) * 1.75)',\n xl: 'calc(var(--tsrd-font-size) * 2)',\n '2xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '3xl': 'calc(var(--tsrd-font-size) * 2.5)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.75)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.25)',\n '7xl': 'calc(var(--tsrd-font-size) * 3.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '9xl': 'calc(var(--tsrd-font-size) * 4)',\n },\n weight: {\n thin: '100',\n extralight: '200',\n light: '300',\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n extrabold: '800',\n black: '900',\n },\n fontFamily: {\n sans: 'ui-sans-serif, Inter, system-ui, sans-serif, sans-serif',\n mono: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`,\n },\n },\n breakpoints: {\n xs: '320px',\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px',\n },\n border: {\n radius: {\n none: '0px',\n xs: 'calc(var(--tsrd-font-size) * 0.125)',\n sm: 'calc(var(--tsrd-font-size) * 0.25)',\n md: 'calc(var(--tsrd-font-size) * 0.375)',\n lg: 'calc(var(--tsrd-font-size) * 0.5)',\n xl: 'calc(var(--tsrd-font-size) * 0.75)',\n '2xl': 'calc(var(--tsrd-font-size) * 1)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.5)',\n full: '9999px',\n },\n },\n size: {\n 0: '0px',\n 0.25: 'calc(var(--tsrd-font-size) * 0.0625)',\n 0.5: 'calc(var(--tsrd-font-size) * 0.125)',\n 1: 'calc(var(--tsrd-font-size) * 0.25)',\n 1.5: 'calc(var(--tsrd-font-size) * 0.375)',\n 2: 'calc(var(--tsrd-font-size) * 0.5)',\n 2.5: 'calc(var(--tsrd-font-size) * 0.625)',\n 3: 'calc(var(--tsrd-font-size) * 0.75)',\n 3.5: 'calc(var(--tsrd-font-size) * 0.875)',\n 4: 'calc(var(--tsrd-font-size) * 1)',\n 4.5: 'calc(var(--tsrd-font-size) * 1.125)',\n 5: 'calc(var(--tsrd-font-size) * 1.25)',\n 5.5: 'calc(var(--tsrd-font-size) * 1.375)',\n 6: 'calc(var(--tsrd-font-size) * 1.5)',\n 6.5: 'calc(var(--tsrd-font-size) * 1.625)',\n 7: 'calc(var(--tsrd-font-size) * 1.75)',\n 8: 'calc(var(--tsrd-font-size) * 2)',\n 9: 'calc(var(--tsrd-font-size) * 2.25)',\n 10: 'calc(var(--tsrd-font-size) * 2.5)',\n 11: 'calc(var(--tsrd-font-size) * 2.75)',\n 12: 'calc(var(--tsrd-font-size) * 3)',\n 14: 'calc(var(--tsrd-font-size) * 3.5)',\n 16: 'calc(var(--tsrd-font-size) * 4)',\n 20: 'calc(var(--tsrd-font-size) * 5)',\n 24: 'calc(var(--tsrd-font-size) * 6)',\n 28: 'calc(var(--tsrd-font-size) * 7)',\n 32: 'calc(var(--tsrd-font-size) * 8)',\n 36: 'calc(var(--tsrd-font-size) * 9)',\n 40: 'calc(var(--tsrd-font-size) * 10)',\n 44: 'calc(var(--tsrd-font-size) * 11)',\n 48: 'calc(var(--tsrd-font-size) * 12)',\n 52: 'calc(var(--tsrd-font-size) * 13)',\n 56: 'calc(var(--tsrd-font-size) * 14)',\n 60: 'calc(var(--tsrd-font-size) * 15)',\n 64: 'calc(var(--tsrd-font-size) * 16)',\n 72: 'calc(var(--tsrd-font-size) * 18)',\n 80: 'calc(var(--tsrd-font-size) * 20)',\n 96: 'calc(var(--tsrd-font-size) * 24)',\n },\n shadow: {\n xs: (_: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 2px 0 rgb(0 0 0 / 0.05)` as const,\n sm: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}` as const,\n md: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}` as const,\n lg: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}` as const,\n xl: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}` as const,\n '2xl': (color: string = 'rgb(0 0 0 / 0.25)') =>\n `0 25px 50px -12px ${color}` as const,\n inner: (color: string = 'rgb(0 0 0 / 0.05)') =>\n `inset 0 2px 4px 0 ${color}` as const,\n none: () => `none` as const,\n },\n zIndices: {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n },\n} as const\n"],"names":[],"mappings":"AAAO,MAAM,SAAS;AAAA,EACpB,QAAQ;AAAA,IAkBN,UAAU;AAAA,MAQR,KAAK;AAAA,MACL,KAAK;AAAA,
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../src/styles/tokens.ts"],"sourcesContent":["export const tokens = {\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n neutral: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n darkGray: {\n 50: '#525c7a',\n 100: '#49536e',\n 200: '#414962',\n 300: '#394056',\n 400: '#313749',\n 500: '#292e3d',\n 600: '#212530',\n 700: '#191c24',\n 800: '#111318',\n 900: '#0b0d10',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f2f4f7',\n 200: '#eaecf0',\n 300: '#d0d5dd',\n 400: '#98a2b3',\n 500: '#667085',\n 600: '#475467',\n 700: '#344054',\n 800: '#1d2939',\n 900: '#101828',\n },\n blue: {\n 25: '#F5FAFF',\n 50: '#EFF8FF',\n 100: '#D1E9FF',\n 200: '#B2DDFF',\n 300: '#84CAFF',\n 400: '#53B1FD',\n 500: '#2E90FA',\n 600: '#1570EF',\n 700: '#175CD3',\n 800: '#1849A9',\n 900: '#194185',\n },\n green: {\n 25: '#F6FEF9',\n 50: '#ECFDF3',\n 100: '#D1FADF',\n 200: '#A6F4C5',\n 300: '#6CE9A6',\n 400: '#32D583',\n 500: '#12B76A',\n 600: '#039855',\n 700: '#027A48',\n 800: '#05603A',\n 900: '#054F31',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n yellow: {\n 25: '#FFFCF5',\n 50: '#FFFAEB',\n 100: '#FEF0C7',\n 200: '#FEDF89',\n 300: '#FEC84B',\n 400: '#FDB022',\n 500: '#F79009',\n 600: '#DC6803',\n 700: '#B54708',\n 800: '#93370D',\n 900: '#7A2E0E',\n },\n purple: {\n 25: '#FAFAFF',\n 50: '#F4F3FF',\n 100: '#EBE9FE',\n 200: '#D9D6FE',\n 300: '#BDB4FE',\n 400: '#9B8AFB',\n 500: '#7A5AF8',\n 600: '#6938EF',\n 700: '#5925DC',\n 800: '#4A1FB8',\n 900: '#3E1C96',\n },\n teal: {\n 25: '#F6FEFC',\n 50: '#F0FDF9',\n 100: '#CCFBEF',\n 200: '#99F6E0',\n 300: '#5FE9D0',\n 400: '#2ED3B7',\n 500: '#15B79E',\n 600: '#0E9384',\n 700: '#107569',\n 800: '#125D56',\n 900: '#134E48',\n },\n pink: {\n 25: '#fdf2f8',\n 50: '#fce7f3',\n 100: '#fbcfe8',\n 200: '#f9a8d4',\n 300: '#f472b6',\n 400: '#ec4899',\n 500: '#db2777',\n 600: '#be185d',\n 700: '#9d174d',\n 800: '#831843',\n 900: '#500724',\n },\n cyan: {\n 25: '#ecfeff',\n 50: '#cffafe',\n 100: '#a5f3fc',\n 200: '#67e8f9',\n 300: '#22d3ee',\n 400: '#06b6d4',\n 500: '#0891b2',\n 600: '#0e7490',\n 700: '#155e75',\n 800: '#164e63',\n 900: '#083344',\n },\n },\n alpha: {\n 100: 'ff',\n 90: 'e5',\n 80: 'cc',\n 70: 'b3',\n 60: '99',\n 50: '80',\n 40: '66',\n 30: '4d',\n 20: '33',\n 10: '1a',\n 0: '00',\n },\n font: {\n size: {\n '2xs': 'calc(var(--tsrd-font-size) * 0.625)',\n xs: 'calc(var(--tsrd-font-size) * 0.75)',\n sm: 'calc(var(--tsrd-font-size) * 0.875)',\n md: 'var(--tsrd-font-size)',\n lg: 'calc(var(--tsrd-font-size) * 1.125)',\n xl: 'calc(var(--tsrd-font-size) * 1.25)',\n '2xl': 'calc(var(--tsrd-font-size) * 1.5)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.875)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '7xl': 'calc(var(--tsrd-font-size) * 4.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 6)',\n '9xl': 'calc(var(--tsrd-font-size) * 8)',\n },\n lineHeight: {\n '3xs': 'calc(var(--tsrd-font-size) * 0.75)',\n '2xs': 'calc(var(--tsrd-font-size) * 0.875)',\n xs: 'calc(var(--tsrd-font-size) * 1)',\n sm: 'calc(var(--tsrd-font-size) * 1.25)',\n md: 'calc(var(--tsrd-font-size) * 1.5)',\n lg: 'calc(var(--tsrd-font-size) * 1.75)',\n xl: 'calc(var(--tsrd-font-size) * 2)',\n '2xl': 'calc(var(--tsrd-font-size) * 2.25)',\n '3xl': 'calc(var(--tsrd-font-size) * 2.5)',\n '4xl': 'calc(var(--tsrd-font-size) * 2.75)',\n '5xl': 'calc(var(--tsrd-font-size) * 3)',\n '6xl': 'calc(var(--tsrd-font-size) * 3.25)',\n '7xl': 'calc(var(--tsrd-font-size) * 3.5)',\n '8xl': 'calc(var(--tsrd-font-size) * 3.75)',\n '9xl': 'calc(var(--tsrd-font-size) * 4)',\n },\n weight: {\n thin: '100',\n extralight: '200',\n light: '300',\n normal: '400',\n medium: '500',\n semibold: '600',\n bold: '700',\n extrabold: '800',\n black: '900',\n },\n fontFamily: {\n sans: 'ui-sans-serif, Inter, system-ui, sans-serif, sans-serif',\n mono: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`,\n },\n },\n breakpoints: {\n xs: '320px',\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px',\n },\n border: {\n radius: {\n none: '0px',\n xs: 'calc(var(--tsrd-font-size) * 0.125)',\n sm: 'calc(var(--tsrd-font-size) * 0.25)',\n md: 'calc(var(--tsrd-font-size) * 0.375)',\n lg: 'calc(var(--tsrd-font-size) * 0.5)',\n xl: 'calc(var(--tsrd-font-size) * 0.75)',\n '2xl': 'calc(var(--tsrd-font-size) * 1)',\n '3xl': 'calc(var(--tsrd-font-size) * 1.5)',\n full: '9999px',\n },\n },\n size: {\n 0: '0px',\n 0.25: 'calc(var(--tsrd-font-size) * 0.0625)',\n 0.5: 'calc(var(--tsrd-font-size) * 0.125)',\n 1: 'calc(var(--tsrd-font-size) * 0.25)',\n 1.5: 'calc(var(--tsrd-font-size) * 0.375)',\n 2: 'calc(var(--tsrd-font-size) * 0.5)',\n 2.5: 'calc(var(--tsrd-font-size) * 0.625)',\n 3: 'calc(var(--tsrd-font-size) * 0.75)',\n 3.5: 'calc(var(--tsrd-font-size) * 0.875)',\n 4: 'calc(var(--tsrd-font-size) * 1)',\n 4.5: 'calc(var(--tsrd-font-size) * 1.125)',\n 5: 'calc(var(--tsrd-font-size) * 1.25)',\n 5.5: 'calc(var(--tsrd-font-size) * 1.375)',\n 6: 'calc(var(--tsrd-font-size) * 1.5)',\n 6.5: 'calc(var(--tsrd-font-size) * 1.625)',\n 7: 'calc(var(--tsrd-font-size) * 1.75)',\n 8: 'calc(var(--tsrd-font-size) * 2)',\n 9: 'calc(var(--tsrd-font-size) * 2.25)',\n 10: 'calc(var(--tsrd-font-size) * 2.5)',\n 11: 'calc(var(--tsrd-font-size) * 2.75)',\n 12: 'calc(var(--tsrd-font-size) * 3)',\n 14: 'calc(var(--tsrd-font-size) * 3.5)',\n 16: 'calc(var(--tsrd-font-size) * 4)',\n 20: 'calc(var(--tsrd-font-size) * 5)',\n 24: 'calc(var(--tsrd-font-size) * 6)',\n 28: 'calc(var(--tsrd-font-size) * 7)',\n 32: 'calc(var(--tsrd-font-size) * 8)',\n 36: 'calc(var(--tsrd-font-size) * 9)',\n 40: 'calc(var(--tsrd-font-size) * 10)',\n 44: 'calc(var(--tsrd-font-size) * 11)',\n 48: 'calc(var(--tsrd-font-size) * 12)',\n 52: 'calc(var(--tsrd-font-size) * 13)',\n 56: 'calc(var(--tsrd-font-size) * 14)',\n 60: 'calc(var(--tsrd-font-size) * 15)',\n 64: 'calc(var(--tsrd-font-size) * 16)',\n 72: 'calc(var(--tsrd-font-size) * 18)',\n 80: 'calc(var(--tsrd-font-size) * 20)',\n 96: 'calc(var(--tsrd-font-size) * 24)',\n },\n shadow: {\n xs: (_: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 2px 0 rgb(0 0 0 / 0.05)` as const,\n sm: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}` as const,\n md: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}` as const,\n lg: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}` as const,\n xl: (color: string = 'rgb(0 0 0 / 0.1)') =>\n `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}` as const,\n '2xl': (color: string = 'rgb(0 0 0 / 0.25)') =>\n `0 25px 50px -12px ${color}` as const,\n inner: (color: string = 'rgb(0 0 0 / 0.05)') =>\n `inset 0 2px 4px 0 ${color}` as const,\n none: () => `none` as const,\n },\n zIndices: {\n hide: -1,\n auto: 'auto',\n base: 0,\n docked: 10,\n dropdown: 1000,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800,\n },\n} as const\n"],"names":[],"mappings":"AAAO,MAAM,SAAS;AAAA,EACpB,QAAQ;AAAA,IAkBN,UAAU;AAAA,MAQR,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,IAAA;AAAA,IAEP,MAAM;AAAA,MAEJ,KAAK;AAAA,MAEL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MAEL,KAAK;AAAA,IAGP;AAAA,IACA,MAAM;AAAA,MAUJ,KAAK;AAAA,IAEP;AAAA,IACA,OAAO;AAAA,MAOL,KAAK;AAAA,IAKP;AAAA,IACA,KAAK;AAAA,MAKH,KAAK;AAAA,MACL,KAAK;AAAA,IAMP;AAAA,IAcA,QAAQ;AAAA,MAMN,KAAK;AAAA,MACL,KAAK;AAAA,IAKP;AAAA,EAwCF;AAAA,EACA,OAAO;AAAA,IAEL,IAAI;AAAA,EAUN;AAAA,EACA,MAAM;AAAA,IACJ,MAAM;AAAA,MAEJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAYN;AAAA,IA6BA,YAAY;AAAA,MACV,MAAM;AAAA,IAER;AAAA,EAAA;AAAA,EAUF,QAAQ;AAAA,IACN,QAAQ;AAAA,MASN,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,MAAM;AAAA,IAMJ,GAAG;AAAA,IAaH,IAAI;AAAA,IAYJ,IAAI;AAAA,EAQN;AAiCF;"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { TanStackDevtoolsConfig } from '../context/devtools-context.js';
|
|
2
2
|
import { Accessor } from 'solid-js';
|
|
3
3
|
export declare function useStyles(): Accessor<{
|
|
4
|
+
seoTabContainer: string;
|
|
5
|
+
seoTabTitle: string;
|
|
6
|
+
seoTabSection: string;
|
|
7
|
+
seoPreviewSection: string;
|
|
8
|
+
seoPreviewCard: string;
|
|
9
|
+
seoPreviewHeader: string;
|
|
10
|
+
seoPreviewImage: string;
|
|
11
|
+
seoPreviewTitle: string;
|
|
12
|
+
seoPreviewDesc: string;
|
|
13
|
+
seoPreviewUrl: string;
|
|
14
|
+
seoMissingTagsSection: string;
|
|
15
|
+
seoMissingTagsList: string;
|
|
16
|
+
seoMissingTag: string;
|
|
17
|
+
seoAllTagsFound: string;
|
|
4
18
|
devtoolsPanelContainer: (panelLocation: TanStackDevtoolsConfig["panelLocation"], isDetached: boolean) => string;
|
|
5
19
|
devtoolsPanelContainerVisibility: (isOpen: boolean) => string;
|
|
6
20
|
devtoolsPanelContainerResizing: (isResizing: Accessor<boolean>) => string;
|
|
@@ -14,7 +28,12 @@ export declare function useStyles(): Accessor<{
|
|
|
14
28
|
tab: string;
|
|
15
29
|
tabContent: string;
|
|
16
30
|
pluginsTabPanel: string;
|
|
31
|
+
pluginsTabDraw: string;
|
|
32
|
+
pluginsTabDrawExpanded: string;
|
|
33
|
+
pluginsTabDrawTransition: (mSeconds: number) => string;
|
|
17
34
|
pluginsTabSidebar: string;
|
|
35
|
+
pluginsTabSidebarExpanded: string;
|
|
36
|
+
pluginsTabSidebarTransition: (mSeconds: number) => string;
|
|
18
37
|
pluginName: string;
|
|
19
38
|
pluginsTabContent: string;
|
|
20
39
|
settingsContainer: string;
|
|
@@ -1,11 +1,130 @@
|
|
|
1
1
|
import * as goober from "goober";
|
|
2
2
|
import { createSignal } from "solid-js";
|
|
3
3
|
import { tokens } from "./tokens.js";
|
|
4
|
+
const mSecondsToCssSeconds = (mSeconds) => `${(mSeconds / 1e3).toFixed(2)}s`;
|
|
4
5
|
const stylesFactory = () => {
|
|
5
6
|
const { colors, font, size, alpha, border } = tokens;
|
|
6
7
|
const { fontFamily, size: fontSize } = font;
|
|
7
8
|
const css = goober.css;
|
|
8
9
|
return {
|
|
10
|
+
seoTabContainer: css`
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
background: ${colors.darkGray[700]};
|
|
14
|
+
border-radius: 12px;
|
|
15
|
+
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
height: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
`,
|
|
24
|
+
seoTabTitle: css`
|
|
25
|
+
font-size: 1.25rem;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: ${colors.purple[400]};
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 1rem 1.5rem 0.5rem 1.5rem;
|
|
30
|
+
text-align: left;
|
|
31
|
+
border-bottom: 1px solid ${colors.gray[700]};
|
|
32
|
+
`,
|
|
33
|
+
seoTabSection: css`
|
|
34
|
+
padding: 1.5rem;
|
|
35
|
+
background: ${colors.darkGray[800]};
|
|
36
|
+
border: 1px solid ${colors.gray[700]};
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 0.5rem;
|
|
40
|
+
margin: 1.5rem;
|
|
41
|
+
margin-bottom: 2rem;
|
|
42
|
+
border-radius: 0.75rem;
|
|
43
|
+
`,
|
|
44
|
+
seoPreviewSection: css`
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
gap: 16px;
|
|
48
|
+
margin-bottom: 0;
|
|
49
|
+
justify-content: flex-start;
|
|
50
|
+
align-items: flex-start;
|
|
51
|
+
overflow-x: auto;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
padding-bottom: 0.5rem;
|
|
54
|
+
`,
|
|
55
|
+
seoPreviewCard: css`
|
|
56
|
+
border: 1px solid ${colors.gray[700]};
|
|
57
|
+
border-radius: 8px;
|
|
58
|
+
padding: 12px 10px;
|
|
59
|
+
background: ${colors.darkGray[900]};
|
|
60
|
+
margin-bottom: 0;
|
|
61
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: flex-start;
|
|
65
|
+
min-width: 200px;
|
|
66
|
+
max-width: 240px;
|
|
67
|
+
font-size: 0.95rem;
|
|
68
|
+
gap: 4px;
|
|
69
|
+
`,
|
|
70
|
+
seoPreviewHeader: css`
|
|
71
|
+
font-size: 1rem;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
margin-bottom: 6px;
|
|
74
|
+
color: ${colors.purple[400]};
|
|
75
|
+
`,
|
|
76
|
+
seoPreviewImage: css`
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
border-radius: 6px;
|
|
79
|
+
margin-bottom: 6px;
|
|
80
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
81
|
+
height: 160px;
|
|
82
|
+
`,
|
|
83
|
+
seoPreviewTitle: css`
|
|
84
|
+
font-size: 1rem;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
margin-bottom: 2px;
|
|
87
|
+
color: ${colors.gray[100]};
|
|
88
|
+
`,
|
|
89
|
+
seoPreviewDesc: css`
|
|
90
|
+
color: ${colors.gray[300]};
|
|
91
|
+
margin-bottom: 2px;
|
|
92
|
+
font-size: 0.95rem;
|
|
93
|
+
`,
|
|
94
|
+
seoPreviewUrl: css`
|
|
95
|
+
color: ${colors.gray[500]};
|
|
96
|
+
font-size: 0.9rem;
|
|
97
|
+
margin-bottom: 2px;
|
|
98
|
+
word-break: break-all;
|
|
99
|
+
`,
|
|
100
|
+
seoMissingTagsSection: css`
|
|
101
|
+
margin-top: 4px;
|
|
102
|
+
font-size: 0.95rem;
|
|
103
|
+
color: ${colors.red[400]};
|
|
104
|
+
`,
|
|
105
|
+
seoMissingTagsList: css`
|
|
106
|
+
margin: 4px 0 0 0;
|
|
107
|
+
padding: 0;
|
|
108
|
+
list-style: none;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
gap: 6px;
|
|
112
|
+
max-width: 240px;
|
|
113
|
+
`,
|
|
114
|
+
seoMissingTag: css`
|
|
115
|
+
background: ${colors.red[500]}22;
|
|
116
|
+
color: ${colors.red[500]};
|
|
117
|
+
border-radius: 4px;
|
|
118
|
+
padding: 1px 6px;
|
|
119
|
+
font-size: 0.9rem;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
`,
|
|
122
|
+
seoAllTagsFound: css`
|
|
123
|
+
color: ${colors.green[500]};
|
|
124
|
+
font-weight: 500;
|
|
125
|
+
margin-left: 6px;
|
|
126
|
+
font-size: 0.95rem;
|
|
127
|
+
`,
|
|
9
128
|
devtoolsPanelContainer: (panelLocation, isDetached) => css`
|
|
10
129
|
direction: ltr;
|
|
11
130
|
position: fixed;
|
|
@@ -211,13 +330,34 @@ const stylesFactory = () => {
|
|
|
211
330
|
height: 100%;
|
|
212
331
|
overflow: hidden;
|
|
213
332
|
`,
|
|
214
|
-
|
|
215
|
-
width:
|
|
333
|
+
pluginsTabDraw: css`
|
|
334
|
+
width: 0px;
|
|
335
|
+
height: 100%;
|
|
216
336
|
background-color: ${colors.darkGray[800]};
|
|
217
|
-
border-right: 1px solid ${colors.gray[700]};
|
|
218
337
|
box-shadow: 0 1px 0 ${colors.gray[700]};
|
|
338
|
+
`,
|
|
339
|
+
pluginsTabDrawExpanded: css`
|
|
340
|
+
width: ${size[48]};
|
|
341
|
+
border-right: 1px solid ${colors.gray[700]};
|
|
342
|
+
`,
|
|
343
|
+
pluginsTabDrawTransition: (mSeconds) => {
|
|
344
|
+
return css`
|
|
345
|
+
transition: width ${mSecondsToCssSeconds(mSeconds)} ease;
|
|
346
|
+
`;
|
|
347
|
+
},
|
|
348
|
+
pluginsTabSidebar: css`
|
|
349
|
+
width: ${size[48]};
|
|
219
350
|
overflow-y: auto;
|
|
351
|
+
transform: translateX(-100%);
|
|
352
|
+
`,
|
|
353
|
+
pluginsTabSidebarExpanded: css`
|
|
354
|
+
transform: translateX(0);
|
|
220
355
|
`,
|
|
356
|
+
pluginsTabSidebarTransition: (mSeconds) => {
|
|
357
|
+
return css`
|
|
358
|
+
transition: transform ${mSecondsToCssSeconds(mSeconds)} ease;
|
|
359
|
+
`;
|
|
360
|
+
},
|
|
221
361
|
pluginName: css`
|
|
222
362
|
font-size: ${fontSize.xs};
|
|
223
363
|
font-family: ${fontFamily.sans};
|