@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @krak-stack/registry
|
|
2
2
|
|
|
3
|
+
## 0.11.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bac7f20: Add a headless Access registry item and separate React and Effect UI HTML source installs for Access Table. The table renders role grants and optional API-key permissions from a project access definition. Package imports are `@krak-stack/registry/access/table/react` and `/html`.
|
|
8
|
+
- bac7f20: Keep keyboard focus visible on attachment action buttons without outlining the surrounding attachment or clipping the ring in scrolling lists.
|
|
9
|
+
- 386a549: Add built-in Download and Copy link actions and show image thumbnails beside filenames in the React and Effect UI HTML Asset Table. Set a stable, authorized `url` on each row, or keep handling actions in the app.
|
|
10
|
+
|
|
11
|
+
Effect UI HTML Data Table row actions accept an optional icon renderer, which Asset Table uses to match the React row menu icons.
|
|
12
|
+
- bac7f20: Refresh managed image thumbnails after an asset is replaced without changing its shared link. Show image thumbnails in selected Asset Input attachments.
|
|
13
|
+
|
|
14
|
+
Show local image thumbnails in the upload dialog, both before upload and during progress.
|
|
15
|
+
- 386a549: Move the React and Effect UI HTML implementations of Asset Input and Asset Table into the Assets package. Both packages build from that source, so existing registry imports and source installs keep working.
|
|
16
|
+
- bac7f20: Expose project roles, permission policies, and `CurrentActor` through `@krak-stack/registry/access`, without coupling reusable services to an authentication provider. Assets reads the verified request actor directly and ships a standalone `AssetsAccess` role definition. `Assets.apiLayer()` uses those grants by default and accepts an explicit permission matrix for existing projects.
|
|
17
|
+
|
|
18
|
+
Compose Registry access definitions with `.merge(AssetsAccess)`. Matching role names gain the incoming grants without replacing existing grants or importing new roles. Override role matches when the names differ.
|
|
19
|
+
|
|
20
|
+
Mount an authorized asset list and stable file redirects through `Assets.apiLayer`, with a typed `AssetsApi` contract.
|
|
21
|
+
|
|
22
|
+
Expose a typed HTTP client at `@krak-stack/assets/client` and the opt-in `AssetList` Query at `@krak-stack/assets/queries`. List-only callers receive metadata without file URLs.
|
|
23
|
+
|
|
24
|
+
Export `assetWorkflowsLayer` to register document processing and upload scanning together on the application's workflow engine.
|
|
25
|
+
|
|
26
|
+
Complete browser uploads using the reserved asset ID, with a separate attempt ID only for replacements. Poll upload status on the asset URL, and open or download the file using its stable `url`. Organization asset statistics are computed in PostgreSQL.
|
|
27
|
+
|
|
28
|
+
Consolidate asset listing and organization-wide stats into `GET /api/assets`. The route returns all matching assets without server-side pagination.
|
|
29
|
+
|
|
30
|
+
Start uploads at `POST /api/assets`, fetch details at `GET /api/assets/:assetId`, and search or read document chunks at `GET /api/assets/:assetId/chunks`. HTTP clients use chunk IDs instead of processing IDs.
|
|
31
|
+
|
|
32
|
+
Move asset authoring HTTP handlers into the package: document retrieval, statistics, scanned uploads, replacement, and bulk deletion. Upload intents bind actor, organization, and replacement target. Export browser transport and mutation Commands through `@krak-stack/assets/commands`.
|
|
33
|
+
- 386a549: Add built-in image, icon, and description support for virtualized combobox options in React and Effect UI HTML. Asset Input now uses the built-in option layout.
|
|
34
|
+
- 386a549: Add Effect UI HTML versions of Asset Input and Asset Table. Share upload staging, progress, cancellation and publication retry between React and Effect UI, while keeping transport and asset selection application-owned.
|
|
35
|
+
|
|
36
|
+
Keep publication retries isolated to their upload job, preserve cancellation when the HTML field is disabled, and match the React asset picker’s trigger and option alignment.
|
|
37
|
+
- 386a549: Show a rounded progress bar that fills the remaining space beside the Uploading label in React and Effect UI HTML attachments.
|
|
38
|
+
|
|
39
|
+
Restore the default Effect UI HTML attachment icons when no custom file icon is supplied.
|
|
40
|
+
- bac7f20: Add a controlled Permissions Input for React and Effect UI HTML. Hosts supply grouped, assignable permissions and receive selection changes without coupling the picker to an authentication provider.
|
|
41
|
+
- 386a549: Use the same default Data Table row height and separators in React and Effect UI HTML. Override them with `classes.row` on either renderer.
|
|
42
|
+
- 504c0e3: Center the active navigation link when Sidebar Layout opens without scrolling the page or re-centering on every navigation.
|
|
43
|
+
|
|
44
|
+
## 0.11.8
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- a1f54d4: Use matching file-type icons in File Input, the asset picker, selected attachments, and upload dialogs. Recognize more formats, including archives, presentations, code, fonts, and ebooks.
|
|
49
|
+
- 03de257: Show only the attachment and its remove control after a single file is selected in File Input. Removing the file restores the picker.
|
|
50
|
+
- 03de257: Add React Asset Input and Asset Table components for selecting, browsing, and uploading files with application-owned transport and publication.
|
|
51
|
+
|
|
52
|
+
Asset Input supports drag-and-drop, local file selection, and choosing an existing asset from attachment cards in one control. It displays the selected asset as a removable attachment.
|
|
53
|
+
|
|
54
|
+
- a1f54d4: Keep long filenames from widening Asset Input previews and upload dialogs.
|
|
55
|
+
- ac36f9a: Allow map visibility, confirmation actions, and browser location to be configured independently.
|
|
56
|
+
|
|
3
57
|
## 0.11.7
|
|
4
58
|
|
|
5
59
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -158,6 +158,45 @@ To install editable source instead of importing the package, use the shadcn regi
|
|
|
158
158
|
bunx shadcn@latest add https://krakstack.net/r/data-table.json
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
+
## Server-side access
|
|
162
|
+
|
|
163
|
+
`@krak-stack/registry/access` defines project-scoped permissions, typed roles,
|
|
164
|
+
and Effect policies without an authentication provider:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import { defineProjectAccess } from "@krak-stack/registry/access";
|
|
168
|
+
|
|
169
|
+
const Access = defineProjectAccess({
|
|
170
|
+
project: "courses",
|
|
171
|
+
permissions: ["asset:read", "asset:delete"],
|
|
172
|
+
roles: { viewer: ["asset:read"], admin: ["asset:read", "asset:delete"] },
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The host authenticates callers, verifies their organization and role
|
|
177
|
+
membership, and provides `CurrentActor` for the request. Use
|
|
178
|
+
`Access.permissionsForRoles(verifiedRoles)`, or supply effective grants
|
|
179
|
+
from your own provider. `withPolicy(Access.permission("asset:read"))`
|
|
180
|
+
checks the qualified grant before running an Effect; it does not verify
|
|
181
|
+
identity or check ownership of a particular record.
|
|
182
|
+
|
|
183
|
+
To include another definition’s grants, use `Access.merge(OtherAccess)`.
|
|
184
|
+
This adds grants to matching role names without changing the original
|
|
185
|
+
definition, importing new roles, or changing either permission namespace.
|
|
186
|
+
For different names, pass `{ roles: { localRole: "otherRole" } }`; use `null`
|
|
187
|
+
to skip a local role. Unspecified mappings still match by name. The host
|
|
188
|
+
uses the merged definition to compute effective grants for verified roles.
|
|
189
|
+
|
|
190
|
+
Existing `@krak-stack/auth/access` middleware provides the same context.
|
|
191
|
+
Apps already using it can keep their Auth project definitions, including
|
|
192
|
+
the Auth-specific role and API key configuration.
|
|
193
|
+
|
|
194
|
+
The `@krak-stack/access` shadcn item installs the headless library only.
|
|
195
|
+
For the optional table, install `@krak-stack/access-table` (React) or
|
|
196
|
+
`@krak-stack/access-table-html` (Effect UI HTML). The matching package imports
|
|
197
|
+
are `@krak-stack/registry/access/table/react` and
|
|
198
|
+
`@krak-stack/registry/access/table/html`.
|
|
199
|
+
|
|
161
200
|
## Find components and documentation
|
|
162
201
|
|
|
163
202
|
- [KrakStack registry and docs](https://krakstack.net): browse items, dependencies, setup and usage.
|
|
@@ -66,7 +66,7 @@ export declare const AppSwitcher: import("effect/ui/Component").Component<"AppSw
|
|
|
66
66
|
readonly badge?: string | undefined;
|
|
67
67
|
}[];
|
|
68
68
|
}, boolean, {
|
|
69
|
-
readonly _tag: "Closed";
|
|
70
|
-
} | {
|
|
71
69
|
readonly _tag: "Opened";
|
|
70
|
+
} | {
|
|
71
|
+
readonly _tag: "Closed";
|
|
72
72
|
}, never, never, Html.Elements, {}, never>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Redacted } from "effect";
|
|
2
|
+
import { AssetLibraryActions, AssetList } from "../../services/assets/library.js";
|
|
3
|
+
import { Component } from "effect/ui";
|
|
4
|
+
import { Html } from "effect/ui/html";
|
|
5
|
+
export { AssetInputEvents, RunAssetUpload, AssetUploadResult, assetUploadLayer, } from "./index.js";
|
|
6
|
+
export type { AssetPublication, AssetUploadOptions } from "./index.js";
|
|
7
|
+
export type { AssetInputSharedProps as AssetInputProps, AssetInputItem, AssetKind, } from "./schema.js";
|
|
8
|
+
export { AssetInputItemSchema } from "./schema.js";
|
|
9
|
+
export declare const AssetInput: Component.Component<"AssetInputConnection", {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly access?: {
|
|
12
|
+
readonly scopeKey: string;
|
|
13
|
+
readonly permissions: readonly ("create" | "delete" | "list" | "read" | "update")[];
|
|
14
|
+
} | undefined;
|
|
15
|
+
readonly replaceId?: string | undefined;
|
|
16
|
+
readonly uploadTrigger?: "button" | undefined;
|
|
17
|
+
readonly assets?: readonly {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly mimeType: string;
|
|
21
|
+
readonly url?: string | undefined;
|
|
22
|
+
readonly updatedAt?: Date | undefined;
|
|
23
|
+
}[] | undefined;
|
|
24
|
+
readonly kind?: "caption" | "document" | "image" | "video" | undefined;
|
|
25
|
+
readonly value?: string | readonly string[] | undefined;
|
|
26
|
+
readonly multiple?: boolean | undefined;
|
|
27
|
+
readonly disabled?: boolean | undefined;
|
|
28
|
+
readonly locale?: string | undefined;
|
|
29
|
+
readonly messages?: {
|
|
30
|
+
readonly [x: string]: {
|
|
31
|
+
readonly placeholder?: string | undefined;
|
|
32
|
+
readonly multiplePlaceholder?: string | undefined;
|
|
33
|
+
readonly empty?: string | undefined;
|
|
34
|
+
readonly selected?: string | undefined;
|
|
35
|
+
readonly remove?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
} | undefined;
|
|
38
|
+
readonly uploader?: {
|
|
39
|
+
readonly accept?: string | undefined;
|
|
40
|
+
readonly processingLabel?: string | undefined;
|
|
41
|
+
readonly messages?: {
|
|
42
|
+
readonly [x: string]: {
|
|
43
|
+
readonly upload?: string | undefined;
|
|
44
|
+
readonly close?: string | undefined;
|
|
45
|
+
readonly cancel?: string | undefined;
|
|
46
|
+
readonly dialogTitle?: string | undefined;
|
|
47
|
+
readonly dialogDescription?: string | undefined;
|
|
48
|
+
readonly libraryDialogTitle?: string | undefined;
|
|
49
|
+
readonly libraryDialogDescription?: string | undefined;
|
|
50
|
+
readonly uploadError?: string | undefined;
|
|
51
|
+
readonly kindError?: string | undefined;
|
|
52
|
+
readonly publishError?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
} | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
}, null, {
|
|
57
|
+
readonly _tag: "Changed";
|
|
58
|
+
readonly ids: readonly string[];
|
|
59
|
+
} | {
|
|
60
|
+
readonly _tag: "Published";
|
|
61
|
+
readonly assetId: string;
|
|
62
|
+
readonly file: Redacted.Redacted<File>;
|
|
63
|
+
}, {
|
|
64
|
+
readonly _tag: "Changed";
|
|
65
|
+
readonly ids: readonly string[];
|
|
66
|
+
} | {
|
|
67
|
+
readonly _tag: "Published";
|
|
68
|
+
readonly assetId: string;
|
|
69
|
+
readonly file: Redacted.Redacted<File>;
|
|
70
|
+
}, AssetLibraryActions | AssetList | import("./index.js").RunAssetUpload, Html.Elements, {}, "uploadAction">;
|