@viveeditor/element 0.1.0 → 1.0.0-rc.1
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/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -132,8 +132,15 @@ function defineViveEditor(tag = "vive-editor") {
|
|
|
132
132
|
if (existing) return existing;
|
|
133
133
|
const element = class extends ViveEditorElement {};
|
|
134
134
|
customElements.define(tag, element);
|
|
135
|
+
adoptDefaultStyle(tag);
|
|
135
136
|
return element;
|
|
136
137
|
}
|
|
138
|
+
function adoptDefaultStyle(tag) {
|
|
139
|
+
if (typeof CSSStyleSheet === "undefined" || !Array.isArray(document.adoptedStyleSheets)) return;
|
|
140
|
+
const sheet = new CSSStyleSheet();
|
|
141
|
+
sheet.replaceSync(`:where(${tag}){display:block;min-width:0}`);
|
|
142
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
143
|
+
}
|
|
137
144
|
export { ViveEditorElement, defineViveEditor };
|
|
138
145
|
|
|
139
146
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { type Editor, type EditorMount, mountEditor, resolveLocale } from 'viveeditor'\n\nconst REQUIRED_MESSAGES = {\n tr: 'Bu alan boş bırakılamaz.',\n en: 'This field is required.',\n} as const\n\nexport class ViveEditorElement extends HTMLElement {\n static readonly formAssociated: boolean = true\n static readonly observedAttributes: readonly string[] = ['readonly', 'disabled', 'required']\n\n readonly #internals: ElementInternals\n #mount: EditorMount | null = null\n #value: string | null = null\n #initial: string | null = null\n #formDisabled = false\n #focusValue = ''\n #ready: Promise<Editor>\n #resolveReady: (editor: Editor) => void = () => undefined\n\n constructor() {\n super()\n this.#internals = this.attachInternals()\n this.#ready = new Promise((resolve) => {\n this.#resolveReady = resolve\n })\n }\n\n get value(): string {\n if (this.#mount) return this.#mount.getValue()\n return this.#value ?? this.getAttribute('value') ?? ''\n }\n\n set value(html: string) {\n this.#value = String(html)\n this.#mount?.setValue(this.#value)\n this.#sync()\n }\n\n get editor(): Editor | null {\n return this.#mount?.editor ?? null\n }\n\n get ready(): Promise<Editor> {\n return this.#ready\n }\n\n get form(): HTMLFormElement | null {\n return this.#internals.form\n }\n\n get name(): string {\n return this.getAttribute('name') ?? ''\n }\n\n get validity(): ValidityState {\n return this.#internals.validity\n }\n\n get validationMessage(): string {\n return this.#internals.validationMessage\n }\n\n checkValidity(): boolean {\n return this.#internals.checkValidity()\n }\n\n reportValidity(): boolean {\n return this.#internals.reportValidity()\n }\n\n override focus(options?: FocusOptions): void {\n if (this.editor) this.editor.focus()\n else super.focus(options)\n }\n\n connectedCallback(): void {\n if (this.#mount) return\n this.#initial ??= this.getAttribute('value') ?? ''\n const locale = this.getAttribute('locale') ?? undefined\n const label = this.getAttribute('label') ?? this.getAttribute('aria-label') ?? undefined\n this.#mount = mountEditor(this, {\n value: this.#value ?? this.#initial,\n editable: this.#editable(),\n ...(locale === undefined ? {} : { locale }),\n ...(label === undefined ? {} : { label }),\n ...(this.getAttribute('toolbar') === 'false' ? { ui: false as const } : {}),\n onChange: () => {\n this.#sync()\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n },\n onFocus: () => {\n this.#focusValue = this.value\n },\n onBlur: () => {\n if (this.value !== this.#focusValue) {\n this.dispatchEvent(new Event('change', { bubbles: true }))\n }\n },\n onReady: (editor) => {\n this.#sync()\n this.#resolveReady(editor)\n },\n })\n this.#sync()\n }\n\n disconnectedCallback(): void {\n if (!this.#mount) return\n this.#value = this.#mount.getValue()\n this.#mount.destroy()\n this.#mount = null\n }\n\n attributeChangedCallback(): void {\n this.#mount?.setEditable(this.#editable())\n this.#sync()\n }\n\n formResetCallback(): void {\n this.value = this.#initial ?? this.getAttribute('value') ?? ''\n }\n\n formDisabledCallback(disabled: boolean): void {\n this.#formDisabled = disabled\n this.#mount?.setEditable(this.#editable())\n }\n\n formStateRestoreCallback(state: unknown): void {\n if (typeof state === 'string') this.value = state\n }\n\n #editable(): boolean {\n return !this.#formDisabled && !this.hasAttribute('readonly') && !this.hasAttribute('disabled')\n }\n\n #sync(): void {\n const value = this.value\n this.#internals.setFormValue(value)\n if (this.hasAttribute('required') && value === '') {\n const message = REQUIRED_MESSAGES[resolveLocale(this.getAttribute('locale') ?? undefined)]\n const anchor = this.editor?.dom\n this.#internals.setValidity({ valueMissing: true }, message, anchor)\n } else {\n this.#internals.setValidity({})\n }\n }\n}\n\nexport function defineViveEditor(tag = 'vive-editor'): CustomElementConstructor {\n const existing = customElements.get(tag)\n if (existing) return existing\n const element = class extends ViveEditorElement {}\n customElements.define(tag, element)\n return element\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vive-editor': ViveEditorElement\n }\n}\n"],"mappings":";;AAEA,MAAM,oBAAoB;CACxB,IAAI;CACJ,IAAI;AACN;AAEA,IAAa,oBAAb,cAAuC,YAAY;CACjD,OAAgB,iBAA0B;CAC1C,OAAgB,qBAAwC;EAAC;EAAY;EAAY;CAAU;CAE3F;CACA,SAA6B;CAC7B,SAAwB;CACxB,WAA0B;CAC1B,gBAAgB;CAChB,cAAc;CACd;CACA,sBAAgD,KAAA;CAEhD,cAAc;EACZ,MAAM;EACN,KAAK,aAAa,KAAK,gBAAgB;EACvC,KAAK,SAAS,IAAI,SAAS,YAAY;GACrC,KAAK,gBAAgB;EACvB,CAAC;CACH;CAEA,IAAI,QAAgB;EAClB,IAAI,KAAK,QAAQ,OAAO,KAAK,OAAO,SAAS;EAC7C,OAAO,KAAK,UAAU,KAAK,aAAa,OAAO,KAAK;CACtD;CAEA,IAAI,MAAM,MAAc;EACtB,KAAK,SAAS,OAAO,IAAI;EACzB,KAAK,QAAQ,SAAS,KAAK,MAAM;EACjC,KAAK,MAAM;CACb;CAEA,IAAI,SAAwB;EAC1B,OAAO,KAAK,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EditorMount, mountEditor, resolveLocale } from 'viveeditor'\n\nconst REQUIRED_MESSAGES = {\n tr: 'Bu alan boş bırakılamaz.',\n en: 'This field is required.',\n} as const\n\nexport class ViveEditorElement extends HTMLElement {\n static readonly formAssociated: boolean = true\n static readonly observedAttributes: readonly string[] = ['readonly', 'disabled', 'required']\n\n readonly #internals: ElementInternals\n #mount: EditorMount | null = null\n #value: string | null = null\n #initial: string | null = null\n #formDisabled = false\n #focusValue = ''\n #ready: Promise<Editor>\n #resolveReady: (editor: Editor) => void = () => undefined\n\n constructor() {\n super()\n this.#internals = this.attachInternals()\n this.#ready = new Promise((resolve) => {\n this.#resolveReady = resolve\n })\n }\n\n get value(): string {\n if (this.#mount) return this.#mount.getValue()\n return this.#value ?? this.getAttribute('value') ?? ''\n }\n\n set value(html: string) {\n this.#value = String(html)\n this.#mount?.setValue(this.#value)\n this.#sync()\n }\n\n get editor(): Editor | null {\n return this.#mount?.editor ?? null\n }\n\n get ready(): Promise<Editor> {\n return this.#ready\n }\n\n get form(): HTMLFormElement | null {\n return this.#internals.form\n }\n\n get name(): string {\n return this.getAttribute('name') ?? ''\n }\n\n get validity(): ValidityState {\n return this.#internals.validity\n }\n\n get validationMessage(): string {\n return this.#internals.validationMessage\n }\n\n checkValidity(): boolean {\n return this.#internals.checkValidity()\n }\n\n reportValidity(): boolean {\n return this.#internals.reportValidity()\n }\n\n override focus(options?: FocusOptions): void {\n if (this.editor) this.editor.focus()\n else super.focus(options)\n }\n\n connectedCallback(): void {\n if (this.#mount) return\n this.#initial ??= this.getAttribute('value') ?? ''\n const locale = this.getAttribute('locale') ?? undefined\n const label = this.getAttribute('label') ?? this.getAttribute('aria-label') ?? undefined\n this.#mount = mountEditor(this, {\n value: this.#value ?? this.#initial,\n editable: this.#editable(),\n ...(locale === undefined ? {} : { locale }),\n ...(label === undefined ? {} : { label }),\n ...(this.getAttribute('toolbar') === 'false' ? { ui: false as const } : {}),\n onChange: () => {\n this.#sync()\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n },\n onFocus: () => {\n this.#focusValue = this.value\n },\n onBlur: () => {\n if (this.value !== this.#focusValue) {\n this.dispatchEvent(new Event('change', { bubbles: true }))\n }\n },\n onReady: (editor) => {\n this.#sync()\n this.#resolveReady(editor)\n },\n })\n this.#sync()\n }\n\n disconnectedCallback(): void {\n if (!this.#mount) return\n this.#value = this.#mount.getValue()\n this.#mount.destroy()\n this.#mount = null\n }\n\n attributeChangedCallback(): void {\n this.#mount?.setEditable(this.#editable())\n this.#sync()\n }\n\n formResetCallback(): void {\n this.value = this.#initial ?? this.getAttribute('value') ?? ''\n }\n\n formDisabledCallback(disabled: boolean): void {\n this.#formDisabled = disabled\n this.#mount?.setEditable(this.#editable())\n }\n\n formStateRestoreCallback(state: unknown): void {\n if (typeof state === 'string') this.value = state\n }\n\n #editable(): boolean {\n return !this.#formDisabled && !this.hasAttribute('readonly') && !this.hasAttribute('disabled')\n }\n\n #sync(): void {\n const value = this.value\n this.#internals.setFormValue(value)\n if (this.hasAttribute('required') && value === '') {\n const message = REQUIRED_MESSAGES[resolveLocale(this.getAttribute('locale') ?? undefined)]\n const anchor = this.editor?.dom\n this.#internals.setValidity({ valueMissing: true }, message, anchor)\n } else {\n this.#internals.setValidity({})\n }\n }\n}\n\nexport function defineViveEditor(tag = 'vive-editor'): CustomElementConstructor {\n const existing = customElements.get(tag)\n if (existing) return existing\n const element = class extends ViveEditorElement {}\n customElements.define(tag, element)\n adoptDefaultStyle(tag)\n return element\n}\n\nfunction adoptDefaultStyle(tag: string): void {\n if (typeof CSSStyleSheet === 'undefined' || !Array.isArray(document.adoptedStyleSheets)) return\n const sheet = new CSSStyleSheet()\n sheet.replaceSync(`:where(${tag}){display:block;min-width:0}`)\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet]\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vive-editor': ViveEditorElement\n }\n}\n"],"mappings":";;AAEA,MAAM,oBAAoB;CACxB,IAAI;CACJ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AK,CAAC,KAAK,aAAa,UAAU;CAC/F;CAEA,QAAc;EACZ,MAAM,QAAQ,KAAK;EACnB,KAAK,WAAW,aAAa,KAAK;EAClC,IAAI,KAAK,aAAa,UAAU,KAAK,UAAU,IAAI;GACjD,MAAM,UAAU,kBAAkB,cAAc,KAAK,aAAa,QAAQ,KAAK,KAAA,CAAS;GACxF,MAAM,SAAS,KAAK,QAAQ;GAC5B,KAAK,WAAW,YAAY,EAAE,cAAc,KAAK,GAAG,SAAS,MAAM;EACrE,OACE,KAAK,WAAW,YAAY,CAAC,CAAC;CAElC;AACF;AAEA,SAAgB,iBAAiB,MAAM,eAAyC;CAC9E,MAAM,WAAW,eAAe,IAAI,GAAG;CACvC,IAAI,UAAU,OAAO;CACrB,MAAM,UAAU,cAAc,kBAAkB,CAAC;CACjD,eAAe,OAAO,KAAK,OAAO;CAClC,kBAAkB,GAAG;CACrB,OAAO;AACT;AAEA,SAAS,kBAAkB,KAAmB;CAC5C,IAAI,OAAO,kBAAkB,eAAe,CAAC,MAAM,QAAQ,SAAS,kBAAkB,GAAG;CACzF,MAAM,QAAQ,IAAI,cAAc;CAChC,MAAM,YAAY,UAAU,IAAI,6BAA6B;CAC7D,SAAS,qBAAqB,CAAC,GAAG,SAAS,oBAAoB,KAAK;AACtE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viveeditor/element",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "<vive-editor> custom element for viveEditor: works in plain HTML forms and any framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"custom-element",
|
|
14
14
|
"form"
|
|
15
15
|
],
|
|
16
|
-
"homepage": "https://
|
|
16
|
+
"homepage": "https://editor.vivepdf.com/en/docs/frameworks/",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/mtvrkan/viveeditor/issues"
|
|
19
19
|
},
|
|
@@ -26,18 +26,20 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
|
-
"import": "./dist/index.js"
|
|
29
|
+
"import": "./dist/index.js",
|
|
30
|
+
"default": "./dist/index.js"
|
|
30
31
|
},
|
|
31
32
|
"./define": {
|
|
32
33
|
"types": "./dist/define.d.ts",
|
|
33
|
-
"import": "./dist/define.js"
|
|
34
|
+
"import": "./dist/define.js",
|
|
35
|
+
"default": "./dist/define.js"
|
|
34
36
|
}
|
|
35
37
|
},
|
|
36
38
|
"files": [
|
|
37
39
|
"dist"
|
|
38
40
|
],
|
|
39
41
|
"dependencies": {
|
|
40
|
-
"viveeditor": "^0.1
|
|
42
|
+
"viveeditor": "^1.0.0-rc.1"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@size-limit/preset-small-lib": "^14.3.0",
|