@notegen/plugin-api 0.1.1 → 0.1.2

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
@@ -160,6 +160,8 @@ Composable blocks:
160
160
  - `toolbar`: labeled actions with optional icon, iconOnly, variant and confirmation.
161
161
  - `item-list`: stable IDs, generation, click action, optional checkbox action,
162
162
  drag and keyboard reordering, context actions and a touch-accessible overflow.
163
+ Items may supply `metadata` (up to 1024 characters) for a separate information
164
+ line below the description, such as a workspace-relative file path.
163
165
  - `markdown`: formatted text with raw HTML, links and image loading disabled.
164
166
  - `badge`, `empty`, `loading`: standard theme-aware feedback.
165
167
  - Form fields additionally support `search`, ISO `date`, and searchable
package/dist/index.d.ts CHANGED
@@ -160,6 +160,8 @@ export interface ResolvedDay {
160
160
  localDateTime: string;
161
161
  }
162
162
  export interface NoteSnapshot {
163
+ /** Saved file modification time in Unix milliseconds, when supported by the host/filesystem. */
164
+ modifiedAt?: number;
163
165
  id: string;
164
166
  path: string;
165
167
  revision: number;
@@ -683,6 +685,7 @@ export interface PluginItemListBlock {
683
685
  id: string;
684
686
  label: string;
685
687
  description?: string;
688
+ metadata?: string;
686
689
  icon?: string;
687
690
  checked?: boolean;
688
691
  disabled?: boolean;
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ function parsePluginUiExtensionValue(value, parseChildren) {
168
168
  }
169
169
  case 'item-list': {
170
170
  keys(v, ['type', 'id', 'generation', 'label', 'emptyText', 'items', 'openCommand', 'toggleCommand', 'reorderCommand', 'reorderLabel', 'actions']);
171
- const items = array(v.items, 100).map(value => { const item = record(value); keys(item, ['id', 'label', 'description', 'icon', 'checked', 'disabled']); return { id: text(item.id, 1024), label: text(item.label), description: optionalText(item.description, 2000), icon: optionalText(item.icon, 80), checked: boolean(item.checked), disabled: boolean(item.disabled) }; });
171
+ const items = array(v.items, 100).map(value => { const item = record(value); keys(item, ['id', 'label', 'description', 'metadata', 'icon', 'checked', 'disabled']); return { id: text(item.id, 1024), label: text(item.label), description: optionalText(item.description, 2000), metadata: optionalText(item.metadata, 1024), icon: optionalText(item.icon, 80), checked: boolean(item.checked), disabled: boolean(item.disabled) }; });
172
172
  unique(items);
173
173
  const actions = v.actions === undefined ? undefined : array(v.actions, 20).map(action);
174
174
  if (actions)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notegen/plugin-api",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Public TypeScript contract for NoteGen plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",