@limetech/lime-elements 38.11.1 → 38.12.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/CHANGELOG.md +16 -0
- package/dist/cjs/index.cjs.js +0 -9
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +209 -111
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-text-editor.cjs.entry.js +7 -1
- package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
- package/dist/collection/components/ai-avatar/ai-avatar.css +1 -3
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/inserter.js +15 -54
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/inserter.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js +51 -43
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/view.js +10 -12
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/view.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/link-plugin.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +51 -5
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
- package/dist/collection/components/text-editor/text-editor.js +38 -4
- package/dist/collection/components/text-editor/text-editor.js.map +1 -1
- package/dist/collection/components/text-editor/text-editor.types.js +1 -9
- package/dist/collection/components/text-editor/text-editor.types.js.map +1 -1
- package/dist/collection/components/text-editor/utils/metadata-utils.js +108 -0
- package/dist/collection/components/text-editor/utils/metadata-utils.js.map +1 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/limel-ai-avatar.entry.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +209 -111
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/esm/limel-text-editor.entry.js +7 -1
- package/dist/esm/limel-text-editor.entry.js.map +1 -1
- package/dist/lime-elements/index.esm.js +1 -1
- package/dist/lime-elements/index.esm.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-7b039dab.entry.js +2 -0
- package/dist/lime-elements/p-7b039dab.entry.js.map +1 -0
- package/dist/lime-elements/{p-033fa919.entry.js → p-7f3045bd.entry.js} +2 -2
- package/dist/lime-elements/p-7f3045bd.entry.js.map +1 -0
- package/dist/lime-elements/p-f20b7faa.entry.js +2 -0
- package/dist/lime-elements/p-f20b7faa.entry.js.map +1 -0
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/image/inserter.d.ts +2 -7
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/image/node.d.ts +9 -0
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/link-plugin.d.ts +0 -4
- package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +10 -0
- package/dist/types/components/text-editor/text-editor.d.ts +10 -0
- package/dist/types/components/text-editor/text-editor.types.d.ts +32 -7
- package/dist/types/components/text-editor/utils/metadata-utils.d.ts +22 -0
- package/dist/types/components.d.ts +17 -4
- package/package.json +1 -1
- package/dist/cjs/text-editor.types-5e5567e2.js +0 -13
- package/dist/cjs/text-editor.types-5e5567e2.js.map +0 -1
- package/dist/esm/text-editor.types-e82469d1.js +0 -13
- package/dist/esm/text-editor.types-e82469d1.js.map +0 -1
- package/dist/lime-elements/p-033fa919.entry.js.map +0 -1
- package/dist/lime-elements/p-7006fafe.entry.js +0 -2
- package/dist/lime-elements/p-7006fafe.entry.js.map +0 -1
- package/dist/lime-elements/p-9ca516ed.js +0 -2
- package/dist/lime-elements/p-9ca516ed.js.map +0 -1
- package/dist/lime-elements/p-b7c52564.entry.js +0 -2
- package/dist/lime-elements/p-b7c52564.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ImageState"],"sources":["./src/components/text-editor/text-editor.types.ts"],"sourcesContent":["import { CustomElement } from '../../global/shared-types/custom-element.types';\nimport { FileInfo } from '../../global/shared-types/file.types';\n\n/**\n * Represents a trigger character and its position in the text.\n *\n * @alpha\n */\nexport type Trigger = {\n character: TriggerCharacter;\n position: number;\n};\n\n/**\n * A character that triggers a specific action in the text editor.\n *\n * @alpha\n */\nexport type TriggerCharacter =\n | '@'\n | '#'\n | '$'\n | '!'\n | '?'\n | '&'\n | '*'\n | '%'\n | '+'\n | '-'\n | '='\n | '/'\n | '\\\\'\n | '^'\n | '~'\n | '`'\n | ':'\n | ';'\n | '|'\n | '.'\n | ','\n | '<'\n | '>'\n | '['\n | ']'\n | '{'\n | '}'\n | '('\n | ')'\n | \"'\";\n\n/**\n * @alpha\n */\nexport type TextEditorNode = {\n /**\n * The top node\n */\n node: CustomElement | string;\n\n /**\n * One more more children under the top node\n */\n children?: Array<TextEditorNode | string>;\n};\n\n/**\n * @alpha\n */\nexport interface ImageInserter {\n fileInfo: FileInfo;\n\n /**\n * Method to insert a thumbnail at the cursor position.\n */\n insertThumbnail: () => void;\n\n /**\n * Method to insert the image at the thumbnail position.\n * Thumbnail must be inserted before calling this method.\n *\n * @param src - The src url of the uploaded image.\n * If not provided, the image will be inserted with base64 data.\n *\n */\n insertImage: (src?: string) => void;\n\n /**\n * Method to insert a failed thumbnail at the thumbnail position.\n * Thumbnail must be inserted before calling this method.\n */\n insertFailedThumbnail: () => void;\n}\n\n/**\n * @alpha\n */\nexport enum ImageState {\n LOADING = 'loading',\n FAILED = 'failed',\n SUCCESS = 'success',\n}\n\n/**\n * @alpha\n */\nexport interface ImageInfo {\n /**\n * Unique ID of the image file.\n */\n fileInfoId: string;\n /**\n * The source of the image.\n * Can either be a URL pointing to the image or a base64 encoded string.\n */\n src: string;\n /**\n * The current state of the image.\n */\n state: ImageState;\n}\n\n/**\n * @alpha\n */\nexport interface TextEditor {\n /**\n * Method to insert either text or a node at the cursor position\n */\n insert: (input: TextEditorNode | string) => void;\n\n /**\n * Method to insert an HTML string at the cursor position\n */\n insertHtml: (input: string) => Promise<void>;\n\n stopTrigger: () => void;\n}\n\n/**\n * @alpha\n */\nexport interface TriggerEventDetail {\n /**\n * The trigger that triggered this event\n *\n */\n trigger: TriggerCharacter;\n\n /**\n * The text editor\n */\n textEditor: TextEditor;\n\n /**\n * Current value of the trigger\n */\n value: string;\n}\n"],"mappings":"IAgGYA,GAAZ,SAAYA,GACRA,EAAA,qBACAA,EAAA,mBACAA,EAAA,oBACH,EAJD,CAAYA,MAAU,Y"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as t,H as r}from"./p-288f0842.js";import{t as e}from"./p-f753013d.js";const i=':host(limel-ai-avatar){display:flex;justify-content:center;align-self:center;position:relative;isolation:isolate;aspect-ratio:1;max-width:10rem;max-height:8rem;min-width:1.75rem;min-height:1.75rem;border-radius:0.5rem}*{box-sizing:border-box}:host(limel-ai-avatar[is-thinking]:not([is-thinking=false])){--ai-avatar-animation-play-state:running;--ai-avatar-orbitals-opacity:1;--ai-avatar-orbitals-animation-play-state:running}.core,.orbitals{mix-blend-mode:overlay;isolation:isolate;position:absolute;z-index:10;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;aspect-ratio:1;width:clamp(0.5rem, 20%, 3.5rem);border-radius:50%}.core{animation:breathe 3s ease infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused);background-color:rgb(var(--color-glaucous-lighter));box-shadow:var(--shadow-depth-8)}.orbitals{animation:rotate 5s linear infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused);transition:opacity 0.2s ease;opacity:var(--ai-avatar-orbitals-opacity, 0)}.orbitals:after,.orbitals:before{animation-play-state:var(--ai-avatar-orbitals-animation-play-state, paused);content:"";display:block;position:absolute;inset:0;margin:auto;width:clamp(0.125rem, 50%, 0.75rem);aspect-ratio:1;border-radius:50%;background-color:rgb(var(--color-glaucous-lighter))}.orbitals:before{animation:orbit 1s linear infinite;opacity:0.6;transform-origin:-220% 0;margin-right:-70%}.orbitals:after{animation:orbit 2s linear infinite;opacity:0.8;scale:0.7;transform-origin:0% -250%;margin-bottom:-70%}@keyframes orbit{0%{transform:rotateZ(0deg) translate3d(0, 0, 0)}100%{transform:rotateZ(360deg) translate3d(0, 0, 0)}}@keyframes breathe{1%,100%{transform:scale(1)}50%{transform:scale(0.7)}}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}svg{position:absolute;margin:auto;mix-blend-mode:screen;animation-iteration-count:infinite;animation-play-state:var(--ai-avatar-animation-play-state, paused)}.red{rotate:20deg;color:rgb(var(--color-red-default));animation-name:rotate, scale-circle-one;animation-duration:5s}.green{rotate:36deg;color:rgb(var(--color-green-default));animation-name:rotate, scale-circle-two;animation-duration:5.5s}.blue{rotate:100deg;color:rgb(var(--color-blue-default));animation-name:rotate, scale-circle-three;animation-duration:4.5s}.orange{rotate:165deg;color:rgb(var(--color-orange-default));animation-name:rotate, scale-circle-four;animation-duration:6.5s}@keyframes scale-circle-one{0%,100%{transform:scaleX(1) scaleY(0.8)}25%,75%{transform:scaleX(0.8) scaleY(0.9)}50%{transform:scaleX(1) scaleY(0.7)}}@keyframes scale-circle-two{0%,100%{transform:scaleX(0.8) scaleY(1)}25%,75%{transform:scaleX(0.9) scaleY(0.75)}50%{transform:scaleX(0.72) scaleY(1)}}@keyframes scale-circle-three{0%,100%{transform:scaleX(0.9) scaleY(0.8)}50%{transform:scaleX(0.75) scaleY(0.9)}}@keyframes scale-circle-four{0%,100%{transform:scaleX(0.8) scaleY(0.95)}25%,75%{transform:scaleX(0.95) scaleY(0.75)}50%{transform:scaleX(0.75) scaleY(0.95)}}';const o=class{constructor(t){a(this,t);this.getTranslation=a=>e.get(a,this.language);this.isThinking=false;this.language=document.documentElement.lang}render(){return t(r,{role:"img","aria-label":this.getHostAriaLabel()},this.renderCircle("red"),this.renderCircle("green"),this.renderCircle("blue"),this.renderCircle("orange"),t("div",{class:"core"}),t("div",{class:"orbitals"}))}getHostAriaLabel(){let a="";if(this.isThinking){a=` (${this.getTranslation("ai-avatar.thinking")})`}return`${this.getTranslation("ai-avatar.label")}${a}`}renderCircle(a){return t("svg",{class:a,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",role:"presentation"},t("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"currentColor","stroke-width":"6"}))}};o.style=i;export{o as limel_ai_avatar};
|
|
2
|
-
//# sourceMappingURL=p-b7c52564.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["aiAvatarCss","AiAvatar","this","getTranslation","key","translate","get","language","document","documentElement","lang","render","h","Host","role","getHostAriaLabel","renderCircle","class","thinkingText","isThinking","className","viewBox","xmlns","cx","cy","r","fill","stroke"],"sources":["./src/components/ai-avatar/ai-avatar.scss?tag=limel-ai-avatar&encapsulation=shadow","./src/components/ai-avatar/ai-avatar.tsx"],"sourcesContent":["/**\n* @prop --ai-avatar-animation-play-state: Set it to `running` to start the animation.\n*/\n:host(limel-ai-avatar) {\n display: flex;\n justify-content: center;\n align-self: center;\n position: relative;\n isolation: isolate;\n\n aspect-ratio: 1;\n max-width: 10rem;\n max-height: 8rem;\n min-width: 1.75rem;\n min-height: 1.75rem;\n\n border-radius: 0.5rem;\n}\n\n* {\n box-sizing: border-box;\n}\n\n:host(limel-ai-avatar[is-thinking]:not([is-thinking='false'])) {\n --ai-avatar-animation-play-state: running;\n --ai-avatar-orbitals-opacity: 1;\n --ai-avatar-orbitals-animation-play-state: running;\n}\n\n.core,\n.orbitals {\n mix-blend-mode: overlay;\n isolation: isolate;\n\n position: absolute;\n z-index: 10;\n inset: 0;\n margin: auto;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n aspect-ratio: 1;\n width: clamp(0.5rem, 20%, 3.5rem);\n\n border-radius: 50%;\n}\n\n.core {\n animation: breathe 3s ease infinite;\n animation-play-state: var(--ai-avatar-animation-play-state, paused);\n background-color: rgb(var(--color-glaucous-lighter));\n box-shadow: var(--shadow-depth-8);\n}\n\n.orbitals {\n animation: rotate 5s linear infinite;\n animation-play-state: var(--ai-avatar-animation-play-state, paused);\n\n transition: opacity 0.2s ease;\n opacity: var(--ai-avatar-orbitals-opacity, 0);\n\n &:after,\n &:before {\n animation-play-state: var(\n --ai-avatar-orbitals-animation-play-state,\n paused\n );\n content: '';\n display: block;\n position: absolute;\n inset: 0;\n margin: auto;\n\n width: clamp(0.125rem, 50%, 0.75rem);\n aspect-ratio: 1;\n border-radius: 50%;\n background-color: rgb(var(--color-glaucous-lighter));\n }\n &:before {\n animation: orbit 1s linear infinite;\n opacity: 0.6;\n transform-origin: -220% 0;\n margin-right: -70%;\n }\n &:after {\n animation: orbit 2s linear infinite;\n opacity: 0.8;\n scale: 0.7;\n transform-origin: 0% -250%;\n margin-bottom: -70%;\n }\n}\n\n@keyframes orbit {\n 0% {\n transform: rotateZ(0deg) translate3d(0, 0, 0);\n }\n 100% {\n transform: rotateZ(360deg) translate3d(0, 0, 0);\n }\n}\n\n@keyframes breathe {\n 1%,\n 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(0.7);\n }\n}\n\n@keyframes rotate {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\nsvg {\n position: absolute;\n margin: auto;\n mix-blend-mode: screen;\n\n animation-iteration-count: infinite;\n animation-play-state: var(--ai-avatar-animation-play-state, paused);\n}\n\n.red {\n rotate: 20deg;\n color: rgb(var(--color-red-default));\n animation-name: rotate, scale-circle-one;\n animation-duration: 5s;\n}\n\n.green {\n rotate: 36deg;\n color: rgb(var(--color-green-default));\n animation-name: rotate, scale-circle-two;\n animation-duration: 5.5s;\n}\n\n.blue {\n rotate: 100deg;\n color: rgb(var(--color-blue-default));\n animation-name: rotate, scale-circle-three;\n animation-duration: 4.5s;\n}\n\n.orange {\n rotate: 165deg;\n color: rgb(var(--color-orange-default));\n animation-name: rotate, scale-circle-four;\n animation-duration: 6.5s;\n}\n\n@keyframes scale-circle-one {\n 0%,\n 100% {\n transform: scaleX(1) scaleY(0.8);\n }\n 25%,\n 75% {\n transform: scaleX(0.8) scaleY(0.9);\n }\n 50% {\n transform: scaleX(1) scaleY(0.7);\n }\n}\n\n@keyframes scale-circle-two {\n 0%,\n 100% {\n transform: scaleX(0.8) scaleY(1);\n }\n 25%,\n 75% {\n transform: scaleX(0.9) scaleY(0.75);\n }\n 50% {\n transform: scaleX(0.72) scaleY(1);\n }\n}\n\n@keyframes scale-circle-three {\n 0%,\n 100% {\n transform: scaleX(0.9) scaleY(0.8);\n }\n 50% {\n transform: scaleX(0.75) scaleY(0.9);\n }\n}\n\n@keyframes scale-circle-four {\n 0%,\n 100% {\n transform: scaleX(0.8) scaleY(0.95);\n }\n 25%,\n 75% {\n transform: scaleX(0.95) scaleY(0.75);\n }\n 50% {\n transform: scaleX(0.75) scaleY(0.95);\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { Languages } from './../date-picker/date.types';\nimport translate from './../../global/translations';\n\n/**\n * This component displays an avatar, representing Lime AI assistants.\n *\n * :::warning\n * This is a private component used internally in the Lime's various applications,\n * which is the reason for having it in Lime Elements —to ease the distribution\n * of the component across all our apps.\n *\n * 3rd party developers are not allowed use this component directly.\n * :::\n *\n * @private\n * @exampleComponent limel-example-ai-avatar-basic\n * @exampleComponent limel-example-ai-avatar-colors\n */\n@Component({\n tag: 'limel-ai-avatar',\n shadow: true,\n styleUrl: 'ai-avatar.scss',\n})\nexport class AiAvatar {\n /**\n * Set to `true` to trigger animations that indicate that the AI is\n * \"thinking\" or processing something.\n */\n @Prop({ reflect: true })\n public isThinking = false;\n\n /**\n * Defines the language for translations.\n */\n @Prop({ reflect: true })\n public language: Languages = document.documentElement.lang as Languages;\n\n public render() {\n return (\n <Host role=\"img\" aria-label={this.getHostAriaLabel()}>\n {this.renderCircle('red')}\n {this.renderCircle('green')}\n {this.renderCircle('blue')}\n {this.renderCircle('orange')}\n <div class=\"core\" />\n <div class=\"orbitals\" />\n </Host>\n );\n }\n\n private getHostAriaLabel(): string {\n let thinkingText = '';\n if (this.isThinking) {\n thinkingText = ` (${this.getTranslation('ai-avatar.thinking')})`;\n }\n\n return `${this.getTranslation('ai-avatar.label')}${thinkingText}`;\n }\n\n private renderCircle(className: string) {\n return (\n <svg\n class={className}\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"presentation\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"6\"\n />\n </svg>\n );\n }\n\n private getTranslation = (key: string) => {\n return translate.get(key, this.language);\n };\n}\n"],"mappings":"sFAAA,MAAMA,EAAc,o9F,MCwBPC,EAAQ,M,yBAwDTC,KAAAC,eAAkBC,GACfC,EAAUC,IAAIF,EAAKF,KAAKK,U,gBAnDf,M,cAMSC,SAASC,gBAAgBC,I,CAE/CC,SACH,OACIC,EAACC,EAAI,CAACC,KAAK,MAAK,aAAaZ,KAAKa,oBAC7Bb,KAAKc,aAAa,OAClBd,KAAKc,aAAa,SAClBd,KAAKc,aAAa,QAClBd,KAAKc,aAAa,UACnBJ,EAAA,OAAKK,MAAM,SACXL,EAAA,OAAKK,MAAM,a,CAKfF,mBACJ,IAAIG,EAAe,GACnB,GAAIhB,KAAKiB,WAAY,CACjBD,EAAe,KAAKhB,KAAKC,eAAe,wB,CAG5C,MAAO,GAAGD,KAAKC,eAAe,qBAAqBe,G,CAG/CF,aAAaI,GACjB,OACIR,EAAA,OACIK,MAAOG,EACPC,QAAQ,cACRC,MAAM,6BACNR,KAAK,gBAELF,EAAA,UACIW,GAAG,KACHC,GAAG,KACHC,EAAE,KACFC,KAAK,OACLC,OAAO,eAAc,eACR,M"}
|