| 1 |
import { __ } from "@wordpress/i18n"; |
| 2 |
import { registerBlockType } from "@wordpress/blocks"; |
| 3 |
|
| 4 |
// Lower-case, matching the file on disk: macOS resolves "./Edit" anyway, a |
| 5 |
// case-sensitive filesystem does not. |
| 6 |
import Edit from "./edit"; |
| 7 |
import attributes from "./attributes"; |
| 8 |
import icon from "./icon"; |
| 9 |
|
| 10 |
|
| 11 |
registerBlockType("betterdocs/reading-time", { |
| 12 |
title: __("Reading Time, Listen and AI Action", "betterdocs"), |
| 13 |
description: __( |
| 14 |
'The single-doc meta row: estimated reading time, a Listen button that reads the doc aloud, and a "Copy page" button that hands it to an AI assistant. Each part has its own switch.', |
| 15 |
"betterdocs", |
| 16 |
), |
| 17 |
category: "betterdocs", |
| 18 |
attributes, |
| 19 |
icon, |
| 20 |
keywords: [ |
| 21 |
__("better docs", "betterdocs"), |
| 22 |
__("reading time", "betterdocs"), |
| 23 |
__("time", "betterdocs"), |
| 24 |
__("ai", "betterdocs"), |
| 25 |
__("markdown", "betterdocs"), |
| 26 |
__("copy page", "betterdocs"), |
| 27 |
__("listen", "betterdocs"), |
| 28 |
__("audio", "betterdocs"), |
| 29 |
__("text to speech", "betterdocs"), |
| 30 |
__("accessibility", "betterdocs"), |
| 31 |
], |
| 32 |
edit: Edit, |
| 33 |
save: () => null, |
| 34 |
example: { |
| 35 |
viewportWidth: 1200, |
| 36 |
}, |
| 37 |
}); |
| 38 |
|