generated from Nodarx/template
Rename text editor provider and integration point
This commit is contained in:
@@ -38,13 +38,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
path: server/modules/documents_text_editor
|
path: server/modules/provider_editor_text
|
||||||
github-server-url: https://git.ktrix.dev
|
github-server-url: https://git.ktrix.dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: server/modules/documents_text_editor
|
working-directory: server/modules/provider_editor_text
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: server/modules/documents_text_editor
|
working-directory: server/modules/provider_editor_text
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
path: server/modules/documents_text_editor
|
path: server/modules/provider_editor_text
|
||||||
github-server-url: https://git.ktrix.dev
|
github-server-url: https://git.ktrix.dev
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: server/modules/documents_text_editor
|
working-directory: server/modules/provider_editor_text
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npm run test:unit
|
run: npm run test:unit
|
||||||
working-directory: server/modules/documents_text_editor
|
working-directory: server/modules/provider_editor_text
|
||||||
|
|||||||
+6
-6
@@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace KTXM\DocumentsTextEditor;
|
namespace KTXM\ProviderEditorText;
|
||||||
|
|
||||||
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
||||||
use KTXF\Module\Configuration\ModuleContextInterface;
|
use KTXF\Module\Configuration\ModuleContextInterface;
|
||||||
use KTXF\Module\ModuleInstanceAbstract;
|
use KTXF\Module\ModuleInstanceAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Documents Text Editor — provides inline editing for text, Markdown, and HTML files
|
* Text Editor Provider — provides inline editing for text, Markdown, and HTML files
|
||||||
* via the documents_file_editor integration point.
|
* via the documents_editor integration point.
|
||||||
*/
|
*/
|
||||||
class Module extends ModuleInstanceAbstract
|
class Module extends ModuleInstanceAbstract
|
||||||
{
|
{
|
||||||
@@ -18,12 +18,12 @@ class Module extends ModuleInstanceAbstract
|
|||||||
|
|
||||||
public function handle(): string
|
public function handle(): string
|
||||||
{
|
{
|
||||||
return 'documents_text_editor';
|
return 'provider_editor_text';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function label(): string
|
public function label(): string
|
||||||
{
|
{
|
||||||
return 'Documents Text Editor';
|
return 'Text Editor Provider';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function author(): string
|
public function author(): string
|
||||||
@@ -49,7 +49,7 @@ class Module extends ModuleInstanceAbstract
|
|||||||
public function configure(ModuleContextInterface $context): void
|
public function configure(ModuleContextInterface $context): void
|
||||||
{
|
{
|
||||||
if ($context instanceof BrowserModuleContextInterface) {
|
if ($context instanceof BrowserModuleContextInterface) {
|
||||||
$context->registerModule($this, 'DocumentsTextEditor', 'static/module.mjs');
|
$context->registerModule($this, 'ProviderEditorText', 'static/module.mjs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "documents_text_editor",
|
"name": "provider_editor_text",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "documents_text_editor",
|
"name": "provider_editor_text",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "documents_text_editor",
|
"name": "provider_editor_text",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ const integrations: ModuleIntegrations = {
|
|||||||
* Editor component contract:
|
* Editor component contract:
|
||||||
* props: { entity: EntityObject, mime: string, readFile: Function, writeFile: Function }
|
* props: { entity: EntityObject, mime: string, readFile: Function, writeFile: Function }
|
||||||
*/
|
*/
|
||||||
documents_file_editor: [
|
documents_editor: [
|
||||||
{
|
{
|
||||||
id: 'text_editor',
|
id: 'text_editor',
|
||||||
label: 'Text Editor',
|
label: 'Text Editor',
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
assetFileNames: (assetInfo) => {
|
assetFileNames: (assetInfo) => {
|
||||||
if (assetInfo.name?.endsWith('.css')) {
|
if (assetInfo.name?.endsWith('.css')) {
|
||||||
return 'documents-text-editor-[hash].css'
|
return 'provider-editor-text-[hash].css'
|
||||||
}
|
}
|
||||||
return '[name]-[hash][extname]'
|
return '[name]-[hash][extname]'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user