@linxin666/dsh-client-ui-task-board-team 0.4.18 → 0.4.20
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.
|
@@ -111,6 +111,8 @@ export interface NumberConstraints {
|
|
|
111
111
|
integer?: boolean;
|
|
112
112
|
/** The accepted value must be at least this. */
|
|
113
113
|
min?: number;
|
|
114
|
+
/** The accepted value must be at most this. */
|
|
115
|
+
max?: number;
|
|
114
116
|
}
|
|
115
117
|
/** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints stays unwritten. */
|
|
116
118
|
export declare function numberField(field: string, constraints?: NumberConstraints): FieldSpec;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxin666/dsh-client-ui-task-board-team",
|
|
3
3
|
"description": "External provider extension for the dsh Web GUI task board that binds local dsh-agents members as team Agents and mirrors cloud team-hub issues onto the board; shipped as a dsh profile bundle with no DSH source changes.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.20",
|
|
5
5
|
"icon": "icon.svg",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dsh": {
|
|
27
27
|
"engines": {
|
|
28
|
-
"dsh": ">=0.2.2-rc.
|
|
28
|
+
"dsh": ">=0.2.2-rc.3"
|
|
29
29
|
},
|
|
30
30
|
"bundle": {
|
|
31
31
|
"patch": "./cordis.patch.yml"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh": ">=0.2.2-rc.
|
|
44
|
+
"@deepseek-ai/dsh": ">=0.2.2-rc.3",
|
|
45
45
|
"react": "^18.2.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
52
|
-
"@deepseek-ai/dsh-api-gateway": "^0.2.2-rc.
|
|
53
|
-
"@deepseek-ai/dsh-client-store": "^0.2.2-rc.
|
|
54
|
-
"@deepseek-ai/dsh-credentials": "^0.2.2-rc.
|
|
55
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.2-rc.
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.
|
|
59
|
-
"@deepseek-ai/dsh-llm": "^0.2.2-rc.
|
|
60
|
-
"@deepseek-ai/dsh-tools": "^0.2.2-rc.
|
|
52
|
+
"@deepseek-ai/dsh-api-gateway": "^0.2.2-rc.3",
|
|
53
|
+
"@deepseek-ai/dsh-client-store": "^0.2.2-rc.3",
|
|
54
|
+
"@deepseek-ai/dsh-credentials": "^0.2.2-rc.3",
|
|
55
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.2-rc.3",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.3",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.3",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.3",
|
|
59
|
+
"@deepseek-ai/dsh-llm": "^0.2.2-rc.3",
|
|
60
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-rc.3",
|
|
61
61
|
"@types/node": "^22.20.0",
|
|
62
62
|
"@types/react": "~18.3.1",
|
|
63
63
|
"@types/react-dom": "^18.3.7",
|
|
@@ -141,11 +141,13 @@ export interface NumberConstraints {
|
|
|
141
141
|
integer?: boolean
|
|
142
142
|
/** The accepted value must be at least this. */
|
|
143
143
|
min?: number
|
|
144
|
+
/** The accepted value must be at most this. */
|
|
145
|
+
max?: number
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
/** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints stays unwritten. */
|
|
147
149
|
export function numberField(field: string, constraints: NumberConstraints = {}): FieldSpec {
|
|
148
|
-
const { integer = false, min } = constraints
|
|
150
|
+
const { integer = false, min, max } = constraints
|
|
149
151
|
return {
|
|
150
152
|
field,
|
|
151
153
|
entry: 'type',
|
|
@@ -157,6 +159,7 @@ export function numberField(field: string, constraints: NumberConstraints = {}):
|
|
|
157
159
|
if (!Number.isFinite(parsed)) return undefined
|
|
158
160
|
if (integer && !Number.isInteger(parsed)) return undefined
|
|
159
161
|
if (min !== undefined && parsed < min) return undefined
|
|
162
|
+
if (max !== undefined && parsed > max) return undefined
|
|
160
163
|
return { kind: 'set', value: parsed }
|
|
161
164
|
},
|
|
162
165
|
}
|
|
@@ -439,7 +442,7 @@ export class CardForm<T> {
|
|
|
439
442
|
// against. Settling is the only signal the form has; the rest of the
|
|
440
443
|
// batch, when one exists, still carries the atomic verdict by read-back.
|
|
441
444
|
if (this.specOf(field).secret) return true
|
|
442
|
-
return this.userLayer()?.[field]
|
|
445
|
+
return jsonValuesEqual(this.userLayer()?.[field], value)
|
|
443
446
|
}
|
|
444
447
|
|
|
445
448
|
/**
|
|
@@ -508,3 +511,19 @@ export class CardForm<T> {
|
|
|
508
511
|
for (const listener of this.listeners) listener()
|
|
509
512
|
}
|
|
510
513
|
}
|
|
514
|
+
|
|
515
|
+
/** Structural equality for JSON settings values (primitives, arrays, plain objects). */
|
|
516
|
+
function jsonValuesEqual(left: unknown, right: unknown): boolean {
|
|
517
|
+
if (Object.is(left, right)) return true
|
|
518
|
+
if (typeof left !== 'object' || left === null || typeof right !== 'object' || right === null) return false
|
|
519
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
520
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false
|
|
521
|
+
return left.every((item, index) => jsonValuesEqual(item, right[index]))
|
|
522
|
+
}
|
|
523
|
+
const a = left as Record<string, unknown>
|
|
524
|
+
const b = right as Record<string, unknown>
|
|
525
|
+
const keysA = Object.keys(a).filter(key => a[key] !== undefined)
|
|
526
|
+
const keysB = Object.keys(b).filter(key => b[key] !== undefined)
|
|
527
|
+
if (keysA.length !== keysB.length) return false
|
|
528
|
+
return keysA.every(key => Object.hasOwn(b, key) && jsonValuesEqual(a[key], b[key]))
|
|
529
|
+
}
|