@hachej/boring-workspace 0.1.81 → 0.1.82
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/app-server.js +13 -5
- package/dist/server.d.ts +1 -1
- package/dist/server.js +13 -5
- package/dist/workspace.css +20 -0
- package/package.json +4 -4
package/dist/app-server.js
CHANGED
|
@@ -2903,15 +2903,23 @@ function resolvePaneStatusWorkspaceId(request) {
|
|
|
2903
2903
|
function paneRenderStatusRoutes(app, opts = {}, done) {
|
|
2904
2904
|
const store = opts.store ?? createPaneRenderStatusStore();
|
|
2905
2905
|
const validateReport = createBodyValidator(reportBodySchema);
|
|
2906
|
-
const getWorkspaceId = async (request) => {
|
|
2907
|
-
return await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
|
|
2906
|
+
const getWorkspaceId = async (request, presentedWorkspaceId) => {
|
|
2907
|
+
return await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
|
|
2908
|
+
};
|
|
2909
|
+
const admitMalformedScopedWorkspaceId = async (request) => {
|
|
2910
|
+
const scoped = request.requestScope !== void 0;
|
|
2911
|
+
const body = request.body;
|
|
2912
|
+
if (!scoped || !body || !Object.prototype.hasOwnProperty.call(body, "workspaceId")) return;
|
|
2913
|
+
if (body.workspaceId !== void 0 && typeof body.workspaceId !== "string") {
|
|
2914
|
+
await getWorkspaceId(request, body.workspaceId);
|
|
2915
|
+
}
|
|
2908
2916
|
};
|
|
2909
2917
|
app.put(
|
|
2910
2918
|
"/api/v1/ui/panels/status",
|
|
2911
|
-
{ preHandler: validateReport },
|
|
2919
|
+
{ preHandler: [admitMalformedScopedWorkspaceId, validateReport] },
|
|
2912
2920
|
async (request, reply) => {
|
|
2913
2921
|
const body = request.body;
|
|
2914
|
-
const workspaceId = await getWorkspaceId(request) ?? body.workspaceId;
|
|
2922
|
+
const workspaceId = await getWorkspaceId(request, body.workspaceId) ?? body.workspaceId;
|
|
2915
2923
|
const status = store.report({ ...body, workspaceId });
|
|
2916
2924
|
return reply.code(200).send({ ok: true, status });
|
|
2917
2925
|
}
|
|
@@ -2967,7 +2975,7 @@ function createBodyValidator2(schema) {
|
|
|
2967
2975
|
function uiRoutes(app, opts, done) {
|
|
2968
2976
|
const fallbackBridge = opts.bridge;
|
|
2969
2977
|
const paneStatusStore = opts.paneStatusStore ?? createPaneRenderStatusStore();
|
|
2970
|
-
const getPaneWorkspaceId = async (request) => await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
|
|
2978
|
+
const getPaneWorkspaceId = async (request, presentedWorkspaceId) => await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
|
|
2971
2979
|
const touchUi = async (request) => {
|
|
2972
2980
|
paneStatusStore.touchUi(await getPaneWorkspaceId(request));
|
|
2973
2981
|
};
|
package/dist/server.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ type PaneRenderStatusStore = ReturnType<typeof createPaneRenderStatusStore>;
|
|
|
68
68
|
interface UiRoutesOptions {
|
|
69
69
|
bridge?: UiBridge;
|
|
70
70
|
getBridge?: (request: FastifyRequest) => UiBridge | Promise<UiBridge>;
|
|
71
|
-
getWorkspaceId?: (request: FastifyRequest) => string | undefined | Promise<string | undefined>;
|
|
71
|
+
getWorkspaceId?: (request: FastifyRequest, presentedWorkspaceId?: unknown) => string | undefined | Promise<string | undefined>;
|
|
72
72
|
/**
|
|
73
73
|
* Server/plugin-owned state slots preserved across browser full-state PUTs.
|
|
74
74
|
* Browser UI snapshots are replace-style for normal workspace state, but
|
package/dist/server.js
CHANGED
|
@@ -166,15 +166,23 @@ function resolvePaneStatusWorkspaceId(request) {
|
|
|
166
166
|
function paneRenderStatusRoutes(app, opts = {}, done) {
|
|
167
167
|
const store = opts.store ?? createPaneRenderStatusStore();
|
|
168
168
|
const validateReport = createBodyValidator(reportBodySchema);
|
|
169
|
-
const getWorkspaceId = async (request) => {
|
|
170
|
-
return await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
|
|
169
|
+
const getWorkspaceId = async (request, presentedWorkspaceId) => {
|
|
170
|
+
return await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
|
|
171
|
+
};
|
|
172
|
+
const admitMalformedScopedWorkspaceId = async (request) => {
|
|
173
|
+
const scoped = request.requestScope !== void 0;
|
|
174
|
+
const body = request.body;
|
|
175
|
+
if (!scoped || !body || !Object.prototype.hasOwnProperty.call(body, "workspaceId")) return;
|
|
176
|
+
if (body.workspaceId !== void 0 && typeof body.workspaceId !== "string") {
|
|
177
|
+
await getWorkspaceId(request, body.workspaceId);
|
|
178
|
+
}
|
|
171
179
|
};
|
|
172
180
|
app.put(
|
|
173
181
|
"/api/v1/ui/panels/status",
|
|
174
|
-
{ preHandler: validateReport },
|
|
182
|
+
{ preHandler: [admitMalformedScopedWorkspaceId, validateReport] },
|
|
175
183
|
async (request, reply) => {
|
|
176
184
|
const body = request.body;
|
|
177
|
-
const workspaceId = await getWorkspaceId(request) ?? body.workspaceId;
|
|
185
|
+
const workspaceId = await getWorkspaceId(request, body.workspaceId) ?? body.workspaceId;
|
|
178
186
|
const status = store.report({ ...body, workspaceId });
|
|
179
187
|
return reply.code(200).send({ ok: true, status });
|
|
180
188
|
}
|
|
@@ -230,7 +238,7 @@ function createBodyValidator2(schema) {
|
|
|
230
238
|
function uiRoutes(app, opts, done) {
|
|
231
239
|
const fallbackBridge = opts.bridge;
|
|
232
240
|
const paneStatusStore = opts.paneStatusStore ?? createPaneRenderStatusStore();
|
|
233
|
-
const getPaneWorkspaceId = async (request) => await opts.getWorkspaceId?.(request) ?? resolvePaneStatusWorkspaceId(request);
|
|
241
|
+
const getPaneWorkspaceId = async (request, presentedWorkspaceId) => await opts.getWorkspaceId?.(request, presentedWorkspaceId) ?? resolvePaneStatusWorkspaceId(request);
|
|
234
242
|
const touchUi = async (request) => {
|
|
235
243
|
paneStatusStore.touchUi(await getPaneWorkspaceId(request));
|
|
236
244
|
};
|
package/dist/workspace.css
CHANGED
|
@@ -6028,6 +6028,7 @@
|
|
|
6028
6028
|
--tracking-widest: 0.1em;
|
|
6029
6029
|
--leading-snug: 1.375;
|
|
6030
6030
|
--radius-xs: 0.125rem;
|
|
6031
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
6031
6032
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
6032
6033
|
--animate-spin: spin 1s linear infinite;
|
|
6033
6034
|
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
@@ -6220,6 +6221,9 @@
|
|
|
6220
6221
|
.h-1 {
|
|
6221
6222
|
height: var(--spacing);
|
|
6222
6223
|
}
|
|
6224
|
+
.h-2 {
|
|
6225
|
+
height: calc(var(--spacing) * 2);
|
|
6226
|
+
}
|
|
6223
6227
|
.h-2\.5 {
|
|
6224
6228
|
height: calc(var(--spacing) * 2.5);
|
|
6225
6229
|
}
|
|
@@ -6710,6 +6714,9 @@
|
|
|
6710
6714
|
.bg-\[color\:var\(--boring-success-soft\,var\(--secondary\)\)\] {
|
|
6711
6715
|
background-color: var(--boring-success-soft,var(--secondary));
|
|
6712
6716
|
}
|
|
6717
|
+
.bg-\[color\:var\(--boring-warning\,var\(--accent-foreground\)\)\] {
|
|
6718
|
+
background-color: var(--boring-warning,var(--accent-foreground));
|
|
6719
|
+
}
|
|
6713
6720
|
.bg-\[color\:var\(--boring-warning-soft\,var\(--accent\)\)\] {
|
|
6714
6721
|
background-color: var(--boring-warning-soft,var(--accent));
|
|
6715
6722
|
}
|
|
@@ -7127,6 +7134,11 @@
|
|
|
7127
7134
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
7128
7135
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
7129
7136
|
}
|
|
7137
|
+
.transition-\[width\] {
|
|
7138
|
+
transition-property: width;
|
|
7139
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
7140
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
7141
|
+
}
|
|
7130
7142
|
.transition-all {
|
|
7131
7143
|
transition-property: all;
|
|
7132
7144
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -7163,10 +7175,18 @@
|
|
|
7163
7175
|
--tw-duration: 200ms;
|
|
7164
7176
|
transition-duration: 200ms;
|
|
7165
7177
|
}
|
|
7178
|
+
.duration-300 {
|
|
7179
|
+
--tw-duration: 300ms;
|
|
7180
|
+
transition-duration: 300ms;
|
|
7181
|
+
}
|
|
7166
7182
|
.ease-in-out {
|
|
7167
7183
|
--tw-ease: var(--ease-in-out);
|
|
7168
7184
|
transition-timing-function: var(--ease-in-out);
|
|
7169
7185
|
}
|
|
7186
|
+
.ease-out {
|
|
7187
|
+
--tw-ease: var(--ease-out);
|
|
7188
|
+
transition-timing-function: var(--ease-out);
|
|
7189
|
+
}
|
|
7170
7190
|
.outline-none {
|
|
7171
7191
|
--tw-outline-style: none;
|
|
7172
7192
|
outline-style: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-workspace",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.82",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Workspace UI, plugin, and bridge package for composing chat, files, catalogs, editors, and app-specific panes.",
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
"tailwind-merge": "^2.0.0",
|
|
140
140
|
"zod": "^3.23.0",
|
|
141
141
|
"zustand": "^5.0.14",
|
|
142
|
-
"@hachej/boring-agent": "0.1.
|
|
143
|
-
"@hachej/boring-ui-
|
|
144
|
-
"@hachej/boring-ui-
|
|
142
|
+
"@hachej/boring-agent": "0.1.82",
|
|
143
|
+
"@hachej/boring-ui-plugin-cli": "0.1.82",
|
|
144
|
+
"@hachej/boring-ui-kit": "0.1.82"
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
147
|
"@tailwindcss/postcss": "^4.3.1",
|