@dsh-stack/tweak-drag-drop 0.0.0-stage → 0.1.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
@@ -1,3 +1,5 @@
1
- # Temporary Holding Version
1
+ # tweak-drag-drop
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Image drag-drop settings surface: the tweaks-drag-drop section (enable + max image bytes) consumed by the client attachment seam.
4
+
5
+ An extension of the `tweaks` settings surface, split out of the bundled `tweaks` package.
package/lib/index.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * `tweak-drag-drop`: the image drag-drop settings surface — the
3
+ * `tweaks-drag-drop` section (enable + max image bytes) consumed by the
4
+ * client attachment seam. Split out of the bundled `tweaks` package.
5
+ * @module tweak-drag-drop
6
+ */
7
+ import type { Context } from "@deepseek-ai/cordis";
8
+ import z from "@deepseek-ai/schemastery";
9
+ /** Namespace of the drag-drop section — this plugin's own Loader entry id. */
10
+ export declare const NS_DRAG_DROP: import("@dsh-stack/plugin-kit").SettingsNamespace;
11
+ /** Drag-drop knobs. */
12
+ interface DragDropConfig {
13
+ /** Whether image drag-drop is enabled (wires the attachment seam). */
14
+ enabled: boolean;
15
+ /** Max image bytes accepted from drag-drop (mirrors the attachment seam). */
16
+ maxImageBytes: number;
17
+ }
18
+ export declare const name = "tweak-drag-drop";
19
+ export declare const inject: string[];
20
+ /** The drag-drop extension config: the drag-drop section itself. */
21
+ export type Config = DragDropConfig;
22
+ export declare const Config: z<Config>;
23
+ /**
24
+ * Declare this plugin's settings surface as its own page.
25
+ *
26
+ * The drag-drop form is the `DragDropSchema` this plugin already declares, and
27
+ * its namespace is this plugin's entry id, so there is nothing to install. The
28
+ * knobs carry their defaults in the schema, and the settings service validates a
29
+ * write against that schema alone, so no server-side wiring is needed.
30
+ *
31
+ * @param ctx - the calling plugin's context.
32
+ * @param config - the active profile's projected drag-drop fields.
33
+ */
34
+ export declare function apply(ctx: Context, config: Config): void;
35
+ export {};
package/lib/index.js ADDED
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `tweak-drag-drop`: the image drag-drop settings surface — the
3
+ * `tweaks-drag-drop` section (enable + max image bytes) consumed by the
4
+ * client attachment seam. Split out of the bundled `tweaks` package.
5
+ * @module tweak-drag-drop
6
+ */
7
+ import z from "@deepseek-ai/schemastery";
8
+ import { declareCustomSettingsPage, settingsNamespace } from "@dsh-stack/plugin-kit";
9
+ /** Namespace of the drag-drop section — this plugin's own Loader entry id. */
10
+ export const NS_DRAG_DROP = settingsNamespace("tweak-drag-drop");
11
+ const DragDropSchema = z.object({
12
+ enabled: z.boolean().default(true),
13
+ maxImageBytes: z
14
+ .natural()
15
+ .min(1)
16
+ .default(8 * 1024 * 1024),
17
+ });
18
+ export const name = "tweak-drag-drop";
19
+ export const inject = [];
20
+ export const Config = DragDropSchema;
21
+ /**
22
+ * Declare this plugin's settings surface as its own page.
23
+ *
24
+ * The drag-drop form is the `DragDropSchema` this plugin already declares, and
25
+ * its namespace is this plugin's entry id, so there is nothing to install. The
26
+ * knobs carry their defaults in the schema, and the settings service validates a
27
+ * write against that schema alone, so no server-side wiring is needed.
28
+ *
29
+ * @param ctx - the calling plugin's context.
30
+ * @param config - the active profile's projected drag-drop fields.
31
+ */
32
+ export function apply(ctx, config) {
33
+ declareCustomSettingsPage(ctx);
34
+ }
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "@dsh-stack/tweak-drag-drop",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Image drag-drop settings surface: the tweaks-drag-drop section (enable + max image bytes) consumed by the client attachment seam.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "lib/index.js",
8
+ "types": "lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "lib",
17
+ "README.md",
18
+ "package.json",
19
+ "stack.json"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "stack": {
25
+ "kind": "plugin",
26
+ "id": "stack.tweaks.drag-drop"
27
+ },
28
+ "scripts": {
29
+ "build": "tsc -p tsconfig.json",
30
+ "typecheck": "tsc -p tsconfig.json --noEmit",
31
+ "test": "node check-plugin.mjs"
32
+ },
33
+ "peerDependencies": {
34
+ "@deepseek-ai/cordis": "^4.0.1",
35
+ "@deepseek-ai/schemastery": "*",
36
+ "@deepseek-ai/dsh-settings": "0.2.0-rc.2"
37
+ },
38
+ "dependencies": {
39
+ "@dsh-stack/plugin-kit": "0.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "typescript": "^6.0.3",
43
+ "@deepseek-ai/cordis": "^4.0.1",
44
+ "@deepseek-ai/schemastery": "*",
45
+ "@deepseek-ai/dsh-settings": "0.2.0-rc.2"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/marius-patrik/dsh-stack.git",
50
+ "directory": "plugins/tweak-drag-drop"
51
+ }
52
+ }
package/stack.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "stack.tweaks.drag-drop",
3
+ "name": "@dsh-stack/tweak-drag-drop",
4
+ "version": "0.1.0",
5
+ "kind": "plugin",
6
+ "description": "Image drag-drop settings surface: the tweaks-drag-drop section (enable + max image bytes) consumed by the client attachment seam.",
7
+ "files": ["lib", "README.md", "package.json", "stack.json"],
8
+ "dependencies": ["stack.library.plugin-kit"],
9
+ "optionalDependencies": []
10
+ }