@stonecrop/desktop 0.10.1 → 0.10.3
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 +184 -7
- package/dist/desktop.d.ts +49 -0
- package/dist/desktop.js +1615 -1622
- package/dist/desktop.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +45 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +15 -6
- package/src/components/Desktop.vue +157 -251
- package/src/index.ts +1 -0
- package/src/types/index.ts +49 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ import Desktop from './components/Desktop.vue';
|
|
|
4
4
|
import SheetNav from './components/SheetNav.vue';
|
|
5
5
|
import StonecropDesktop from './plugins';
|
|
6
6
|
export type * from './types';
|
|
7
|
+
export type { RouteAdapter, NavigationTarget, ActionEventPayload, RecordOpenEventPayload } from './types';
|
|
7
8
|
export { ActionSet, CommandPalette, Desktop, SheetNav, StonecropDesktop };
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,gBAAgB,MAAM,WAAW,CAAA;AACxC,mBAAmB,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,QAAQ,MAAM,2BAA2B,CAAA;AAChD,OAAO,gBAAgB,MAAM,WAAW,CAAA;AACxC,mBAAmB,SAAS,CAAA;AAC5B,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAEzG,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -35,4 +35,49 @@ export type DropdownElement = BaseElement & {
|
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
37
|
export type ActionElements = ButtonElement | DropdownElement;
|
|
38
|
+
/**
|
|
39
|
+
* Navigation target passed to RouteAdapter.navigate and emitted with the 'navigate' event
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export type NavigationTarget = {
|
|
43
|
+
view: 'doctypes' | 'records' | 'record';
|
|
44
|
+
doctype?: string;
|
|
45
|
+
recordId?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Adapter that lets host applications (Nuxt, etc.) supply their own routing layer.
|
|
49
|
+
* When provided as a prop, Desktop uses these functions instead of reaching into
|
|
50
|
+
* the Vue Router instance baked into the Stonecrop registry.
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export type RouteAdapter = {
|
|
54
|
+
/** Returns the active doctype key (e.g. 'plan', 'recipe'). Called inside computed — should read reactive state. */
|
|
55
|
+
getCurrentDoctype: () => string;
|
|
56
|
+
/** Returns the active record ID, or '' when viewing a list. Called inside computed. */
|
|
57
|
+
getCurrentRecordId: () => string;
|
|
58
|
+
/** Returns which of the three views is currently active. Called inside computed. */
|
|
59
|
+
getCurrentView: () => 'doctypes' | 'records' | 'record';
|
|
60
|
+
/** Perform the navigation. Called after the host app has handled any side effects. */
|
|
61
|
+
navigate: (target: NavigationTarget) => void | Promise<void>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Payload emitted with the 'action' event when the user triggers an FSM transition
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export type ActionEventPayload = {
|
|
68
|
+
/** The FSM transition name (e.g. 'SAVE', 'SUBMIT', 'APPROVE') */
|
|
69
|
+
name: string;
|
|
70
|
+
doctype: string;
|
|
71
|
+
recordId: string;
|
|
72
|
+
/** Snapshot of the form data at the time the action was triggered */
|
|
73
|
+
data: Record<string, any>;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Payload emitted with the 'record:open' event
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export type RecordOpenEventPayload = {
|
|
80
|
+
doctype: string;
|
|
81
|
+
recordId: string;
|
|
82
|
+
};
|
|
38
83
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GACtC,aAAa,GAAG;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC3C,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,aAAa,EAAE,CAAA;CACxB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","source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IAChC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACzB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/desktop",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"**/*.css"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@stonecrop/
|
|
36
|
-
"@stonecrop/themes": "0.10.
|
|
37
|
-
"@stonecrop/
|
|
38
|
-
"@stonecrop/stonecrop": "0.10.
|
|
35
|
+
"@stonecrop/atable": "0.10.3",
|
|
36
|
+
"@stonecrop/themes": "0.10.3",
|
|
37
|
+
"@stonecrop/aform": "0.10.3",
|
|
38
|
+
"@stonecrop/stonecrop": "0.10.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"vue": "^3.5.28"
|
|
@@ -46,15 +46,21 @@
|
|
|
46
46
|
"@miragejs/graphql": "^0.1.13",
|
|
47
47
|
"@rushstack/heft": "^1.2.0",
|
|
48
48
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
49
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
50
|
+
"@vue/test-utils": "^2.4.6",
|
|
49
51
|
"eslint": "^9.39.2",
|
|
50
52
|
"eslint-config-prettier": "^10.1.8",
|
|
51
53
|
"eslint-plugin-vue": "^10.6.2",
|
|
52
54
|
"globals": "^17.0.0",
|
|
55
|
+
"immutable": "^5.1.4",
|
|
56
|
+
"jsdom": "^28.1.0",
|
|
53
57
|
"miragejs": "^0.1.48",
|
|
58
|
+
"pinia": "^3.0.4",
|
|
54
59
|
"typescript": "^5.9.3",
|
|
55
60
|
"typescript-eslint": "^8.53.0",
|
|
56
61
|
"vue": "^3.5.28",
|
|
57
62
|
"vite": "^7.3.1",
|
|
63
|
+
"vitest": "^4.0.18",
|
|
58
64
|
"vue-router": "^5.0.2",
|
|
59
65
|
"stonecrop-rig": "0.7.0"
|
|
60
66
|
},
|
|
@@ -69,6 +75,9 @@
|
|
|
69
75
|
"_phase:build": "heft build && vite build && rushx docs",
|
|
70
76
|
"build": "heft build && vite build && rushx docs",
|
|
71
77
|
"docs": "bash ../common/scripts/run-docs.sh desktop",
|
|
72
|
-
"lint": "eslint ."
|
|
78
|
+
"lint": "eslint .",
|
|
79
|
+
"test": "vitest run --coverage.enabled false",
|
|
80
|
+
"test:watch": "vitest watch",
|
|
81
|
+
"test:coverage": "vitest run --coverage"
|
|
73
82
|
}
|
|
74
83
|
}
|