@kahitsan/ksui 0.10.2 → 0.11.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/README.md CHANGED
@@ -31,12 +31,12 @@ There are two ways to use KSUI.
31
31
  plugins, these are the shared components you reuse instead of writing your
32
32
  own copy.
33
33
 
34
- One honest note so nothing surprises you. Some components are self-contained and
35
- work right away. Others, like the client, voucher, and payment account pickers,
36
- expect a backend that answers certain requests, so they fit best inside an app
37
- built the KahitSan way. A few components also expect a small set of shared UI
38
- pieces from your app, like a button and a dialog. The setup note below explains
39
- that part, and each component page says what it needs.
34
+ One honest note so nothing surprises you. Every component is self-contained: the
35
+ library depends only on `solid-js` and `lucide-solid` and injects its own CSS, so
36
+ there is no host UI kit and no Tailwind to wire up. A handful of components (the
37
+ voucher and payment account pickers, the attachment tiles) call a backend that
38
+ answers certain requests, so they shine inside an app built the KahitSan way, but
39
+ they degrade gracefully without one. Each component page says what it needs.
40
40
 
41
41
  ## What is inside
42
42
 
@@ -97,24 +97,22 @@ import { AccountAvatar } from "@kahitsan/ksui";
97
97
 
98
98
  ## The honest setup note
99
99
 
100
- Two things this library expects from the app around it:
100
+ One thing this library expects from the app around it:
101
101
 
102
- 1. **`solid-js` stays external.** This library ships as source, and your own
103
- `vite-plugin-solid` compiles it. Keep `solid-js` as a single shared copy in
104
- your app (not bundled twice), so there is only one Solid instance running.
102
+ - **`solid-js` stays external.** This library ships as source, and your own
103
+ `vite-plugin-solid` compiles it. Keep `solid-js` as a single shared copy in
104
+ your app (not bundled twice), so there is only one Solid instance running.
105
105
 
106
- 2. **A host UI kit under the name `@kserp/host-ui`.** Some components import
107
- shared pieces from your app, like a `Button`, a `confirm` dialog, and a few
108
- hooks. Your app provides these under the import name `@kserp/host-ui`, and that
109
- name is kept external at build time too. Components that need it are:
110
- MarkdownNotes, ClientPicker, CameraCapture, ExistingAttachmentTile, and the
111
- `useAccountsIndex` hook. The rest do not need it.
106
+ That is the whole setup. There is no host UI kit, no Tailwind, and no app-provided
107
+ primitives to wire up every component injects its own CSS and depends only on
108
+ `solid-js` + `lucide-solid`. A few components can do *more* when the surrounding
109
+ app feeds them context (a permission check, the active workspace id) through the
110
+ optional `configurePermissions` / `configureActiveWorkspace` helpers, but they
111
+ degrade gracefully when those are not configured.
112
112
 
113
- So a few components work right away with no backend and no host kit
114
- (MentionTextarea as a plain notes box, AccountAvatar, AddAttachmentTile,
115
- VoucherPicker, and all the helper functions). Others assume the ERP host and a
116
- backend that answers calls like `/api/clients`. The docs site walks through how
117
- to mock the host kit and stub those calls so you can see every component render.
113
+ Some components (the voucher and payment account pickers, the attachment tiles)
114
+ call a backend at paths like `/api/financial-accounts`. The docs site stubs those
115
+ calls so you can see every component render with no server.
118
116
 
119
117
  ## Docs
120
118
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kahitsan/ksui",
3
- "version": "0.10.2",
4
- "description": "ksui is a set of shared SolidJS UI components plus the @kserp/host-ui type contract for KahitSan/Hilinga plugins. Published to the public npm registry and consumed as a normal dependency. Ships source under a `solid` export condition so the consumer's vite-plugin-solid compiles it with solid-js + @kserp/host-ui externalized to the host runtime.",
3
+ "version": "0.11.0",
4
+ "description": "ksui is a standalone set of SolidJS UI components for KahitSan/Hilinga and any SolidJS app. Published to the public npm registry and consumed as a normal dependency. Ships source under a `solid` export condition so the consumer's vite-plugin-solid compiles it with only solid-js externalized; it depends on nothing but solid-js + lucide-solid and injects its own CSS.",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
7
  "types": "./src/index.ts",
@@ -12,9 +12,6 @@
12
12
  "development": "./src/index.ts",
13
13
  "import": "./src/index.ts"
14
14
  },
15
- "./host-ui": {
16
- "types": "./host-ui.d.ts"
17
- },
18
15
  "./components/*": {
19
16
  "solid": "./src/components/*.tsx",
20
17
  "types": "./src/components/*.tsx",
@@ -23,8 +20,7 @@
23
20
  }
24
21
  },
25
22
  "files": [
26
- "src",
27
- "host-ui.d.ts"
23
+ "src"
28
24
  ],
29
25
  "scripts": {
30
26
  "typecheck": "tsc --noEmit",
@@ -1,8 +1,8 @@
1
1
  // Source: KahitSan/kserp src/components/CameraCapture.tsx (vendored into the plugin remote).
2
- // getUserMedia camera capture modal. Button comes from the host UI kit.
2
+ // getUserMedia camera capture modal. Button is ksui's own base primitive.
3
3
 
4
4
  import { createSignal, onCleanup, onMount, Show } from "solid-js";
5
- import { Button } from "@kserp/host-ui";
5
+ import Button from "./Button";
6
6
  import Camera from "lucide-solid/icons/camera";
7
7
  import X from "lucide-solid/icons/x";
8
8