@checkstack/common 0.3.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @checkstack/common
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 83557c7: ## EditorType Definition
8
+
9
+ - Added `EditorType` enum for multi-type editor support (json, yaml, xml, markdown, formdata, raw)
10
+
3
11
  ## 0.3.0
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/common",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/types.ts CHANGED
@@ -4,6 +4,31 @@
4
4
 
5
5
  import type { AccessRule } from "./access-utils";
6
6
 
7
+ // =============================================================================
8
+ // EDITOR TYPES - Used for multi-type editor fields
9
+ // =============================================================================
10
+
11
+ /**
12
+ * Available editor types for multi-type editor fields.
13
+ * Used with x-editor-types to define which editor modes are available in DynamicForm.
14
+ *
15
+ * - "none": Field is disabled/empty
16
+ * - "raw": Multi-line textarea (plain text)
17
+ * - "json": CodeEditor with JSON syntax highlighting
18
+ * - "yaml": CodeEditor with YAML syntax highlighting
19
+ * - "xml": CodeEditor with XML syntax highlighting
20
+ * - "markdown": CodeEditor with Markdown syntax highlighting
21
+ * - "formdata": Key/value pair editor (URL-encoded)
22
+ */
23
+ export type EditorType =
24
+ | "none"
25
+ | "raw"
26
+ | "json"
27
+ | "yaml"
28
+ | "xml"
29
+ | "markdown"
30
+ | "formdata";
31
+
7
32
  /**
8
33
  * Qualifies a resource type with the plugin namespace.
9
34
  * @param pluginId - The plugin identifier
@@ -12,7 +37,7 @@ import type { AccessRule } from "./access-utils";
12
37
  */
13
38
  export function qualifyResourceType(
14
39
  pluginId: string,
15
- resourceType: string
40
+ resourceType: string,
16
41
  ): string {
17
42
  // If already qualified (contains a dot), return as-is
18
43
  if (resourceType.includes(".")) return resourceType;