@panphora/bevel 0.1.0 → 0.2.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/README.md +8 -0
- package/bevel.css +2 -2
- package/bevel.js +12 -4
- package/dist/react/theme.css +2 -2
- package/icons/icons.d.ts +127 -0
- package/icons/icons.js +257 -627
- package/integrations/richclay.js +2 -2
- package/package.json +4 -3
package/integrations/richclay.js
CHANGED
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
}
|
|
42
42
|
if (id === "blockMenu") {
|
|
43
43
|
const option = item.def.options.find(option => option.isActive?.(record.editor));
|
|
44
|
-
const
|
|
44
|
+
const optionIcons = [icons.paragraph, icons.h1, icons.h2, icons.h3, icons.quote, icons.code];
|
|
45
|
+
const markup = (optionIcons[item.def.options.indexOf(option)] || icons.blockMenu) + menuCaret;
|
|
45
46
|
if (face.dataset.blockValue !== (option?.value || "P")) {
|
|
46
47
|
face.innerHTML = markup;
|
|
47
48
|
face.dataset.blockValue = option?.value || "P";
|
|
48
49
|
}
|
|
49
|
-
const optionIcons = [icons.paragraph, icons.h1, icons.h2, icons.h3, icons.quote, icons.code];
|
|
50
50
|
for (const [index, markup] of optionIcons.entries()) {
|
|
51
51
|
const button = item.menu?.querySelector(`[data-richclay-option-index="${index}"]`);
|
|
52
52
|
if (!button || button.hasAttribute("data-bevel-richclay-icon")) continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panphora/bevel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Beveled controls in an editorial page. One stylesheet, one script, no build.",
|
|
5
5
|
"license": "MIT-0",
|
|
6
6
|
"author": "David Miranda",
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
"correction:c1": "node tests/correction-c1.mjs",
|
|
459
459
|
"correction:c2": "node tests/correction-c2.mjs",
|
|
460
460
|
"correction:c2:overlays": "node tests/correction-c2-modal-drawer.mjs",
|
|
461
|
-
"test": "npm run test:build && npm run test:showcase && npm run check && npm run contrast && npm run roundtrip && npm run functional && npm run datastar && npm run correction:c1 && npm run datastar:native && npm run clay:snapshot && npm run datastar:pickers && npm run correction:c2:overlays && npm run correction:c2:pickers && npm run correction:c2:forms && npm run correction:c2:wizard && npm run datastar:lifecycle && npm run datastar:reload && npm run richclay:integration && npm run inline-edit:integration && npm run quickcrop:integration && npm run packaged:peers && npm run upload:integration && npm run correction:c3:navigation && npm run correction:app-shell && npm run file-tree && npm run correction:c3:code-diff && npm run correction:c3:feedback && npm run correction:c3:split && npm run correction:c3:navigation-controls && npm run correction:c3:display && npm run correction:c3:rich-toolbar && npm run correction:c3:grid && npm run correction:c3:kanban && npm run context:hypercms && npm run context:quickcrop && npm run datastar:active && npm run datastar:board && npm run datastar:upload && npm run datastar:grid && npm run datastar:state-reload && npm run acceptance:layout && npm run final-review:regressions",
|
|
461
|
+
"test": "node scripts/test-guard.mjs && npm run test:build && npm run test:showcase && npm run check && npm run contrast && npm run roundtrip && npm run functional && npm run datastar && npm run correction:c1 && npm run datastar:native && npm run clay:snapshot && npm run datastar:pickers && npm run correction:c2:overlays && npm run correction:c2:pickers && npm run correction:c2:forms && npm run correction:c2:wizard && npm run datastar:lifecycle && npm run datastar:reload && npm run richclay:integration && npm run inline-edit:integration && npm run quickcrop:integration && npm run packaged:peers && npm run upload:integration && npm run correction:c3:navigation && npm run correction:app-shell && npm run file-tree && npm run correction:c3:code-diff && npm run correction:c3:feedback && npm run correction:c3:split && npm run correction:c3:navigation-controls && npm run correction:c3:display && npm run correction:c3:rich-toolbar && npm run correction:c3:grid && npm run correction:c3:kanban && npm run context:hypercms && npm run context:quickcrop && npm run datastar:active && npm run datastar:board && npm run datastar:upload && npm run datastar:grid && npm run datastar:state-reload && npm run acceptance:layout && npm run final-review:regressions",
|
|
462
462
|
"dev": "node scripts/dev.mjs",
|
|
463
463
|
"datastar:native": "node tests/datastar-native.mjs",
|
|
464
464
|
"correction:c2:pickers": "node tests/correction-c2-pickers.mjs",
|
|
@@ -517,7 +517,8 @@
|
|
|
517
517
|
"file-tree:bench": "node tests/react/file-tree-bench.mjs",
|
|
518
518
|
"vendor:richclay": "node scripts/vendor-richclay-fixture.mjs ../richclay",
|
|
519
519
|
"vendor:quickcrop": "node scripts/vendor-quickcrop-fixture.mjs ../quickcrop",
|
|
520
|
-
"vendor:hypercms": "node scripts/vendor-hypercms-fixture.mjs ../hypercms ../clayjs"
|
|
520
|
+
"vendor:hypercms": "node scripts/vendor-hypercms-fixture.mjs ../hypercms ../clayjs",
|
|
521
|
+
"prepublishOnly": "testbox run"
|
|
521
522
|
},
|
|
522
523
|
"devDependencies": {
|
|
523
524
|
"@floating-ui/core": "1.8.0",
|