@pptx-editor.dev/vue 0.6.0 → 0.7.0-canary.20261120032841.sha-d450255

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
@@ -106,7 +106,7 @@ createApp({
106
106
  | --- | --- |
107
107
  | `usePptxEditor()` | `UsePptxEditorReturn`: the editor, or null before it mounts |
108
108
  | `useEditorState(selector, isEqual?)` | `UseEditorStateReturn<T>`: the selected slice, updated only when it changes |
109
- | `useEditorCommand(slotId)` | `UseEditorCommandReturn`: `execute` (it returns `true` when the engine ran the command, `false` on a refusal), and `isEnabled`, `isActive`, `disabledReason`, `value` as computed refs. `disabledReason` is a catalog key or the engine's own text: show it with `translateKeyOrText(t, reason)` from `@pptx-editor.dev/core/editor`. `slotId` may be a ref or a getter |
109
+ | `useEditorCommand(slotId)` | `UseEditorCommandReturn`: `execute` (it returns `true` when the engine ran the command, `false` on a refusal), and `isEnabled`, `isActive`, `disabledReason`, `value` as computed refs. `disabledReason` is readable text in the locale of `PptxEditorRoot`: the composable translates catalog keys and keeps the engine's own text. `slotId` may be a ref or a getter |
110
110
  | `useTranslation()` | `UseTranslationReturn`: `t`, with shortcut text for the platform |
111
111
  | `useFontFormat()` | `UseFontFormatReturn`: `format` (the `FontFormatRead` of the selected text or of the selected shapes' runs, with `disagrees`), `isEnabled`, and `apply(update)`, which sends one `setFontFormat` and returns whether the engine accepted it |
112
112
  | `useBulletFormat()` | `UseBulletFormatReturn`: `format` (the `BulletFormatRead` of the selected paragraphs: `null` when they have no list, `undefined` when they differ or no text is selected), `isEnabled`, and `apply(format)`, which sends one `setBulletFormat` and returns whether the engine accepted it |
package/dist/index.d.ts CHANGED
@@ -5316,7 +5316,10 @@ interface UseEditorCommandReturn {
5316
5316
  readonly isEnabled: ComputedRef<boolean>;
5317
5317
  /** Whether a toggle control shows as pressed. */
5318
5318
  readonly isActive: ComputedRef<boolean>;
5319
- /** A translation key, or the engine's own text, when the control is disabled. */
5319
+ /**
5320
+ * Why the command cannot run, as readable text in the locale of `PptxEditorRoot`. A catalog
5321
+ * key is translated; the engine's own text shows as itself.
5322
+ */
5320
5323
  readonly disabledReason: ComputedRef<string | null>;
5321
5324
  /** The value a value control shows (a font size, a family), when it has one. */
5322
5325
  readonly value: ComputedRef<string | number | undefined>;
@@ -5392,7 +5395,7 @@ interface UseEditorValueCommandReturn<V, S = V> {
5392
5395
  readonly options: ComputedRef<readonly V[]>;
5393
5396
  /** Whether the command can run now. */
5394
5397
  readonly isEnabled: ComputedRef<boolean>;
5395
- /** Why the command cannot run: a catalog key, or the engine's own text. */
5398
+ /** Why the command cannot run, as readable text in the locale of `PptxEditorRoot`. */
5396
5399
  readonly disabledReason: ComputedRef<string | null>;
5397
5400
  }
5398
5401
  /**
@@ -9257,8 +9260,8 @@ declare const layoutGalleryProps: {
9257
9260
  readonly default: undefined;
9258
9261
  };
9259
9262
  /**
9260
- * Why the gallery takes no pick, for the tiles' tooltips: a catalog key (such as
9261
- * `useEditorCommand(slotId).disabledReason`) or text. Default: the viewing reason.
9263
+ * Why the gallery takes no pick, for the tiles' tooltips: a catalog key or text
9264
+ * (such as `useEditorCommand(slotId).disabledReason`). Default: the viewing reason.
9262
9265
  */
9263
9266
  readonly disabledReason: {
9264
9267
  readonly type: PropType<string | null>;
@@ -9297,8 +9300,8 @@ declare const LayoutGallery: vue.DefineComponent<vue.ExtractPropTypes<{
9297
9300
  readonly default: undefined;
9298
9301
  };
9299
9302
  /**
9300
- * Why the gallery takes no pick, for the tiles' tooltips: a catalog key (such as
9301
- * `useEditorCommand(slotId).disabledReason`) or text. Default: the viewing reason.
9303
+ * Why the gallery takes no pick, for the tiles' tooltips: a catalog key or text
9304
+ * (such as `useEditorCommand(slotId).disabledReason`). Default: the viewing reason.
9302
9305
  */
9303
9306
  readonly disabledReason: {
9304
9307
  readonly type: PropType<string | null>;
@@ -9328,8 +9331,8 @@ declare const LayoutGallery: vue.DefineComponent<vue.ExtractPropTypes<{
9328
9331
  readonly default: undefined;
9329
9332
  };
9330
9333
  /**
9331
- * Why the gallery takes no pick, for the tiles' tooltips: a catalog key (such as
9332
- * `useEditorCommand(slotId).disabledReason`) or text. Default: the viewing reason.
9334
+ * Why the gallery takes no pick, for the tiles' tooltips: a catalog key or text
9335
+ * (such as `useEditorCommand(slotId).disabledReason`). Default: the viewing reason.
9333
9336
  */
9334
9337
  readonly disabledReason: {
9335
9338
  readonly type: PropType<string | null>;