@pptx-editor.dev/react 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 +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +530 -507
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ export function App({ bytes }: { bytes: Uint8Array }) {
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
To build your own chrome, use `usePptxEditor()`, `useEditorState(selector)`, and `useEditorCommand(slotId)`. As in DOCX Editor, `useEditorCommand(slotId).execute()` returns `true` when the engine ran the command and `false` on a refusal. `disabledReason` is
|
|
38
|
+
To build your own chrome, use `usePptxEditor()`, `useEditorState(selector)`, and `useEditorCommand(slotId)`. As in DOCX Editor, `useEditorCommand(slotId).execute()` returns `true` when the engine ran the command and `false` on a refusal. `disabledReason` is readable text in the locale of `PptxEditor.Root`: the hook translates catalog keys and keeps the engine's own text.
|
|
39
39
|
|
|
40
40
|
## Slides and layouts
|
|
41
41
|
|
|
@@ -77,7 +77,7 @@ Each slot takes the customization ladder: `className`, `icon`, `asChild`, `hidde
|
|
|
77
77
|
| `onChange` | `(layoutId: string) => void` | required | Called with the picked layout's id |
|
|
78
78
|
| `layouts` | `readonly SlideLayoutSummary[]` | every layout of the deck | The layouts to show |
|
|
79
79
|
| `disabled` | `boolean` | `true` in viewing mode | Shows the tiles but takes no pick |
|
|
80
|
-
| `disabledReason` | `string \| null` | the viewing reason | Why the gallery takes no pick, in the tiles' tooltips: a catalog key, such as `useEditorCommand(slotId).disabledReason
|
|
80
|
+
| `disabledReason` | `string \| null` | the viewing reason | Why the gallery takes no pick, in the tiles' tooltips: a catalog key or text, such as `useEditorCommand(slotId).disabledReason` |
|
|
81
81
|
| `className` | `string` | none | A class name added to the gallery |
|
|
82
82
|
|
|
83
83
|
```tsx
|
package/dist/index.d.ts
CHANGED
|
@@ -1599,8 +1599,8 @@ interface UseEditorCommandReturn {
|
|
|
1599
1599
|
/** Whether a toggle control shows as pressed. */
|
|
1600
1600
|
readonly isActive: boolean;
|
|
1601
1601
|
/**
|
|
1602
|
-
* Why the command cannot run
|
|
1603
|
-
*
|
|
1602
|
+
* Why the command cannot run, as readable text in the locale of `PptxEditor.Root`. A
|
|
1603
|
+
* catalog key is translated; the engine's own text shows as itself.
|
|
1604
1604
|
*/
|
|
1605
1605
|
readonly disabledReason: string | null;
|
|
1606
1606
|
/** The value a value control shows (a font size, a family), when it has one. */
|
|
@@ -1636,7 +1636,7 @@ interface UseEditorValueCommandReturn<V, S = V> {
|
|
|
1636
1636
|
readonly options: readonly V[];
|
|
1637
1637
|
/** Whether the command can run now. */
|
|
1638
1638
|
readonly isEnabled: boolean;
|
|
1639
|
-
/** Why the command cannot run
|
|
1639
|
+
/** Why the command cannot run, as readable text in the locale of `PptxEditor.Root`. */
|
|
1640
1640
|
readonly disabledReason: string | null;
|
|
1641
1641
|
}
|
|
1642
1642
|
/**
|
|
@@ -2798,8 +2798,8 @@ interface LayoutGalleryProps {
|
|
|
2798
2798
|
/** Show the tiles but take no pick. Default: true while the deck is open for viewing. */
|
|
2799
2799
|
readonly disabled?: boolean;
|
|
2800
2800
|
/**
|
|
2801
|
-
* Why the gallery takes no pick, for the tiles' tooltips: a catalog key
|
|
2802
|
-
* `useEditorCommand(slotId).disabledReason`)
|
|
2801
|
+
* Why the gallery takes no pick, for the tiles' tooltips: a catalog key or text
|
|
2802
|
+
* (such as `useEditorCommand(slotId).disabledReason`). Default: the viewing reason.
|
|
2803
2803
|
*/
|
|
2804
2804
|
readonly disabledReason?: string | null;
|
|
2805
2805
|
}
|