@svadmin/ai-elements 0.12.6 → 0.13.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 +3 -3
- package/dist/ai-workspace-contract.d.ts +2 -2
- package/package.json +2 -2
- package/vendor/streamdown/Elements/popover.svelte.js +1 -2
- package/vendor/streamdown/README.svadmin.md +1 -1
- package/vendor/streamdown/contracts/streamdown.js +0 -1
- package/vendor/streamdown/marked/marked-footnotes.js +0 -1
- package/vendor/streamdown/marked/marked-list.js +0 -1
- package/vendor/streamdown/marked/marked-mdx.js +0 -3
- package/vendor/streamdown/provenance.json +16 -1
- package/vendor/streamdown/utils/panzoom.svelte.js +0 -6
package/README.md
CHANGED
|
@@ -147,9 +147,9 @@ interaction or pixel parity. `JSXPreview` intentionally uses a restricted,
|
|
|
147
147
|
TypeBox-validated parser instead of executing arbitrary JSX. `Tool.getStatusBadge`
|
|
148
148
|
returns Svelte-renderable status metadata instead of a React element.
|
|
149
149
|
|
|
150
|
-
##
|
|
150
|
+
## AI workspace boundary
|
|
151
151
|
|
|
152
|
-
SVAdmin
|
|
152
|
+
SVAdmin keeps an enterprise admin interaction model for
|
|
153
153
|
workflows, while keeping a Svelte-native API and the existing
|
|
154
154
|
`ChatProvider`/`AgentProvider` boundaries. The stable core loop is:
|
|
155
155
|
|
|
@@ -161,7 +161,7 @@ workflows, while keeping a Svelte-native API and the existing
|
|
|
161
161
|
unavailable.
|
|
162
162
|
|
|
163
163
|
Long-running task progress is currently `experimental`. React component APIs,
|
|
164
|
-
direct model mutations, and visual 1:1 compatibility with
|
|
164
|
+
direct model mutations, and visual 1:1 compatibility with another product are not
|
|
165
165
|
part of the SVAdmin contract. The machine-readable boundary is exported as
|
|
166
166
|
`AI_WORKSPACE_CAPABILITIES`; its acceptance conditions must remain satisfied
|
|
167
167
|
when these surfaces evolve.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Interaction capabilities for the SVAdmin AI workspace.
|
|
3
3
|
*
|
|
4
|
-
* This is a product-boundary contract, not a claim of
|
|
4
|
+
* This is a product-boundary contract, not a claim of another runtime.
|
|
5
5
|
*/
|
|
6
6
|
export type AIWorkspaceCapabilityStage = 'stable' | 'experimental' | 'planned';
|
|
7
7
|
export interface AIWorkspaceCapability {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svadmin/ai-elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Composable Svelte 5 AI interaction components for SVAdmin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@svadmin/core": "^0.
|
|
59
|
+
"@svadmin/core": "^0.67.0",
|
|
60
60
|
"@tanstack/svelte-query": "^6.1.48",
|
|
61
61
|
"svelte": "^5.56.10"
|
|
62
62
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useClickOutside } from '../utils/useClickOutside.svelte.js';
|
|
2
1
|
import { autoPlacement, computePosition, autoUpdate, hide, offset, shift } from '@floating-ui/dom';
|
|
3
2
|
import { setContext } from 'svelte';
|
|
4
3
|
export class Popover {
|
|
@@ -19,7 +18,7 @@ export class Popover {
|
|
|
19
18
|
allowedPlacements: ['top', 'top-end', 'top-start', 'bottom', 'bottom-end', 'bottom-start']
|
|
20
19
|
})
|
|
21
20
|
];
|
|
22
|
-
const { x, y, strategy
|
|
21
|
+
const { x, y, strategy } = await computePosition(this.reference, node, {
|
|
23
22
|
strategy: 'fixed',
|
|
24
23
|
middleware
|
|
25
24
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Locked native-style Streamdown fork
|
|
2
2
|
|
|
3
|
-
This is the Apache-2.0 distribution of streamdown-svelte 3.0.6. LICENSE and any NOTICE are retained.
|
|
3
|
+
This is the Apache-2.0 distribution of streamdown-svelte 3.0.6. LICENSE and any NOTICE are retained. In theme.js, two class-composition calls use svadmin finite CSS metadata instead of a utility-language engine. Local quality patches remove unused imports, bindings, an overwritten list assignment and unreachable placeholder cleanup from marked/marked-mdx.js, marked/marked-footnotes.js, marked/marked-list.js, contracts/streamdown.js, Elements/popover.svelte.js and utils/panzoom.svelte.js. Parser behavior, streaming repair, URL policy, sanitizers, controls and public props are preserved. The provenance manifest retains each original file digest and pins the reviewed digest of every modified file.
|
|
4
4
|
|
|
5
5
|
This copy is deliberately owned: upstream fixes must be reviewed and updated explicitly; package-manager updates will not update it. Unknown host classes are preserved, not interpreted as arbitrary utilities. Rebuild svadmin CSS after editing its finite styles.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {} from './index.js';
|
|
2
|
-
import { StreamdownContext } from '../context.svelte.js';
|
|
3
2
|
import { getContext } from 'svelte';
|
|
4
3
|
import { STREAMDOWN_CONTEXT_KEY } from '../context-key.js';
|
|
5
4
|
const footnoteRegex = /^\[\^([^\]\n]+)\]:(?:[ \t]+|\n|$)([^\n]*(?:\n(?:[ \t]+[^\n]*)?)*)/;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Lexer } from 'marked';
|
|
2
|
-
const defaultLexer = new Lexer({ gfm: true });
|
|
3
|
-
const defaultTokenizer = defaultLexer.options.tokenizer;
|
|
4
1
|
/**
|
|
5
2
|
* Parse attributes from MDX component tag
|
|
6
3
|
* Supports: attribute="string", attribute={number}, attribute={boolean}, attribute={expression}
|
|
@@ -200,7 +200,13 @@
|
|
|
200
200
|
"utils/useKeyDown.svelte.js": "380a2278d34cf51e8ac348ab2a814fca8168ecccfac79270299b7da119438ddb"
|
|
201
201
|
},
|
|
202
202
|
"modifiedFiles": [
|
|
203
|
-
"theme.js"
|
|
203
|
+
"theme.js",
|
|
204
|
+
"Elements/popover.svelte.js",
|
|
205
|
+
"contracts/streamdown.js",
|
|
206
|
+
"marked/marked-footnotes.js",
|
|
207
|
+
"marked/marked-list.js",
|
|
208
|
+
"marked/marked-mdx.js",
|
|
209
|
+
"utils/panzoom.svelte.js"
|
|
204
210
|
],
|
|
205
211
|
"runtimeDependencies": {
|
|
206
212
|
"@floating-ui/dom": "^1.7.4",
|
|
@@ -225,5 +231,14 @@
|
|
|
225
231
|
"unist-util-visit": "^5.1.0",
|
|
226
232
|
"@streamdown-svelte/plugin-core": "1.0.0",
|
|
227
233
|
"@streamdown-svelte/remend": "1.3.0"
|
|
234
|
+
},
|
|
235
|
+
"modifiedFileHashes": {
|
|
236
|
+
"theme.js": "eeabfd97681eb38ca2ccea99725e77575687a1ffd6530f672bb3ec079a0f95fc",
|
|
237
|
+
"Elements/popover.svelte.js": "07b3c2168d55202be6c85d3f11654a87befa5ed929c6dbba4f5b6c58d51101c4",
|
|
238
|
+
"contracts/streamdown.js": "9aefd500de3cc74a4999cbce6d30c69c5a1f7c34f5a046495cff7b5f19b182e8",
|
|
239
|
+
"marked/marked-footnotes.js": "6698cf1d30d3df853cc2e743436e35895bc1eb43a122ed15b69e3cf34c7ed54b",
|
|
240
|
+
"marked/marked-list.js": "5d29eedc7c01cf5cd9e64320da8ad3a9dfc74b7d2f90a8b35a3a8cdf59891f3a",
|
|
241
|
+
"marked/marked-mdx.js": "179c2193ef814bc4e01c2d4d4351d9ad97d58a4087896dbf2e88e93f091a3e15",
|
|
242
|
+
"utils/panzoom.svelte.js": "6180e6090722882161a5f46f0e481570f89ec754fb35f26a4281ac1c8048444e"
|
|
228
243
|
}
|
|
229
244
|
}
|
|
@@ -22,7 +22,6 @@ export const usePanzoom = (opts = {}) => {
|
|
|
22
22
|
let lastClientY = 0;
|
|
23
23
|
let dragOffMove = null;
|
|
24
24
|
let dragOffUp = null;
|
|
25
|
-
let previousStyle = null;
|
|
26
25
|
// touch state
|
|
27
26
|
let touchMode = 'none';
|
|
28
27
|
let pinchDistance = 0;
|
|
@@ -30,7 +29,6 @@ export const usePanzoom = (opts = {}) => {
|
|
|
30
29
|
// expand/collapse state
|
|
31
30
|
let isExpanded = $state(false);
|
|
32
31
|
let animating = false;
|
|
33
|
-
let placeholderEl = null;
|
|
34
32
|
function onKeyDown(e) {
|
|
35
33
|
if (e.key === 'Escape' || e.keyCode === 27) {
|
|
36
34
|
if (isExpanded && !animating) {
|
|
@@ -42,10 +40,6 @@ export const usePanzoom = (opts = {}) => {
|
|
|
42
40
|
const destroy = () => {
|
|
43
41
|
listeners.forEach((off) => off());
|
|
44
42
|
listeners.clear();
|
|
45
|
-
if (placeholderEl) {
|
|
46
|
-
placeholderEl.remove();
|
|
47
|
-
placeholderEl = null;
|
|
48
|
-
}
|
|
49
43
|
if (createdWrapper) {
|
|
50
44
|
// Move node back out of wrapper before removing wrapper
|
|
51
45
|
if (node && createdWrapper.parentElement) {
|