chore(js): lazy load lightbox and tiptap
This commit is contained in:
parent
f2b3ffed5a
commit
43c3d706ac
2 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { Controller } from '@hotwired/stimulus';
|
import { ApplicationController } from '../application_controller';
|
||||||
import lightGallery from 'lightgallery';
|
import lightGallery from 'lightgallery';
|
||||||
import { LightGallery } from 'lightgallery/lightgallery';
|
import { LightGallery } from 'lightgallery/lightgallery';
|
||||||
import lgThumbnail from 'lightgallery/plugins/thumbnail';
|
import lgThumbnail from 'lightgallery/plugins/thumbnail';
|
||||||
|
@ -7,7 +7,7 @@ import lgRotate from 'lightgallery/plugins/rotate';
|
||||||
import lgHash from 'lightgallery/plugins/hash';
|
import lgHash from 'lightgallery/plugins/hash';
|
||||||
import 'lightgallery/css/lightgallery-bundle.css';
|
import 'lightgallery/css/lightgallery-bundle.css';
|
||||||
|
|
||||||
export default class extends Controller {
|
export default class extends ApplicationController {
|
||||||
lightGallery?: LightGallery;
|
lightGallery?: LightGallery;
|
||||||
|
|
||||||
connect(): void {
|
connect(): void {
|
|
@ -2,10 +2,10 @@ import { Editor, type JSONContent } from '@tiptap/core';
|
||||||
import { isButtonElement, isHTMLElement } from '@coldwired/utils';
|
import { isButtonElement, isHTMLElement } from '@coldwired/utils';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { ApplicationController } from './application_controller';
|
import { ApplicationController } from '../application_controller';
|
||||||
import { getAction } from '../shared/tiptap/actions';
|
import { getAction } from '../../shared/tiptap/actions';
|
||||||
import { tagSchema, type TagSchema } from '../shared/tiptap/tags';
|
import { tagSchema, type TagSchema } from '../../shared/tiptap/tags';
|
||||||
import { createEditor } from '../shared/tiptap/editor';
|
import { createEditor } from '../../shared/tiptap/editor';
|
||||||
|
|
||||||
export class TiptapController extends ApplicationController {
|
export class TiptapController extends ApplicationController {
|
||||||
static targets = ['editor', 'input', 'button', 'tag'];
|
static targets = ['editor', 'input', 'button', 'tag'];
|
Loading…
Reference in a new issue