@dashfoo/react 0.6.1 → 0.6.2
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.ts +20 -108
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Action, Dashfoo, DockLocation, DragSubject, DropIntent, FloatNode, GlobalAttributes, Orientation, RowNode, SnapConfig, TabNode, TabsetNode } from "@dashfoo/core";
|
|
2
2
|
import { ComponentProps, ComponentType, ReactNode, Ref } from "react";
|
|
3
3
|
import { DragDropManager } from "@dnd-kit/dom";
|
|
4
|
+
import "zustand";
|
|
4
5
|
//#region src/hooks/persistence.d.ts
|
|
5
6
|
type StorageAdapter = {
|
|
6
7
|
getItem: (key: string) => string | null;
|
|
@@ -80,9 +81,7 @@ type DashfooLayoutProps = {
|
|
|
80
81
|
declare const DashfooLayout: import("react").ForwardRefExoticComponent<DashfooLayoutProps & import("react").RefAttributes<DashfooHandle>>;
|
|
81
82
|
//#endregion
|
|
82
83
|
//#region src/components/drag-root.d.ts
|
|
83
|
-
declare const DashfooDragProvider: ({
|
|
84
|
-
children
|
|
85
|
-
}: {
|
|
84
|
+
declare const DashfooDragProvider: ({ children }: {
|
|
86
85
|
children: ReactNode;
|
|
87
86
|
}) => ReactNode;
|
|
88
87
|
//#endregion
|
|
@@ -92,11 +91,7 @@ type ExternalTabSourceOptions = {
|
|
|
92
91
|
disabled?: boolean;
|
|
93
92
|
label?: string;
|
|
94
93
|
};
|
|
95
|
-
declare const useExternalTabSource: ({
|
|
96
|
-
createTab,
|
|
97
|
-
disabled,
|
|
98
|
-
label
|
|
99
|
-
}: ExternalTabSourceOptions) => {
|
|
94
|
+
declare const useExternalTabSource: ({ createTab, disabled, label }: ExternalTabSourceOptions) => {
|
|
100
95
|
ref: (element: Element | null) => void;
|
|
101
96
|
};
|
|
102
97
|
declare const useDragSubject: () => DragSubject | null;
|
|
@@ -150,44 +145,11 @@ type TabsetViewProps = {
|
|
|
150
145
|
//#endregion
|
|
151
146
|
//#region src/components/layout.d.ts
|
|
152
147
|
declare const Layout: {
|
|
153
|
-
readonly DragLayer: ({
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}:
|
|
158
|
-
readonly FloatLayer: ({
|
|
159
|
-
children,
|
|
160
|
-
floats,
|
|
161
|
-
global
|
|
162
|
-
}: FloatLayerProps) => import("react").ReactNode;
|
|
163
|
-
readonly Root: ({
|
|
164
|
-
children,
|
|
165
|
-
closableTabs,
|
|
166
|
-
dispatch,
|
|
167
|
-
draggableTabs,
|
|
168
|
-
draggableTabsets,
|
|
169
|
-
editable,
|
|
170
|
-
floatable,
|
|
171
|
-
keepMounted,
|
|
172
|
-
maximizable,
|
|
173
|
-
model,
|
|
174
|
-
renamableTabs,
|
|
175
|
-
renderTab,
|
|
176
|
-
renderTabLabel,
|
|
177
|
-
renderTabsetToolbar,
|
|
178
|
-
resizableSplits,
|
|
179
|
-
rootRef,
|
|
180
|
-
snap,
|
|
181
|
-
style,
|
|
182
|
-
...props
|
|
183
|
-
}: LayoutRootProps) => import("react").ReactNode;
|
|
184
|
-
readonly Rows: ({
|
|
185
|
-
node,
|
|
186
|
-
renderTabset
|
|
187
|
-
}: RowViewProps) => import("react").ReactNode;
|
|
188
|
-
readonly Tabset: ({
|
|
189
|
-
node
|
|
190
|
-
}: TabsetViewProps) => import("react").ReactNode;
|
|
148
|
+
readonly DragLayer: ({ children, onCommit, splitDock }: DragProviderProps) => import("react").ReactNode;
|
|
149
|
+
readonly FloatLayer: ({ children, floats, global }: FloatLayerProps) => import("react").ReactNode;
|
|
150
|
+
readonly Root: ({ children, closableTabs, dispatch, draggableTabs, draggableTabsets, editable, floatable, keepMounted, maximizable, model, renamableTabs, renderTab, renderTabLabel, renderTabsetToolbar, resizableSplits, rootRef, snap, style, ...props }: LayoutRootProps) => import("react").ReactNode;
|
|
151
|
+
readonly Rows: ({ node, renderTabset }: RowViewProps) => import("react").ReactNode;
|
|
152
|
+
readonly Tabset: ({ node }: TabsetViewProps) => import("react").ReactNode;
|
|
191
153
|
};
|
|
192
154
|
//#endregion
|
|
193
155
|
//#region src/components/panel.d.ts
|
|
@@ -238,67 +200,19 @@ type TabsetTablistProps = ComponentProps<"div">;
|
|
|
238
200
|
//#endregion
|
|
239
201
|
//#region src/components/tabset/tabset.d.ts
|
|
240
202
|
declare const Tabset: {
|
|
241
|
-
readonly CloseButton: ({
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}:
|
|
246
|
-
readonly Content: ({
|
|
247
|
-
children,
|
|
248
|
-
style,
|
|
249
|
-
...props
|
|
250
|
-
}: TabsetContentProps) => import("react").ReactNode;
|
|
251
|
-
readonly FloatButton: ({
|
|
252
|
-
children,
|
|
253
|
-
onClick,
|
|
254
|
-
...props
|
|
255
|
-
}: TabsetFloatButtonProps) => import("react").ReactNode;
|
|
256
|
-
readonly Grip: ({
|
|
257
|
-
children,
|
|
258
|
-
ref: userRef,
|
|
259
|
-
...props
|
|
260
|
-
}: TabsetGripProps) => import("react").ReactNode;
|
|
261
|
-
readonly MaximizeButton: ({
|
|
262
|
-
children,
|
|
263
|
-
onClick,
|
|
264
|
-
...props
|
|
265
|
-
}: TabsetMaximizeButtonProps) => import("react").ReactNode;
|
|
203
|
+
readonly CloseButton: ({ children, onClick, ...props }: TabsetCloseButtonProps) => import("react").ReactNode;
|
|
204
|
+
readonly Content: ({ children, style, ...props }: TabsetContentProps) => import("react").ReactNode;
|
|
205
|
+
readonly FloatButton: ({ children, onClick, ...props }: TabsetFloatButtonProps) => import("react").ReactNode;
|
|
206
|
+
readonly Grip: ({ children, ref: userRef, ...props }: TabsetGripProps) => import("react").ReactNode;
|
|
207
|
+
readonly MaximizeButton: ({ children, onClick, ...props }: TabsetMaximizeButtonProps) => import("react").ReactNode;
|
|
266
208
|
readonly OverflowMenu: () => import("react").ReactNode;
|
|
267
209
|
readonly RenameInput: (props: TabsetRenameInputProps) => import("react").ReactNode;
|
|
268
|
-
readonly Root: ({
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}: TabsetRootProps) => import("react").ReactNode;
|
|
275
|
-
readonly Tab: ({
|
|
276
|
-
children,
|
|
277
|
-
ref: userRef,
|
|
278
|
-
tab,
|
|
279
|
-
...props
|
|
280
|
-
}: TabsetTabProps) => import("react").ReactNode;
|
|
281
|
-
readonly Tablist: ({
|
|
282
|
-
onKeyDown,
|
|
283
|
-
ref: userRef,
|
|
284
|
-
style,
|
|
285
|
-
...props
|
|
286
|
-
}: TabsetTablistProps) => import("react").ReactNode;
|
|
287
|
-
readonly TabStrip: ({
|
|
288
|
-
style,
|
|
289
|
-
...props
|
|
290
|
-
}: TabsetTabStripProps) => import("react").ReactNode;
|
|
291
|
-
readonly Toolbar: ({
|
|
292
|
-
style,
|
|
293
|
-
...props
|
|
294
|
-
}: TabsetToolbarProps) => import("react").ReactNode;
|
|
295
|
-
readonly Trigger: ({
|
|
296
|
-
children,
|
|
297
|
-
onClick,
|
|
298
|
-
onDoubleClick,
|
|
299
|
-
ref: userRef,
|
|
300
|
-
...props
|
|
301
|
-
}: TabsetTriggerProps) => import("react").ReactNode;
|
|
210
|
+
readonly Root: ({ children, node, ref: userRef, style, ...props }: TabsetRootProps) => import("react").ReactNode;
|
|
211
|
+
readonly Tab: ({ children, ref: userRef, tab, ...props }: TabsetTabProps) => import("react").ReactNode;
|
|
212
|
+
readonly Tablist: ({ onKeyDown, ref: userRef, style, ...props }: TabsetTablistProps) => import("react").ReactNode;
|
|
213
|
+
readonly TabStrip: ({ style, ...props }: TabsetTabStripProps) => import("react").ReactNode;
|
|
214
|
+
readonly Toolbar: ({ style, ...props }: TabsetToolbarProps) => import("react").ReactNode;
|
|
215
|
+
readonly Trigger: ({ children, onClick, onDoubleClick, ref: userRef, ...props }: TabsetTriggerProps) => import("react").ReactNode;
|
|
302
216
|
};
|
|
303
217
|
//#endregion
|
|
304
218
|
//#region src/components/tab-overflow.d.ts
|
|
@@ -392,9 +306,7 @@ type ResponsiveModel = {
|
|
|
392
306
|
declare const matchBreakpoint: (breakpoint: Breakpoint, width: number) => boolean;
|
|
393
307
|
declare const activeBreakpoint: (breakpoints: Array<Breakpoint>, width: number) => Breakpoint;
|
|
394
308
|
declare const useContainerWidth: () => [(element: HTMLElement | null) => void, number];
|
|
395
|
-
declare const useResponsiveModel: ({
|
|
396
|
-
breakpoints
|
|
397
|
-
}: UseResponsiveModelOptions) => ResponsiveModel;
|
|
309
|
+
declare const useResponsiveModel: ({ breakpoints }: UseResponsiveModelOptions) => ResponsiveModel;
|
|
398
310
|
//#endregion
|
|
399
311
|
//#region src/hooks/store.d.ts
|
|
400
312
|
type DashfooStore = {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/hooks/persistence.ts","../src/components/dashfoo-layout.tsx","../src/components/drag-root.tsx","../src/hooks/drag-hooks.tsx","../src/components/drag-adapter.tsx","../src/components/float-layer.tsx","../src/components/layout-root.tsx","../src/components/row-view.tsx","../src/components/tabset/tabset-view.tsx","../src/components/layout.tsx","../src/components/panel.tsx","../src/components/tabset/tabset-tab-controls.tsx","../src/components/tabset/tabset-content.tsx","../src/components/tabset/tabset-toolbar.tsx","../src/components/tabset/tabset-root.tsx","../src/components/tabset/tabset-tab.tsx","../src/components/tabset/tabset-tablist.tsx","../src/components/tabset/tabset.ts","../src/components/tab-overflow.tsx","../src/components/tabset/tabset-store.ts","../src/hooks/layout-store.ts","../src/hooks/responsive.ts","../src/hooks/store.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/hooks/persistence.ts","../src/components/dashfoo-layout.tsx","../src/components/drag-root.tsx","../src/hooks/drag-hooks.tsx","../src/components/drag-adapter.tsx","../src/components/float-layer.tsx","../src/components/layout-root.tsx","../src/components/row-view.tsx","../src/components/tabset/tabset-view.tsx","../src/components/layout.tsx","../src/components/panel.tsx","../src/components/tabset/tabset-tab-controls.tsx","../src/components/tabset/tabset-content.tsx","../src/components/tabset/tabset-toolbar.tsx","../src/components/tabset/tabset-root.tsx","../src/components/tabset/tabset-tab.tsx","../src/components/tabset/tabset-tablist.tsx","../src/components/tabset/tabset.ts","../src/components/tab-overflow.tsx","../src/components/tabset/tabset-store.ts","../src/hooks/layout-store.ts","../src/hooks/responsive.ts","../src/hooks/store.ts"],"mappings":";;;;;KAMK;EACH,UAAU;EACV,aAAa;EACb,UAAU,aAAa;;cAGnB,4BAA2B;cAa3B,qBAAqB;KAkCtB;EACH;EACA;EACA,SAAS;;KAGN;EACH;EAEA,cAAc;EACd,OAAO,OAAO;;cAGV,iBACJ,QAAQ,sBACR,cAAc,wBACb;;;KCjDE;EAA0B;EAAqB;EAAa,UAAU;;KAmBtE,eAAe;EAAgB,MAAM;;KAIrC;EACH,SACE,KAAK,SACL;IAAU;IAAgB,WAAW;IAAc;;EAErD;EACA;EACA,WAAW;EACX,WAAW,QAAQ;EAEnB,YAAY;EAEZ,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB;EACA,YAAY,eAAe;EAE3B;EACA,YAAY,kBAAkB;EAC9B;;KAGG;EACH;EACA,aAAa,eAAe;EAC5B,eAAe;EACf;EACA;EAEA;EACA,WAAW,KAAK,YAAY;EAE5B;EACA;EACA;EACA,QAAQ;EACR,YAAY,QAAQ,WAAW;EAC/B,wBAAwB;EACxB,2BAA2B;EAC3B,iBAAiB,OAAO,SAAS,SAAS;EAC1C,UAAU;EACV;EACA,kBAAkB,KAAK,YAAY;EACnC,uBAAuB,QAAQ,eAAe;EAE9C;EACA;IAAe;IAAkB,cAAc;;EAE/C,OAAO;;cAGH,+BAAa,0BAAA,qCAAA,cAAA;;;cCvFb,wBAAuB;EAAgB,UAAU;MAAc;;;KCkLhE;EACH,iBA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