Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/search-widget/src/search-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import resetStyles from '@unocss/reset/tailwind.css?inline';
import { type DebouncedFunction, debounce } from 'es-toolkit';
import { uniqBy } from 'es-toolkit/compat';
import { css, html, LitElement, unsafeCSS } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { property, state } from 'lit/decorators.js';
import { createRef, type Ref, ref } from 'lit/directives/ref.js';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { HISTORY_KEY, MAX_HISTORY_ITEMS } from './constants';
import baseStyles from './styles/base';

@customElement('search-form')
export class SearchForm extends LitElement {
@property({ type: String })
baseUrl = '';
Expand Down Expand Up @@ -341,6 +340,9 @@ export class SearchForm extends LitElement {
];
}

customElements.get('search-form') ||
customElements.define('search-form', SearchForm);

declare global {
interface HTMLElementTagNameMap {
'search-form': SearchForm;
Expand Down
6 changes: 4 additions & 2 deletions packages/search-widget/src/search-modal.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import resetStyles from '@unocss/reset/tailwind.css?inline';
import { css, html, LitElement, type PropertyValues, unsafeCSS } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { OverlayScrollbars } from 'overlayscrollbars';
import overlayscrollbarsStyles from 'overlayscrollbars/styles/overlayscrollbars.css?inline';
import './search-form';
import baseStyles from './styles/base';

@customElement('search-modal')
export class SearchModal extends LitElement {
@property({
type: Boolean,
Expand Down Expand Up @@ -179,6 +178,9 @@ export class SearchModal extends LitElement {
];
}

customElements.get('search-modal') ||
customElements.define('search-modal', SearchModal);

declare global {
interface HTMLElementTagNameMap {
'search-modal': SearchModal;
Expand Down