@knime/product-features 6.1.2 → 6.3.0
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 +17 -0
- package/README.md +13 -12
- package/dist/ai.css +30 -30
- package/dist/ai.js +58 -21
- package/dist/ai.js.map +1 -1
- package/dist/dataTransfer.js +1 -1
- package/dist/embedding.js +74 -0
- package/dist/embedding.js.map +1 -0
- package/dist/{rfcErrors-C59cEDGj.js → rfcErrors-CNWg8BiD.js} +13 -3
- package/dist/{rfcErrors-C59cEDGj.js.map → rfcErrors-CNWg8BiD.js.map} +1 -1
- package/dist/rfcErrors.js +2 -2
- package/dist/src/ai/KdsPromptInput/KdsPromptInput.vue.d.ts +6 -0
- package/dist/src/ai/KdsPromptInput/KdsPromptInput.vue.d.ts.map +1 -1
- package/dist/src/ai/KdsPromptInput/types.d.ts +33 -0
- package/dist/src/ai/KdsPromptInput/types.d.ts.map +1 -1
- package/dist/src/embedding/capabilities.d.ts +40 -0
- package/dist/src/embedding/capabilities.d.ts.map +1 -0
- package/dist/src/embedding/index.d.ts +6 -0
- package/dist/src/embedding/index.d.ts.map +1 -0
- package/dist/src/embedding/outlets/index.d.ts +23 -0
- package/dist/src/embedding/outlets/index.d.ts.map +1 -0
- package/dist/src/embedding/outlets/spaceExplorer.d.ts +74 -0
- package/dist/src/embedding/outlets/spaceExplorer.d.ts.map +1 -0
- package/dist/src/embedding/toasts.d.ts +14 -0
- package/dist/src/embedding/toasts.d.ts.map +1 -0
- package/dist/src/embedding/types.d.ts +131 -0
- package/dist/src/embedding/types.d.ts.map +1 -0
- package/dist/src/rfcErrors/index.d.ts +10 -0
- package/dist/src/rfcErrors/index.d.ts.map +1 -1
- package/dist/src/toasts/Toast/Toast.vue.d.ts +2 -2
- package/package.json +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfcErrors-C59cEDGj.js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undefined,\n };\n\n return new RFCError(rfcErrorData);\n};\n\nexport const rfcErrors = {\n toToast,\n tryParse,\n RFCError,\n};\n"],"mappings":";;;;;;AAEA,IAAa,8BACX,OACA,UACA,eACW;CACX,IAAI,UAAU;CACd,IAAI,MAAM,SAAS,QACjB,IAAI,MAAM,QAAQ,SAAS,GAIzB,UAAU,KAHU,MAAM,QACvB,KAAK,SAAS,UAAU,MAAM,CAAC,CAC/B,KAAK,IACO;MAEf,UAAU,MAAM,QAAQ;CAI5B,IAAI,YAAY,GAAG,SAAS;CAC5B,aAAa,GAAG,MAAM,MAAM;CAC5B,aAAa,UAAU,YAAY,QAAQ,QAAQ;CAEnD,IAAI,MAAM,WAAW,KAAA,GACnB,aAAa,WAAW,MAAM,OAAO;CAGvC,IAAI,MAAM,MACR,aAAa,SAAS,WAAW,MAAM,IAAI,EAAE;CAG/C,IAAI,MAAM,WACR,aAAa,eAAe,MAAM,UAAU;CAG9C,IAAI,MAAM,SACR,aAAa,aAAa,MAAM,QAAQ;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js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Key in `Toast.meta` under which `toToast` keeps the error data, so the toast\n * can be rebuilt where its component cannot be rendered.\n */\nexport const RFC_ERROR_TOAST_META_KEY = \"rfcError\";\n\nexport type RFCErrorToastMeta = {\n data: RFCErrorData;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n};\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n meta: {\n [RFC_ERROR_TOAST_META_KEY]: {\n data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n } satisfies RFCErrorToastMeta,\n },\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undefined,\n };\n\n return new RFCError(rfcErrorData);\n};\n\nexport const rfcErrors = {\n toToast,\n tryParse,\n RFCError,\n};\n"],"mappings":";;;;;;AAEA,IAAa,8BACX,OACA,UACA,eACW;CACX,IAAI,UAAU;CACd,IAAI,MAAM,SAAS,QACjB,IAAI,MAAM,QAAQ,SAAS,GAIzB,UAAU,KAHU,MAAM,QACvB,KAAK,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eAAe,MAAM,SAAS,QAAQ,IAAI,MAAM,IAClD,IAAI,KAAK,MAAM,SAAS,QAAQ,IAAI,MAAM,CAAE,IAC5C,KAAA;CAcJ,OAAO,IAAI,SAAS;EARX,OAHP,OAAO,MAAM,SAAS,WAAW,MAAM,OAAQ,MAAM,MAAM,SAAS;EAIpE,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,MAAM;EACN,WAAW,MAAM,SAAS,QAAQ,IAAI,cAAc,KAAK,KAAA;EACzD,SAAS,MAAM,SAAS,QAAQ,IAAI,YAAY,KAAK,KAAA;CAGnC,CAAY;AAClC;AAEA,IAAa,YAAY;CACvB;CACA;CACA;AACF"}
|
package/dist/rfcErrors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { rfcErrors };
|
|
1
|
+
import { n as rfcErrors, t as RFC_ERROR_TOAST_META_KEY } from "./rfcErrors-CNWg8BiD.js";
|
|
2
|
+
export { RFC_ERROR_TOAST_META_KEY, rfcErrors };
|
|
@@ -22,6 +22,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
respond: (response: KdsPromptInputInquiryResponse) => any;
|
|
23
23
|
statusButtonClick: () => any;
|
|
24
24
|
statusSecondaryButtonClick: () => any;
|
|
25
|
+
menuItemClick: (id: string) => any;
|
|
26
|
+
contextChipRemove: (id: string) => any;
|
|
27
|
+
contextChipLabelClick: (id: string) => any;
|
|
25
28
|
"update:modelValue": (value: string) => any;
|
|
26
29
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
30
|
onStop?: (() => any) | undefined;
|
|
@@ -29,6 +32,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
29
32
|
onRespond?: ((response: KdsPromptInputInquiryResponse) => any) | undefined;
|
|
30
33
|
onStatusButtonClick?: (() => any) | undefined;
|
|
31
34
|
onStatusSecondaryButtonClick?: (() => any) | undefined;
|
|
35
|
+
onMenuItemClick?: ((id: string) => any) | undefined;
|
|
36
|
+
onContextChipRemove?: ((id: string) => any) | undefined;
|
|
37
|
+
onContextChipLabelClick?: ((id: string) => any) | undefined;
|
|
32
38
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
39
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
34
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdsPromptInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/KdsPromptInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KdsPromptInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/KdsPromptInput.vue"],"names":[],"mappings":"AAqVA,OAAO,KAAK,EACV,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,KAAK,WAAW,GAAG,mBAAmB,CAAC;AAsCvC,KAAK,WAAW,GAAG;IACjB;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,OAAO,CAAC;CAC5B,CAAC;AA0CF,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsWxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;kFAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KdsChipProps, KdsMenuItem } from '@knime/kds-components';
|
|
1
2
|
import { kdsPromptInputPermissionDecision, kdsPromptInputStatusType } from './enums';
|
|
2
3
|
export type KdsPromptInputStatusType = (typeof kdsPromptInputStatusType)[keyof typeof kdsPromptInputStatusType];
|
|
3
4
|
export type KdsPromptInputPermissionDecisionType = (typeof kdsPromptInputPermissionDecision)[keyof typeof kdsPromptInputPermissionDecision];
|
|
@@ -113,6 +114,23 @@ export type KdsPromptInputInquiryResponse = {
|
|
|
113
114
|
/** One answer per entry of the `questions` prop, in prop order. */
|
|
114
115
|
questions: KdsPromptInputQuestionAnswer[];
|
|
115
116
|
};
|
|
117
|
+
export type KdsPromptInputMenu = {
|
|
118
|
+
/**
|
|
119
|
+
* Items of the menu, e.g. "Upload files" and "Select existing files". Every
|
|
120
|
+
* click, on nested items too, is dispatched through the `menuItemClick`
|
|
121
|
+
* event; what an item does is up to the consumer.
|
|
122
|
+
*/
|
|
123
|
+
items: KdsMenuItem[];
|
|
124
|
+
/** Accessible name of the "+" button. */
|
|
125
|
+
ariaLabel?: string;
|
|
126
|
+
};
|
|
127
|
+
export type KdsPromptInputContextChip = KdsChipProps & {
|
|
128
|
+
/**
|
|
129
|
+
* Stable identifier, echoed back in the `contextChipRemove` and
|
|
130
|
+
* `contextChipLabelClick` events.
|
|
131
|
+
*/
|
|
132
|
+
id: string;
|
|
133
|
+
};
|
|
116
134
|
export type KdsPromptInputProps = {
|
|
117
135
|
/** Placeholder shown when the input is empty. */
|
|
118
136
|
placeholder?: string;
|
|
@@ -153,5 +171,20 @@ export type KdsPromptInputProps = {
|
|
|
153
171
|
* all permissions have been addressed.
|
|
154
172
|
*/
|
|
155
173
|
questions?: KdsPromptInputQuestion[];
|
|
174
|
+
/**
|
|
175
|
+
* Menu behind the "+" button in the bottom left corner of the input, which
|
|
176
|
+
* stays pressed while the menu is open. Omit to hide the button.
|
|
177
|
+
*/
|
|
178
|
+
menu?: KdsPromptInputMenu;
|
|
179
|
+
/**
|
|
180
|
+
* Context sent along with the prompt, shown as a `KdsChip` each above the
|
|
181
|
+
* prompt text, e.g. attached files or the nodes selected while writing. The
|
|
182
|
+
* chips wrap onto new rows and push the text down. The chips' `remove` and
|
|
183
|
+
* `labelClick` events come out as `contextChipRemove` and
|
|
184
|
+
* `contextChipLabelClick` with the chip's `id`, and it's up to the consumer
|
|
185
|
+
* to update this list, e.g. drop a removed chip. While the input is
|
|
186
|
+
* disabled, all chips are disabled too, whatever their own `disabled` says.
|
|
187
|
+
*/
|
|
188
|
+
contextChips?: KdsPromptInputContextChip[];
|
|
156
189
|
};
|
|
157
190
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,oCAAoC,GAC9C,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC;AAE3F,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;;;;OAOG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CA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;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,yBAAyB,EAAE,CAAC;CAC5C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { GuestCapabilitiesForOutlet, HostCapabilitiesForOutlet, OutletName } from './outlets';
|
|
2
|
+
/**
|
|
3
|
+
* Version of `@knime/product-features` that this build uses. Informational
|
|
4
|
+
* only: logs, support, deprecation tracking. It never gates behavior.
|
|
5
|
+
*/
|
|
6
|
+
export declare const contractVersion: string;
|
|
7
|
+
/**
|
|
8
|
+
* Static declaration of the guest app. The host reads it before embedding.
|
|
9
|
+
*/
|
|
10
|
+
export type GuestCapabilities = {
|
|
11
|
+
contractVersion: string;
|
|
12
|
+
/**
|
|
13
|
+
* Outlets the guest declares and supports. The host does not send a feature
|
|
14
|
+
* for an outlet the guest does not support
|
|
15
|
+
*/
|
|
16
|
+
outlets: Partial<GuestCapabilitiesForOutlet>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Static declaration of the host, passed as context for mounting the embedded guest
|
|
20
|
+
*/
|
|
21
|
+
export type HostCapabilities = {
|
|
22
|
+
contractVersion: string;
|
|
23
|
+
/**
|
|
24
|
+
* Outlets the host has features for. The guest does not render an outlet that the
|
|
25
|
+
* host cannot provide.
|
|
26
|
+
*/
|
|
27
|
+
outlets: Partial<HostCapabilitiesForOutlet>;
|
|
28
|
+
};
|
|
29
|
+
export type ResolvedOutlets = {
|
|
30
|
+
[N in OutletName]?: {
|
|
31
|
+
guest: GuestCapabilitiesForOutlet[N];
|
|
32
|
+
host: HostCapabilitiesForOutlet[N];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Outlets that both sides declare. Capabilities that this contract version does not know are
|
|
37
|
+
* dropped.
|
|
38
|
+
*/
|
|
39
|
+
export declare const resolveOutlets: (guest: GuestCapabilities, host: HostCapabilities) => ResolvedOutlets;
|
|
40
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../src/embedding/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAEhB,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAqC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC9C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;KAC3B,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE;QAClB,KAAK,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC;QACrC,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;KACpC;CACF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,iBAAiB,EACxB,MAAM,gBAAgB,KACrB,eAeF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { contractVersion, resolveOutlets } from './capabilities';
|
|
2
|
+
export type { GuestCapabilities, HostCapabilities, ResolvedOutlets, } from './capabilities';
|
|
3
|
+
export type { HostCapabilitiesForOutlet, OutletHandle, OutletName, OutletRegistry, SpaceExplorerDragItem, SpaceExplorerFeatureAPI, SpaceExplorerItemDrop, SpaceExplorerOutletHandle, } from './outlets';
|
|
4
|
+
export { fromHostToast, toHostToast } from './toasts';
|
|
5
|
+
export type { EmbeddedGuestAPI, EmbeddingContext, EmbeddingHostAPI, GuestEmbedModuleBootstrap, NavigationIntent, UserActivity, } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/embedding/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACtD,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SpaceExplorerFeatureAPI, SpaceExplorerGuestCapabilities, SpaceExplorerHostCapabilities, SpaceExplorerOutletHandle } from './spaceExplorer';
|
|
2
|
+
/**
|
|
3
|
+
* Outlets the guest can expose (the editor in this case). Each outlet contains one feature of the host.
|
|
4
|
+
*/
|
|
5
|
+
export type OutletHandle = SpaceExplorerOutletHandle;
|
|
6
|
+
export type OutletName = OutletHandle["name"];
|
|
7
|
+
export type OutletRegistry = {
|
|
8
|
+
spaceExplorer: SpaceExplorerFeatureAPI;
|
|
9
|
+
};
|
|
10
|
+
export type GuestCapabilitiesForOutlet = {
|
|
11
|
+
spaceExplorer: SpaceExplorerGuestCapabilities;
|
|
12
|
+
};
|
|
13
|
+
export type HostCapabilitiesForOutlet = {
|
|
14
|
+
spaceExplorer: SpaceExplorerHostCapabilities;
|
|
15
|
+
};
|
|
16
|
+
export declare const outletCapabilityResolvers: {
|
|
17
|
+
[N in OutletName]: {
|
|
18
|
+
guest: (declared: GuestCapabilitiesForOutlet[N]) => GuestCapabilitiesForOutlet[N];
|
|
19
|
+
host: (declared: HostCapabilitiesForOutlet[N]) => HostCapabilitiesForOutlet[N];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type { SpaceExplorerDragItem, SpaceExplorerFeatureAPI, SpaceExplorerItemDrop, SpaceExplorerOutletHandle, } from './spaceExplorer';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/embedding/outlets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAG/B,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,uBAAuB,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,8BAA8B,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,EAAE,6BAA6B,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE;KACrC,CAAC,IAAI,UAAU,GAAG;QACjB,KAAK,EAAE,CACL,QAAQ,EAAE,0BAA0B,CAAC,CAAC,CAAC,KACpC,0BAA0B,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,EAAE,CACJ,QAAQ,EAAE,yBAAyB,CAAC,CAAC,CAAC,KACnC,yBAAyB,CAAC,CAAC,CAAC,CAAC;KACnC;CAMF,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An item that the space explorer drags onto the canvas.
|
|
3
|
+
*/
|
|
4
|
+
export type SpaceExplorerDragItem = {
|
|
5
|
+
spaceId: string;
|
|
6
|
+
itemId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Drags items from the space explorer onto the another container. This allows custom control
|
|
12
|
+
* over rendering a drag preview and also running custom logic when an item is dropped onto another
|
|
13
|
+
* container.
|
|
14
|
+
*/
|
|
15
|
+
export type SpaceExplorerItemDrop = {
|
|
16
|
+
start: (item: SpaceExplorerDragItem) => void;
|
|
17
|
+
/**
|
|
18
|
+
* When `accepts` is true, the space explorer hides its own drag ghost.
|
|
19
|
+
*/
|
|
20
|
+
move: (clientX: number, clientY: number) => {
|
|
21
|
+
accepts: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Resolves to whether the guest added the item.
|
|
25
|
+
*/
|
|
26
|
+
end: (clientX: number, clientY: number) => Promise<boolean>;
|
|
27
|
+
cancel: () => void;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Announced by the guest when the element the outlet will render to exists.
|
|
31
|
+
*/
|
|
32
|
+
export type SpaceExplorerOutletHandle = {
|
|
33
|
+
name: "spaceExplorer";
|
|
34
|
+
/**
|
|
35
|
+
* A stable, empty element. Must not be patched/removed by the guest
|
|
36
|
+
*/
|
|
37
|
+
element: HTMLElement;
|
|
38
|
+
/**
|
|
39
|
+
* Present when both sides declare `itemDrop`.
|
|
40
|
+
*/
|
|
41
|
+
itemDrop?: SpaceExplorerItemDrop;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The space explorer's public api. Returned after `announce`ing the feature.
|
|
45
|
+
*/
|
|
46
|
+
export type SpaceExplorerFeatureAPI = {
|
|
47
|
+
/**
|
|
48
|
+
* Shows the item: its parent folder, with the item selected. Present when
|
|
49
|
+
* the host declares `revealItem`.
|
|
50
|
+
*/
|
|
51
|
+
revealItem?: (item: {
|
|
52
|
+
spaceId: string;
|
|
53
|
+
itemId: string;
|
|
54
|
+
}) => void;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Capabilities the space explorer expects the guest to implement
|
|
58
|
+
*/
|
|
59
|
+
export type SpaceExplorerGuestCapabilities = {
|
|
60
|
+
itemDrop?: true;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Capabilities the space explorer of the host offers to the guest for public/direct usage
|
|
64
|
+
* (all behavior is normally self-contained).
|
|
65
|
+
*/
|
|
66
|
+
export type SpaceExplorerHostCapabilities = {
|
|
67
|
+
revealItem?: true;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Keep only the capabilities that this contract version knows.
|
|
71
|
+
*/
|
|
72
|
+
export declare const resolveSpaceExplorerGuestCapabilities: (declared: SpaceExplorerGuestCapabilities) => SpaceExplorerGuestCapabilities;
|
|
73
|
+
export declare const resolveSpaceExplorerHostCapabilities: (declared: SpaceExplorerHostCapabilities) => SpaceExplorerHostCapabilities;
|
|
74
|
+
//# sourceMappingURL=spaceExplorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spaceExplorer.d.ts","sourceRoot":"","sources":["../../../../src/embedding/outlets/spaceExplorer.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACjE;;OAEG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qCAAqC,GAChD,UAAU,8BAA8B,KACvC,8BAED,CAAC;AAEH,eAAO,MAAM,oCAAoC,GAC/C,UAAU,6BAA6B,KACtC,6BAED,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Toast } from '../toasts';
|
|
2
|
+
import { HostToast } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Guest: turns a toast into data the host can render. An RFC error toast
|
|
5
|
+
* keeps its error data. Any other component is dropped, because the host
|
|
6
|
+
* cannot render a component from the guest's Vue runtime.
|
|
7
|
+
*/
|
|
8
|
+
export declare const toHostToast: (toast: Toast) => HostToast;
|
|
9
|
+
/**
|
|
10
|
+
* Host: turns a toast from the guest into a toast for its own
|
|
11
|
+
* toast service context.
|
|
12
|
+
*/
|
|
13
|
+
export declare const fromHostToast: (hostToast: HostToast) => Toast;
|
|
14
|
+
//# sourceMappingURL=toasts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toasts.d.ts","sourceRoot":"","sources":["../../../src/embedding/toasts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,SAc1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,WAAW,SAAS,KAAG,KAgBpD,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { RFCErrorToastMeta } from '../rfcErrors';
|
|
2
|
+
import { Toast } from '../toasts';
|
|
3
|
+
import { GuestCapabilities, HostCapabilities } from './capabilities';
|
|
4
|
+
import { OutletHandle, OutletName, OutletRegistry } from './outlets';
|
|
5
|
+
/**
|
|
6
|
+
* Data the host provisions before it mounts the guest.
|
|
7
|
+
*/
|
|
8
|
+
export type EmbeddingContext = {
|
|
9
|
+
/**
|
|
10
|
+
* URI of the WS connection.
|
|
11
|
+
*/
|
|
12
|
+
wsConnectionUri: string;
|
|
13
|
+
/**
|
|
14
|
+
* URI of the HTTP endpoint to fetch resources from.
|
|
15
|
+
*/
|
|
16
|
+
httpResourceUri: string;
|
|
17
|
+
/**
|
|
18
|
+
* Base URL of the Hub REST API.
|
|
19
|
+
*/
|
|
20
|
+
restApiBaseUrl: string;
|
|
21
|
+
/**
|
|
22
|
+
* Id of the job that is loaded into the executor.
|
|
23
|
+
*/
|
|
24
|
+
jobId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Time in ms without user interaction after which the user is idle.
|
|
27
|
+
*/
|
|
28
|
+
userIdleTimeout?: number;
|
|
29
|
+
analytics?: {
|
|
30
|
+
/**
|
|
31
|
+
* Whether the editor can send analytics events.
|
|
32
|
+
*/
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Property bag containing assorted data that does not strictly belong to the stable
|
|
37
|
+
* emedding context, which should be a stable contract not changing often. Properties in here
|
|
38
|
+
* should be validated by the guest before being used. An example would be passing the theme data
|
|
39
|
+
*/
|
|
40
|
+
customProperties?: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A toast as raw data.
|
|
44
|
+
*/
|
|
45
|
+
export type HostToast = Omit<Toast, "component"> & {
|
|
46
|
+
/**
|
|
47
|
+
* The host renders the content of an RFC 9457 error toast from this data.
|
|
48
|
+
*/
|
|
49
|
+
rfcError?: RFCErrorToastMeta;
|
|
50
|
+
};
|
|
51
|
+
export type NavigationIntent = {
|
|
52
|
+
intent: "reload";
|
|
53
|
+
} | {
|
|
54
|
+
intent: "go-to";
|
|
55
|
+
destination: "cloud-home";
|
|
56
|
+
openIn: "_blank" | "_self";
|
|
57
|
+
} | {
|
|
58
|
+
intent: "navigate";
|
|
59
|
+
href: string;
|
|
60
|
+
openIn: "_blank" | "_self";
|
|
61
|
+
};
|
|
62
|
+
export type UserActivity = {
|
|
63
|
+
/**
|
|
64
|
+
* - `active`: the user interacts with the guest app and no background task runs.
|
|
65
|
+
* - `idle`: the user does not interact and no background task runs.
|
|
66
|
+
* - `background-task`: a background task runs, regardless of whatever the user does.
|
|
67
|
+
* The host blocks page unload in this state.
|
|
68
|
+
*/
|
|
69
|
+
state: "active" | "idle" | "background-task";
|
|
70
|
+
/**
|
|
71
|
+
* ISO 8601 timestamp.
|
|
72
|
+
*/
|
|
73
|
+
lastActive: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* API contract for Calls from the guest to the host.
|
|
77
|
+
*/
|
|
78
|
+
export type EmbeddingHostAPI = {
|
|
79
|
+
/**
|
|
80
|
+
* Resolves to the id of the toast.
|
|
81
|
+
*/
|
|
82
|
+
showNotification: (toast: HostToast) => string;
|
|
83
|
+
clearNotification: (target: {
|
|
84
|
+
id: string;
|
|
85
|
+
} | {
|
|
86
|
+
deduplicationKey: string;
|
|
87
|
+
}) => void;
|
|
88
|
+
requestNavigation: (intent: NavigationIntent) => void;
|
|
89
|
+
reportActivity: (activity: UserActivity) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Send when embedding failed to start.
|
|
92
|
+
*/
|
|
93
|
+
reportFailure: (error: {
|
|
94
|
+
message: string;
|
|
95
|
+
}) => void;
|
|
96
|
+
trackAnalytics: (event: {
|
|
97
|
+
id: string;
|
|
98
|
+
data: unknown;
|
|
99
|
+
}) => void;
|
|
100
|
+
outlets: {
|
|
101
|
+
/**
|
|
102
|
+
* Returns the feature's API of the outlet right away, before the
|
|
103
|
+
* feature renders.
|
|
104
|
+
*/
|
|
105
|
+
announce: <H extends OutletHandle>(handle: H) => OutletRegistry[H["name"]];
|
|
106
|
+
withdraw: (name: OutletName) => void;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Handle the host gets from a `mount`.
|
|
111
|
+
*/
|
|
112
|
+
export type EmbeddedGuestAPI = {
|
|
113
|
+
/**
|
|
114
|
+
* Cleanup ran inside the guest
|
|
115
|
+
*/
|
|
116
|
+
teardown: () => Promise<void>;
|
|
117
|
+
};
|
|
118
|
+
type MountOptions = {
|
|
119
|
+
context: EmbeddingContext;
|
|
120
|
+
host: EmbeddingHostAPI;
|
|
121
|
+
hostCapabilities: HostCapabilities;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Contract for mounting a guest, by loading its entry module to embed
|
|
125
|
+
*/
|
|
126
|
+
export type GuestEmbedModuleBootstrap = {
|
|
127
|
+
capabilities: GuestCapabilities;
|
|
128
|
+
mount: (shadowRoot: ShadowRoot, options: MountOptions) => EmbeddedGuestAPI;
|
|
129
|
+
};
|
|
130
|
+
export {};
|
|
131
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/embedding/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE;QACV;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG;IACjD;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,GACpB;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,YAAY,CAAC;IAC1B,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC5B,GACD;IAA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/B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,gBAAgB,CAAC;IACvB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,iBAAiB,CAAC;IAChC,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,KAAK,gBAAgB,CAAC;CAC5E,CAAC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { Toast } from '../toasts';
|
|
2
2
|
import { RFCError, RFCErrorData } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Key in `Toast.meta` under which `toToast` keeps the error data, so the toast
|
|
5
|
+
* can be rebuilt where its component cannot be rendered.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RFC_ERROR_TOAST_META_KEY = "rfcError";
|
|
8
|
+
export type RFCErrorToastMeta = {
|
|
9
|
+
data: RFCErrorData;
|
|
10
|
+
canCopyToClipboard?: boolean;
|
|
11
|
+
serializeErrorForClipboard?: (error: RFCErrorData, headline: string, formatDate: (date: Date) => string) => string;
|
|
12
|
+
};
|
|
3
13
|
export declare const rfcErrors: {
|
|
4
14
|
toToast: ({ headline, rfcError, canCopyToClipboard, serializeErrorForClipboard, }: {
|
|
5
15
|
headline: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rfcErrors/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAmB,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rfcErrors/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAmB,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,YAAY,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0BAA0B,CAAC,EAAE,CAC3B,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,KAC/B,MAAM,CAAC;CACb,CAAC;AAsFF,eAAO,MAAM,SAAS;uFA5EnB;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,QAAQ,CAAC;QACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,0BAA0B,CAAC,EAAE,CAC3B,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,KAC/B,MAAM,CAAC;KACb,KAAG,KAAK;sBAuCgB,OAAO,KAAG,QAAQ,GAAG,SAAS;;CAgCtD,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Toast } from './types';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<Toast, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
autoRemove: () => any;
|
|
4
3
|
remove: () => any;
|
|
4
|
+
autoRemove: () => any;
|
|
5
5
|
}, string, import('vue').PublicProps, Readonly<Toast> & Readonly<{
|
|
6
|
-
onAutoRemove?: (() => any) | undefined;
|
|
7
6
|
onRemove?: (() => any) | undefined;
|
|
7
|
+
onAutoRemove?: (() => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const _default: typeof __VLS_export;
|
|
10
10
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/product-features",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Package containing composition patterns of KDS Components and KNIME business logic",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"types": "./dist/src/dataTransfer/core.d.ts",
|
|
38
38
|
"import": "./dist/dataTransfer/core.js"
|
|
39
39
|
},
|
|
40
|
+
"./embedding": {
|
|
41
|
+
"types": "./dist/src/embedding/index.d.ts",
|
|
42
|
+
"import": "./dist/embedding.js"
|
|
43
|
+
},
|
|
40
44
|
"./embedding-sdk": {
|
|
41
45
|
"types": "./dist/src/embeddingSDK/index.d.ts",
|
|
42
46
|
"import": "./dist/embeddingSDK.js"
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
"CHANGELOG.md"
|
|
64
68
|
],
|
|
65
69
|
"peerDependencies": {
|
|
66
|
-
"@knime/kds-components": "^13.
|
|
70
|
+
"@knime/kds-components": "^13.1.0",
|
|
67
71
|
"@knime/kds-styles": "^13.0.0",
|
|
68
72
|
"@vueuse/core": "^14.0.0",
|
|
69
73
|
"es-toolkit": "^1.49.0",
|
|
@@ -75,8 +79,8 @@
|
|
|
75
79
|
"consola": "^3.4.2"
|
|
76
80
|
},
|
|
77
81
|
"devDependencies": {
|
|
78
|
-
"@knime/kds-components": "^13.
|
|
79
|
-
"@knime/kds-styles": "^13.
|
|
82
|
+
"@knime/kds-components": "^13.1.0",
|
|
83
|
+
"@knime/kds-styles": "^13.1.0",
|
|
80
84
|
"@storybook/addon-docs": "^10.6.2",
|
|
81
85
|
"@storybook/vue3-vite": "^10.6.2",
|
|
82
86
|
"@vitejs/plugin-vue": "^6.0.8",
|