@krak-stack/registry 0.11.7 → 0.11.9
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/CHANGELOG.md +54 -0
- package/README.md +39 -0
- package/dist/components/app-switcher/html.d.ts +2 -2
- package/dist/components/asset-input/html.d.ts +70 -0
- package/dist/components/asset-input/html.js +1549 -0
- package/dist/components/asset-input/index.d.ts +280 -0
- package/dist/components/asset-input/react.d.ts +32 -0
- package/dist/components/asset-input/react.js +2269 -0
- package/dist/components/asset-input/schema.d.ts +93 -0
- package/dist/components/asset-input/upload.d.ts +15 -0
- package/dist/components/asset-table/html.d.ts +110 -0
- package/dist/components/asset-table/html.js +4934 -0
- package/dist/components/asset-table/index.d.ts +225 -0
- package/dist/components/asset-table/react.d.ts +21 -0
- package/dist/components/asset-table/react.js +8241 -0
- package/dist/components/asset-table/schema.d.ts +73 -0
- package/dist/components/audit-log-table/html.js +47 -13
- package/dist/components/audit-log-table/react.js +36 -12
- package/dist/components/copy-button/html.d.ts +2 -2
- package/dist/components/danger-confirmation/html.d.ts +2 -2
- package/dist/components/data-table/classes.d.ts +2 -0
- package/dist/components/data-table/html.d.ts +58 -0
- package/dist/components/data-table/html.js +47 -13
- package/dist/components/data-table/index.d.ts +51 -1
- package/dist/components/data-table/react.d.ts +1 -0
- package/dist/components/data-table/react.js +36 -12
- package/dist/components/data-table/schema.d.ts +93 -3
- package/dist/components/date-input/html.d.ts +2 -2
- package/dist/components/docs/html.js +22 -4
- package/dist/components/docs/react.js +33 -2
- package/dist/components/editable-text/html.d.ts +2 -2
- package/dist/components/editing-locale-switcher/html.d.ts +2 -2
- package/dist/components/effect-form/react.js +343 -138
- package/dist/components/file-input/classes.d.ts +1 -1
- package/dist/components/file-input/file-type.d.ts +1 -0
- package/dist/components/file-input/html.d.ts +8 -1
- package/dist/components/file-input/html.js +170 -12
- package/dist/components/file-input/index.d.ts +1 -0
- package/dist/components/file-input/react.d.ts +9 -1
- package/dist/components/file-input/react.js +277 -127
- package/dist/components/file-input/schema.d.ts +1 -0
- package/dist/components/form/react.d.ts +5 -5
- package/dist/components/form/react.js +343 -138
- package/dist/components/icon-input/html.js +19 -5
- package/dist/components/icon-input/react.js +70 -13
- package/dist/components/locale-switcher/html.d.ts +2 -2
- package/dist/components/map-menu/html.d.ts +10 -4
- package/dist/components/map-menu/html.js +13 -8
- package/dist/components/map-menu/index.d.ts +5 -4
- package/dist/components/map-menu/react.d.ts +28 -17
- package/dist/components/map-menu/react.js +84 -178
- package/dist/components/map-menu/schema.d.ts +6 -0
- package/dist/components/map-menu/shared.d.ts +4 -0
- package/dist/components/permissions-input/classes.d.ts +8 -0
- package/dist/components/permissions-input/html.d.ts +41 -0
- package/dist/components/permissions-input/html.js +130 -0
- package/dist/components/permissions-input/index.d.ts +80 -0
- package/dist/components/permissions-input/react.d.ts +7 -0
- package/dist/components/permissions-input/react.js +201 -0
- package/dist/components/permissions-input/schema.d.ts +33 -0
- package/dist/components/phone-number-input/html.js +48 -14
- package/dist/components/phone-number-input/react.js +67 -10
- package/dist/components/presence-transition/index.d.ts +2 -2
- package/dist/components/search-menu/html.d.ts +2 -2
- package/dist/components/sidebar-layout/html.d.ts +3 -2
- package/dist/components/sidebar-layout/html.js +20 -2
- package/dist/components/sidebar-layout/index.d.ts +1 -0
- package/dist/components/sidebar-layout/react.js +33 -2
- package/dist/components/time-input/html.d.ts +2 -2
- package/dist/components/timezone-input/html.js +48 -14
- package/dist/components/timezone-input/react.js +67 -10
- package/dist/components/tracking-notice/html.d.ts +4 -4
- package/dist/components/tracking-notice/index.d.ts +2 -2
- package/dist/components/upload-attachment/classes.d.ts +3 -2
- package/dist/components/upload-attachment/html.d.ts +1 -1
- package/dist/components/upload-attachment/html.js +7 -5
- package/dist/components/upload-attachment/react.d.ts +3 -1
- package/dist/components/upload-attachment/react.js +25 -17
- package/dist/components/virtualized-combobox/classes.d.ts +12 -0
- package/dist/components/virtualized-combobox/html.d.ts +45 -3
- package/dist/components/virtualized-combobox/html.js +48 -14
- package/dist/components/virtualized-combobox/index.d.ts +55 -4
- package/dist/components/virtualized-combobox/react.d.ts +6 -2
- package/dist/components/virtualized-combobox/react.js +67 -10
- package/dist/components/virtualized-combobox/schema.d.ts +60 -4
- package/dist/components/webhook-delivery-table/html.js +47 -13
- package/dist/components/webhook-delivery-table/react.js +36 -12
- package/dist/lib/access/index.d.ts +61 -0
- package/dist/lib/access/index.js +92 -0
- package/dist/lib/access/table/classes.d.ts +13 -0
- package/dist/lib/access/table/html.d.ts +39 -0
- package/dist/lib/access/table/html.js +157 -0
- package/dist/lib/access/table/index.d.ts +32 -0
- package/dist/lib/access/table/react.d.ts +3 -0
- package/dist/lib/access/table/react.js +195 -0
- package/dist/lib/access/table/schema.d.ts +43 -0
- package/dist/lib/docs.integrations.server.js +23 -1
- package/dist/lib/docs.js +33 -2
- package/dist/lib/docs.server.js +29 -2
- package/dist/lib/documentation-toolkit.js +23 -1
- package/dist/lib/effect-ui-adapter/use-model.d.ts +1 -1
- package/dist/lib/effect-ui-adapter/use-model.js +19 -11
- package/dist/lib/lucide-effect.d.ts +19 -19
- package/dist/lib/lucide-effect.js +38 -38
- package/dist/services/assets/library.d.ts +221 -0
- package/dist/services/assets/schema.d.ts +3 -0
- package/dist/services/assets/url.d.ts +12 -0
- package/dist/services/assets/use-library.d.ts +20 -0
- package/package.json +13 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Command, Component, UiSchema } from "effect/ui";
|
|
3
|
+
import { WriteClipboard } from "../copy-button/index.js";
|
|
4
|
+
import { assetUrl } from "../../services/assets/url.js";
|
|
5
|
+
import { type AssetTableItem, type AssetTableSharedProps } from "./schema.js";
|
|
6
|
+
import { AssetLibraryActions } from "../../services/assets/library.js";
|
|
7
|
+
declare const Manage: UiSchema.TaggedEnum<{
|
|
8
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
9
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
10
|
+
readonly assetId: Schema.String;
|
|
11
|
+
}>;
|
|
12
|
+
readonly Delete: Schema.TaggedStruct<"Delete", {
|
|
13
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
14
|
+
}>;
|
|
15
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
16
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
17
|
+
}>;
|
|
18
|
+
readonly Deleted: Schema.TaggedStruct<"Deleted", {
|
|
19
|
+
readonly failed: Schema.Boolean;
|
|
20
|
+
}>;
|
|
21
|
+
readonly Replace: Schema.TaggedStruct<"Replace", {
|
|
22
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
25
|
+
declare const RemoveAssetRows_base: Command.Service<RemoveAssetRows, "asset-table/DeleteAssets", {
|
|
26
|
+
readonly ids: readonly string[];
|
|
27
|
+
}, UiSchema.TaggedEnum<{
|
|
28
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
29
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
30
|
+
readonly assetId: Schema.String;
|
|
31
|
+
}>;
|
|
32
|
+
readonly Delete: Schema.TaggedStruct<"Delete", {
|
|
33
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
34
|
+
}>;
|
|
35
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
36
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly Deleted: Schema.TaggedStruct<"Deleted", {
|
|
39
|
+
readonly failed: Schema.Boolean;
|
|
40
|
+
}>;
|
|
41
|
+
readonly Replace: Schema.TaggedStruct<"Replace", {
|
|
42
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
43
|
+
}>;
|
|
44
|
+
}>, false, Schema.Never, never>;
|
|
45
|
+
export declare class RemoveAssetRows extends RemoveAssetRows_base {
|
|
46
|
+
static readonly layer: import("effect/Layer").Layer<RemoveAssetRows, never, AssetLibraryActions>;
|
|
47
|
+
}
|
|
48
|
+
export declare const assetTableManagementOptions: {
|
|
49
|
+
readonly name: "AssetTableManagement";
|
|
50
|
+
readonly model: Schema.Struct<{
|
|
51
|
+
readonly replaceId: Schema.NullOr<Schema.String>;
|
|
52
|
+
readonly deleting: Schema.Boolean;
|
|
53
|
+
readonly failed: Schema.Boolean;
|
|
54
|
+
}>;
|
|
55
|
+
readonly message: UiSchema.TaggedEnum<{
|
|
56
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
57
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
58
|
+
readonly assetId: Schema.String;
|
|
59
|
+
}>;
|
|
60
|
+
readonly Delete: Schema.TaggedStruct<"Delete", {
|
|
61
|
+
readonly ids: Schema.$Array<Schema.String>;
|
|
62
|
+
}>;
|
|
63
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
64
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
65
|
+
}>;
|
|
66
|
+
readonly Deleted: Schema.TaggedStruct<"Deleted", {
|
|
67
|
+
readonly failed: Schema.Boolean;
|
|
68
|
+
}>;
|
|
69
|
+
readonly Replace: Schema.TaggedStruct<"Replace", {
|
|
70
|
+
readonly id: Schema.NullOr<Schema.String>;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
readonly events: UiSchema.TaggedEnum<{
|
|
74
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
75
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
76
|
+
readonly assetId: Schema.String;
|
|
77
|
+
}>;
|
|
78
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
79
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
80
|
+
}>;
|
|
81
|
+
}>;
|
|
82
|
+
readonly restore: false;
|
|
83
|
+
};
|
|
84
|
+
type ManagementModel = typeof assetTableManagementOptions.model.Type;
|
|
85
|
+
type ManagementMessage = typeof Manage.Type;
|
|
86
|
+
type ManagementEvent = typeof assetTableManagementOptions.events.Type;
|
|
87
|
+
export declare const assetTableManagementBehaviours: {
|
|
88
|
+
init: () => ManagementModel;
|
|
89
|
+
update: (context: Component.Update<ManagementModel, ManagementMessage, ManagementEvent, {}>, message: ManagementMessage) => ManagementModel | Component.Step<ManagementModel, ManagementMessage, ManagementEvent, RemoveAssetRows>;
|
|
90
|
+
};
|
|
91
|
+
export { Manage as AssetTableManagementMessage };
|
|
92
|
+
export declare const assetTableMessages: (locale: string, messages?: AssetTableSharedProps["messages"]) => {
|
|
93
|
+
title: string;
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
type: string;
|
|
97
|
+
size: string;
|
|
98
|
+
created: string;
|
|
99
|
+
updated: string;
|
|
100
|
+
download: string;
|
|
101
|
+
replace: string;
|
|
102
|
+
delete: string;
|
|
103
|
+
deleteSelected: string;
|
|
104
|
+
empty: string;
|
|
105
|
+
loadFailed: string;
|
|
106
|
+
deleteFailed: string;
|
|
107
|
+
copyLink: string;
|
|
108
|
+
linkCopied: string;
|
|
109
|
+
copyLinkUnavailable: string;
|
|
110
|
+
close: string;
|
|
111
|
+
};
|
|
112
|
+
export declare const assetTableBuiltinActions: readonly ["download", "copyLink"];
|
|
113
|
+
export { assetUrl };
|
|
114
|
+
export declare const assetCopyUrl: (url: string, origin?: string) => string | undefined;
|
|
115
|
+
export declare const assetNameReference: (asset: AssetTableItem) => {
|
|
116
|
+
imageSrc?: string;
|
|
117
|
+
label: string;
|
|
118
|
+
};
|
|
119
|
+
export declare const AssetTableEvents: UiSchema.TaggedEnum<{
|
|
120
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
121
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
122
|
+
readonly assetId: Schema.String;
|
|
123
|
+
}>;
|
|
124
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
125
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
126
|
+
}>;
|
|
127
|
+
}>;
|
|
128
|
+
export declare const AssetTableMessage: UiSchema.TaggedEnum<{
|
|
129
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
130
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
131
|
+
readonly assetId: Schema.String;
|
|
132
|
+
}>;
|
|
133
|
+
readonly BuiltinRequested: Schema.TaggedStruct<"BuiltinRequested", {
|
|
134
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
135
|
+
readonly assetId: Schema.String;
|
|
136
|
+
}>;
|
|
137
|
+
readonly CopyFinished: Schema.TaggedStruct<"CopyFinished", {
|
|
138
|
+
readonly assetId: Schema.String;
|
|
139
|
+
readonly success: Schema.Boolean;
|
|
140
|
+
}>;
|
|
141
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
142
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
143
|
+
}>;
|
|
144
|
+
readonly Dismiss: Schema.TaggedStruct<"Dismiss", {}>;
|
|
145
|
+
}>;
|
|
146
|
+
export declare const assetTableOptions: {
|
|
147
|
+
readonly name: "AssetTable";
|
|
148
|
+
readonly props: Schema.Struct<{
|
|
149
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
150
|
+
readonly id: Schema.NonEmptyString;
|
|
151
|
+
readonly name: Schema.String;
|
|
152
|
+
readonly mimeType: Schema.String;
|
|
153
|
+
readonly byteSize: Schema.Finite;
|
|
154
|
+
readonly createdAt: Schema.Date;
|
|
155
|
+
readonly updatedAt: Schema.Date;
|
|
156
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
157
|
+
}>>>;
|
|
158
|
+
readonly access: Schema.optionalKey<Schema.Struct<{
|
|
159
|
+
readonly scopeKey: Schema.NonEmptyString;
|
|
160
|
+
readonly permissions: Schema.$Array<Schema.Literals<readonly ["list", "read", "create", "update", "delete"]>>;
|
|
161
|
+
}>>;
|
|
162
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
163
|
+
readonly timeZone: Schema.optionalKey<Schema.String>;
|
|
164
|
+
readonly messages: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
|
|
165
|
+
readonly id: Schema.optionalKey<Schema.String>;
|
|
166
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
167
|
+
readonly type: Schema.optionalKey<Schema.String>;
|
|
168
|
+
readonly size: Schema.optionalKey<Schema.String>;
|
|
169
|
+
readonly created: Schema.optionalKey<Schema.String>;
|
|
170
|
+
readonly updated: Schema.optionalKey<Schema.String>;
|
|
171
|
+
readonly download: Schema.optionalKey<Schema.String>;
|
|
172
|
+
readonly replace: Schema.optionalKey<Schema.String>;
|
|
173
|
+
readonly delete: Schema.optionalKey<Schema.String>;
|
|
174
|
+
readonly deleteSelected: Schema.optionalKey<Schema.String>;
|
|
175
|
+
readonly empty: Schema.optionalKey<Schema.String>;
|
|
176
|
+
readonly loadFailed: Schema.optionalKey<Schema.String>;
|
|
177
|
+
readonly deleteFailed: Schema.optionalKey<Schema.String>;
|
|
178
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
179
|
+
readonly copyLink: Schema.optionalKey<Schema.String>;
|
|
180
|
+
readonly linkCopied: Schema.optionalKey<Schema.String>;
|
|
181
|
+
readonly copyLinkUnavailable: Schema.optionalKey<Schema.String>;
|
|
182
|
+
readonly close: Schema.optionalKey<Schema.String>;
|
|
183
|
+
}>>>;
|
|
184
|
+
}>;
|
|
185
|
+
readonly model: Schema.Struct<{
|
|
186
|
+
readonly copyLinkAssetId: Schema.NullOr<Schema.String>;
|
|
187
|
+
readonly copying: Schema.NullOr<Schema.String>;
|
|
188
|
+
readonly copied: Schema.Boolean;
|
|
189
|
+
}>;
|
|
190
|
+
readonly message: UiSchema.TaggedEnum<{
|
|
191
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
192
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
193
|
+
readonly assetId: Schema.String;
|
|
194
|
+
}>;
|
|
195
|
+
readonly BuiltinRequested: Schema.TaggedStruct<"BuiltinRequested", {
|
|
196
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
197
|
+
readonly assetId: Schema.String;
|
|
198
|
+
}>;
|
|
199
|
+
readonly CopyFinished: Schema.TaggedStruct<"CopyFinished", {
|
|
200
|
+
readonly assetId: Schema.String;
|
|
201
|
+
readonly success: Schema.Boolean;
|
|
202
|
+
}>;
|
|
203
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
204
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
205
|
+
}>;
|
|
206
|
+
readonly Dismiss: Schema.TaggedStruct<"Dismiss", {}>;
|
|
207
|
+
}>;
|
|
208
|
+
readonly events: UiSchema.TaggedEnum<{
|
|
209
|
+
readonly ActionRequested: Schema.TaggedStruct<"ActionRequested", {
|
|
210
|
+
readonly action: Schema.Literals<readonly ["download", "copyLink", "replace", "delete"]>;
|
|
211
|
+
readonly assetId: Schema.String;
|
|
212
|
+
}>;
|
|
213
|
+
readonly DeleteSelected: Schema.TaggedStruct<"DeleteSelected", {
|
|
214
|
+
readonly assetIds: Schema.$Array<Schema.String>;
|
|
215
|
+
}>;
|
|
216
|
+
}>;
|
|
217
|
+
readonly restore: false;
|
|
218
|
+
};
|
|
219
|
+
type Model = typeof assetTableOptions.model.Type;
|
|
220
|
+
type Message = typeof AssetTableMessage.Type;
|
|
221
|
+
type Event = typeof AssetTableEvents.Type;
|
|
222
|
+
export declare const assetTableBehaviours: {
|
|
223
|
+
init: () => Model;
|
|
224
|
+
update: (context: Component.Update<Model, Message, Event, AssetTableSharedProps>, message: Message) => Model | Component.Step<Model, Message, Event, WriteClipboard>;
|
|
225
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AssetLibraryRuntime } from "../../services/assets/library.js";
|
|
2
|
+
import { type DataTableStatus } from "../ui/data-table.js";
|
|
3
|
+
import type { AssetTableItem, AssetTableSharedProps } from "./schema.js";
|
|
4
|
+
export type { AssetTableItem } from "./schema.js";
|
|
5
|
+
export { useAssetLibrary } from "../../services/assets/use-library.js";
|
|
6
|
+
export interface AssetTableProps<T extends AssetTableItem = AssetTableItem> extends Omit<AssetTableSharedProps, "assets"> {
|
|
7
|
+
assets: readonly T[];
|
|
8
|
+
status?: DataTableStatus;
|
|
9
|
+
onDownload?: (asset: T) => void;
|
|
10
|
+
onCopyLink?: (asset: T) => void;
|
|
11
|
+
onReplace?: (asset: T) => void;
|
|
12
|
+
onDelete?: (asset: T) => void;
|
|
13
|
+
onDeleteSelected?: (assets: T[]) => void;
|
|
14
|
+
}
|
|
15
|
+
export type ConnectedAssetTableProps = Omit<AssetTableProps, "assets"> & {
|
|
16
|
+
assets?: undefined;
|
|
17
|
+
runtime: AssetLibraryRuntime;
|
|
18
|
+
access: NonNullable<AssetTableSharedProps["access"]>;
|
|
19
|
+
};
|
|
20
|
+
export declare function AssetTable<T extends AssetTableItem>(props: AssetTableProps<T>): React.JSX.Element;
|
|
21
|
+
export declare function AssetTable(props: ConnectedAssetTableProps): React.JSX.Element;
|