The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
refactor(sdk): Split embedding-sdk-bundle directory into 3 directories (#62613)
Timofey Kachalov15f7d3d20e14
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSindex 5f84e60242e..5a4601ef5cf 100644--- a/.github/CODEOWNERS+++ b/.github/CODEOWNERS@@ -1,7 +1,9 @@# Before changing this file, make sure you have read how we use it:# https://www.notion.so/metabase/Pull-Request-Code-Review-Guide-374f05df889748b69d67af753f9bc9b8?pvs=4#36550c04ceab40b5a8b8bee6264b090c+enterprise/frontend/src/embedding-sdk-package @metabase/embeddingenterprise/frontend/src/embedding-sdk-bundle @metabase/embedding+enterprise/frontend/src/embedding-sdk-shared @metabase/embeddingfrontend/src/metabase/embedding-sdk @metabase/embeddingfrontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embeddingfrontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embeddingdiff --git a/.github/workflows/e2e-embedding-sdk-compatibility-tests.yml b/.github/workflows/e2e-embedding-sdk-compatibility-tests.ymlindex 54151adf0a5..6eee11ca730 100644--- a/.github/workflows/e2e-embedding-sdk-compatibility-tests.yml+++ b/.github/workflows/e2e-embedding-sdk-compatibility-tests.yml@@ -192,7 +192,7 @@ jobs:# - starts it# - runs its Cypress tests against the local metabase.jar and local @metabase/embedding-sdk-react package.# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.- # For more details see `Sample Apps compatibility with Embedding SDK tests` in `enterprise/frontend/src/embedding-sdk-bundle/dev.md`+ # For more details see `Sample Apps compatibility with Embedding SDK tests` in `enterprise/frontend/src/embedding-sdk-package/dev.md`e2e-sample-apps-tests:needs: [get-build-requirements, get-sample-apps-data, build]strategy:@@ -316,7 +316,7 @@ jobs:# - starts an app# - runs its Cypress tests against the e2e test metabase instance and local @metabase/embedding-sdk-react package.# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.- # For more details see `Embedding SDK integration tests with Host Apps` in `enterprise/frontend/src/embedding-sdk-bundle/dev.md`+ # For more details see `Embedding SDK integration tests with Host Apps` in `enterprise/frontend/src/embedding-sdk-package/dev.md`e2e-host-apps-tests:needs: [get-build-requirements, build]strategy:diff --git a/.github/workflows/embedding-sdk.yml b/.github/workflows/embedding-sdk.ymlindex ddc4b3083b5..9abb7a42632 100644--- a/.github/workflows/embedding-sdk.yml+++ b/.github/workflows/embedding-sdk.yml@@ -137,7 +137,7 @@ jobs:if: ${{ steps.docs-generation.outcome == 'failure' }}run: exit 1- # See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk-bundle/dev.md`+ # See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk-package/dev.md`sdk-e2e-tests:name: "SDK e2e tests"uses: ./.github/workflows/e2e-component-tests-embedding-sdk.ymldiff --git a/.github/workflows/release-embedding-sdk.yml b/.github/workflows/release-embedding-sdk.ymlindex 6b7464fe399..6a7faf5e389 100644--- a/.github/workflows/release-embedding-sdk.yml+++ b/.github/workflows/release-embedding-sdk.yml@@ -187,7 +187,7 @@ jobs:- name: Get current SDK versionid: current-sdk-versionrun: |- VERSION=$(jq -r .version ./enterprise/frontend/src/embedding-sdk-bundle/package.template.json)+ VERSION=$(jq -r .version ./enterprise/frontend/src/embedding-sdk-package/package.template.json)echo "sdk_current_version=$VERSION" >> $GITHUB_OUTPUT- name: Get next SDK patch versiondiff --git a/.storybook-sdk/main.js b/.storybook-sdk/main.jsindex bdb1c637e1a..bf9ff996289 100644--- a/.storybook-sdk/main.js+++ b/.storybook-sdk/main.js@@ -11,7 +11,9 @@ const { isEmbeddingSdkPackageInstalled, embeddingSdkPackageVersion } =resolveEmbeddingSdkPackage();module.exports = {- stories: ["../enterprise/frontend/src/embedding-sdk-bundle/**/*.stories.tsx"],+ stories: [+ "../enterprise/frontend/src/embedding-sdk-{package,bundle,shared}/**/*.stories.tsx",+ ],staticDirs: ["../resources/frontend_client", "./msw-public"],addons: ["@storybook/addon-webpack5-compiler-babel",@@ -57,8 +59,8 @@ module.exports = {alias: {...appConfig.resolve.alias,...(isEmbeddingSdkPackageInstalled && {- // $ means that only exact "embedding-sdk" imports will be rerouted, all nested embedding-sdk/* will still be resolved locally- "embedding-sdk-bundle$": require.resolve(+ // $ means that only exact "embedding-sdk-package" imports will be rerouted, all nested embedding-sdk-package/* will still be resolved locally+ "embedding-sdk-package$": require.resolve("@metabase/embedding-sdk-react",),}),@@ -91,7 +93,7 @@ function resolveEmbeddingSdkPackage() {} catch (err) {const sdkPackageTemplateJson = fs.readFileSync(path.resolve(- "./enterprise/frontend/src/embedding-sdk-bundle/package.template.json",+ "./enterprise/frontend/src/embedding-sdk-package/package.template.json",),"utf-8",);diff --git a/bin/embedding-sdk/fixup-types-after-compilation.js b/bin/embedding-sdk/fixup-types-after-compilation.jsindex 9267a5525d7..21a0df92e76 100644--- a/bin/embedding-sdk/fixup-types-after-compilation.js+++ b/bin/embedding-sdk/fixup-types-after-compilation.js@@ -19,13 +19,15 @@ const REPLACES_MAP = {"metabase-lib": "frontend/src/metabase-lib","metabase-types": "frontend/src/metabase-types",metabase: "frontend/src/metabase",+ "embedding-sdk-package": "enterprise/frontend/src/embedding-sdk-package","embedding-sdk-bundle": "enterprise/frontend/src/embedding-sdk-bundle",+ "embedding-sdk-shared": "enterprise/frontend/src/embedding-sdk-shared",cljs: "target/cljs_release",};const API_EXTRACTOR_CONFIG_PATH = path.join(__dirname,- "../../enterprise/frontend/src/embedding-sdk-bundle/embedding-sdk-api-extractor.json",+ "../../enterprise/frontend/src/embedding-sdk-package/embedding-sdk-api-extractor.json",);const getLogger = (prefix) => {@@ -131,7 +133,7 @@ const generateDtsRollup = () => {const dtsRollupEntryPointPath = path.resolve(path.join(__dirname,- "../../resources/embedding-sdk/dist/enterprise/frontend/src/embedding-sdk-bundle/index.d.ts",+ "../../resources/embedding-sdk/dist/enterprise/frontend/src/embedding-sdk-package/index.d.ts",),);const dtsRollupEntryPointPathExist = fs.existsSync(dtsRollupEntryPointPath);diff --git a/bin/embedding-sdk/generate-sdk-package-files.js b/bin/embedding-sdk/generate-sdk-package-files.jsindex 5e0750c9bcc..a8a7bf75467 100644--- a/bin/embedding-sdk/generate-sdk-package-files.js+++ b/bin/embedding-sdk/generate-sdk-package-files.js@@ -36,7 +36,7 @@ function generateSdkPackage() {const sdkPackageTemplateJson = fs.readFileSync(path.resolve(- "./enterprise/frontend/src/embedding-sdk-bundle/package.template.json",+ "./enterprise/frontend/src/embedding-sdk-package/package.template.json",),"utf-8",);@@ -87,7 +87,7 @@ if (!fs.existsSync(SDK_DIST_DIR)) {generateSdkPackage();copyFileToOutput("LICENSE.txt");-copyFileToOutput("frontend/src/embedding-sdk-bundle/README.md", "README.md");+copyFileToOutput("frontend/src/embedding-sdk-package/README.md", "README.md");copyFileToOutput("frontend/src/embedding-sdk-bundle/CHANGELOG.md","CHANGELOG.md",diff --git a/bin/embedding-sdk/release_utils.bash b/bin/embedding-sdk/release_utils.bashindex e0cf110974d..776cf857ee4 100755--- a/bin/embedding-sdk/release_utils.bash+++ b/bin/embedding-sdk/release_utils.bash@@ -1,11 +1,11 @@#!/bin/bashfunction update_readme() {- sed -i -E 's|(embedding-sdk-)[0-9.]+|\1'"$1"'|' enterprise/frontend/src/embedding-sdk-bundle/README.md- sed -i -E 's|(http://downloads.metabase.com/sdk/v)[0-9.]+|\1'"$1"'|' enterprise/frontend/src/embedding-sdk-bundle/README.md+ sed -i -E 's|(embedding-sdk-)[0-9.]+|\1'"$1"'|' enterprise/frontend/src/embedding-sdk-package/README.md+ sed -i -E 's|(http://downloads.metabase.com/sdk/v)[0-9.]+|\1'"$1"'|' enterprise/frontend/src/embedding-sdk-package/README.md}function update_package_json_template() {- sed -i -E 's/("version": ").*"/\1'"$1"'"/' enterprise/frontend/src/embedding-sdk-bundle/package.template.json+ sed -i -E 's/("version": ").*"/\1'"$1"'"/' enterprise/frontend/src/embedding-sdk-package/package.template.json}$1 $2diff --git a/bin/embedding-sdk/type-check-embedding-sdk-cli-snippets.sh b/bin/embedding-sdk/type-check-embedding-sdk-cli-snippets.shindex 17dbf3aed24..d6450465d54 100755--- a/bin/embedding-sdk/type-check-embedding-sdk-cli-snippets.sh+++ b/bin/embedding-sdk/type-check-embedding-sdk-cli-snippets.sh@@ -1,19 +1,19 @@#! /usr/bin/env bashfunction prepare_files() {- tsx ./enterprise/frontend/src/embedding-sdk-bundle/bin/generate-cli-snippets-for-testing.ts+ tsx ./enterprise/frontend/src/embedding-sdk-package/bin/generate-cli-snippets-for-testing.ts}function install_dependencies() {- yarn --cwd ./enterprise/frontend/src/embedding-sdk-bundle/cli-snippets-tmp/express-server install --frozen-lockfile+ yarn --cwd ./enterprise/frontend/src/embedding-sdk-package/cli-snippets-tmp/express-server install --frozen-lockfile}function type_check() {- tsc --project ./enterprise/frontend/src/embedding-sdk-bundle/tsconfig.cli-snippets.json+ tsc --project ./enterprise/frontend/src/embedding-sdk-package/tsconfig.cli-snippets.json}function cleanup_files() {- rm -rf ./enterprise/frontend/src/embedding-sdk-bundle/cli-snippets-tmp+ rm -rf ./enterprise/frontend/src/embedding-sdk-package/cli-snippets-tmp}cleanup_filesdiff --git a/docs/developers-guide/e2e-tests.md b/docs/developers-guide/e2e-tests.mdindex e6dbadcb929..903389602f4 100644--- a/docs/developers-guide/e2e-tests.md+++ b/docs/developers-guide/e2e-tests.md@@ -190,7 +190,7 @@ Cypress._.times(N, () => {### Embedding SDK tests-See [sdk docs about e2e](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk-bundle/dev.md)+See [sdk docs about e2e](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk-package/dev.md)## DB Snapshotsdiff --git a/e2e/.eslintrc b/e2e/.eslintrcindex c9fecbdc275..9b820a06f3c 100644--- a/e2e/.eslintrc+++ b/e2e/.eslintrc@@ -33,8 +33,8 @@"patterns": [{"group": [- "**/enterprise/frontend/src/embedding-sdk-bundle",- "**/enterprise/frontend/src/embedding-sdk-bundle/*"+ "**/enterprise/frontend/src/embedding-sdk-package",+ "**/enterprise/frontend/src/embedding-sdk-package/*"],"message": "Please use SDK package name - '@metabase/embedding-sdk-react'"}diff --git a/e2e/tsconfig.json b/e2e/tsconfig.jsonindex aaaaa65616d..3f5264ca9e5 100644--- a/e2e/tsconfig.json+++ b/e2e/tsconfig.json@@ -8,11 +8,11 @@"@testing-library/cypress","cypress-real-events","@cypress/grep",- "../enterprise/frontend/src/embedding-sdk-bundle/types/globalTypes.d.ts"+ "../enterprise/frontend/src/embedding-sdk-shared/types/globals.d.ts"],"paths": {"e2e/*": ["./*"],- "@metabase/embedding-sdk-react": ["../enterprise/frontend/src/embedding-sdk-bundle/index.ts"],+ "@metabase/embedding-sdk-react": ["../enterprise/frontend/src/embedding-sdk-package/index.ts"],"*": ["../frontend/src/*"]}},diff --git a/enterprise/frontend/.eslintrc b/enterprise/frontend/.eslintrcdeleted file mode 100644index 6757c309ab9..00000000000--- a/enterprise/frontend/.eslintrc+++ /dev/null@@ -1,46 +0,0 @@-{- "rules": {- // Note: adding this rule to a eslint config file in a subfolder will remove- // *not* carry over the restricted imports from parent folders, you will- // need to copy them over- "no-restricted-imports": [- "error",- {- "patterns": ["cljs/metabase.lib*"],- "paths": [- {- "name": "@mantine/core",- "message": "Please import from `metabase/ui` instead.",- },- {- "name": "moment",- "message": "Moment is deprecated, please use dayjs",- },- {- "name": "moment-timezone",- "message": "Moment is deprecated, please use dayjs",- },- {- "name": "@storybook/test",- "message": "Please use `testing-library/react` or `@testing-library/user-event`",- },- {- "name": "react-redux",- "importNames": ["useSelector", "useDispatch", "connect"],- "message": "Please import from `metabase/lib/redux` instead.",- },- ],- },- ],- "ttag/no-module-declaration": 2,- },- "overrides": [- {- "files": ["**/*.stories.tsx"],- "rules": {- "import/no-default-export": 0,- "no-restricted-imports": 0,- },- },- ],-}diff --git a/enterprise/frontend/src/.eslintrc.js b/enterprise/frontend/src/.eslintrc.jsnew file mode 100644index 00000000000..be6e4fa2460--- /dev/null+++ b/enterprise/frontend/src/.eslintrc.js@@ -0,0 +1,100 @@+/* eslint-disable no-undef,import/no-commonjs */+const path = require("path");++const baseRestrictredConfig = {+ patterns: ["cljs/metabase.lib*"],+ paths: [+ {+ name: "@mantine/core",+ message: "Please import from `metabase/ui` instead.",+ },+ {+ name: "moment",+ message: "Moment is deprecated, please use dayjs",+ },+ {+ name: "moment-timezone",+ message: "Moment is deprecated, please use dayjs",+ },+ {+ name: "@storybook/test",+ message:+ "Please use `testing-library/react` or `@testing-library/user-event`",+ },+ {+ name: "react-redux",+ importNames: ["useSelector", "useDispatch", "connect"],+ message: 'Please use "useSdkSelector", "useSdkDispatch"',+ },+ ],+};++module.exports = {+ settings: {+ "import/resolver": {+ webpack: {+ config: path.resolve(+ __dirname,+ "../../../rspack.embedding-sdk-bundle.config.js",+ ),+ typescript: true,+ },+ },+ },+ rules: {+ // Note: adding this rule to a eslint config file in a subfolder will remove+ // *not* carry over the restricted imports from parent folders, you will+ // need to copy them over+ "no-restricted-imports": ["error", baseRestrictredConfig],+ "ttag/no-module-declaration": 2,+ },+ overrides: [+ {+ files: ["embedding-sdk-{package,bundle,shared}/**/*.{ts,tsx,js,jsx}"],+ rules: {+ "no-restricted-imports": [+ "error",+ {+ ...baseRestrictredConfig,+ paths: [+ ...baseRestrictredConfig.paths,+ {+ name: "metabase/lib/redux",+ importNames: ["useStore", "useDispatch"],+ message: 'Please use "useSdkStore", "useSdkDispatch"',+ },+ ],+ },+ ],+ },+ },+ {+ files: ["**/*.stories.tsx"],+ rules: {+ "import/no-default-export": 0,+ "no-restricted-imports": 0,+ },+ },+ {+ files: ["embedding-sdk-{package,shared}/**/*.{ts,tsx,js,jsx}"],+ excludedFiles: [+ "embedding-sdk-package/{bin,cli}/**/*.{ts,tsx,js,jsx}",+ "**/jest/**",+ "**/test/**",+ "**/*.spec.{ts,tsx,js,jsx}",+ "**/*.stories.{ts,tsx,js,jsx}",+ ],+ rules: {+ "no-external-references-for-sdk-package-code": [+ "error",+ {+ allowedPaths: [+ path.join(__dirname, "embedding-sdk-package"),+ path.join(__dirname, "embedding-sdk-shared"),+ ],+ },+ ],+ },+ },+ ],+};diff --git a/enterprise/frontend/src/embedding-sdk-bundle/.eslintrc.js b/enterprise/frontend/src/embedding-sdk-bundle/.eslintrc.jsdeleted file mode 100644index 2a6eea020c1..00000000000--- a/enterprise/frontend/src/embedding-sdk-bundle/.eslintrc.js+++ /dev/null@@ -1,79 +0,0 @@-/* eslint-disable no-undef,import/no-commonjs */-const path = require("path");--module.exports = {- settings: {- "import/resolver": {- webpack: {- config: path.resolve(- __dirname,- "../../../../rspack.embedding-sdk-bundle.config.js",- ),- typescript: true,- },- },- },- rules: {- // Note: adding this rule to a eslint config file in a subfolder will remove- // *not* carry over the restricted imports from parent folders, you will- // need to copy them over- "no-restricted-imports": [- "error",- {- paths: [- {- name: "@mantine/core",- message: "Please import from `metabase/ui` instead.",- },- {- name: "moment",- message: "Moment is deprecated, please use dayjs",- },- {- name: "moment-timezone",- message: "Moment is deprecated, please use dayjs",- },- {- name: "@storybook/test",- message:- "Please use `testing-library/react` or `@testing-library/user-event`",- },- {- name: "react-redux",- importNames: ["useSelector", "useDispatch", "connect"],- message: 'Please use "useSdkSelector", "useSdkDispatch"',- },- {- name: "metabase/lib/redux",- importNames: ["useStore", "useDispatch"],- message: 'Please use "useSdkStore", "useSdkDispatch"',- },- ],- },- ],- },- overrides: [- {- files: [- "sdk-package/**/*.{ts,tsx,js,jsx}",- "sdk-shared/**/*.{ts,tsx,js,jsx}",- ],- excludedFiles: [- "**/test/**",- "**/*.spec.{ts,tsx,js,jsx}",- "**/*.stories.{ts,tsx,js,jsx}",- ],- rules: {- "no-external-references-for-sdk-package-code": [- "error",- {- allowedPaths: [- path.join(__dirname, "sdk-package"),- path.join(__dirname, "sdk-shared"),- ],- },- ],- },- },- ],-};diff --git a/enterprise/frontend/src/embedding-sdk-bundle/bundle.ts b/enterprise/frontend/src/embedding-sdk-bundle/bundle.tsdeleted file mode 100644index 4edd67ed522..00000000000--- a/enterprise/frontend/src/embedding-sdk-bundle/bundle.ts+++ /dev/null@@ -1,71 +0,0 @@-/* eslint-disable import/order */--import { EMBEDDING_SDK_CONFIG } from "metabase/embedding-sdk/config";--// Enable SDK mode as we are in the SDK bundle-// This applies to SDK derivatives such as new iframe embedding.-EMBEDDING_SDK_CONFIG.isEmbeddingSdk = true;--// Import the embedding SDK vendors side-effects-import "metabase/embedding-sdk/vendors-side-effects";--// Import the EE plugins required by the embedding sdk.-import "sdk-ee-plugins";--// Imports which are only applicable to the embedding sdk, and not the new iframe embedding.-import "sdk-specific-imports";--import type { MetabaseEmbeddingSdkBundleExports } from "./types/sdk-bundle";--import { CollectionBrowser } from "./components/public/CollectionBrowser";-import { CreateDashboardModal } from "./components/public/CreateDashboardModal";-import { CreateQuestion } from "./components/public/CreateQuestion";-import { InteractiveQuestion } from "./components/public/InteractiveQuestion";-import { ComponentProvider } from "./components/public/ComponentProvider";-import { MetabotQuestion } from "./components/public/MetabotQuestion";-import { StaticQuestion } from "./components/public/StaticQuestion";-import {- EditableDashboard,- InteractiveDashboard,- StaticDashboard,-} from "./components/public/dashboard";-import { SdkDebugInfo } from "./components/public/debug/SdkDebugInfo";-import { getApplicationName } from "metabase/selectors/whitelabel";-import { getSdkStore } from "./store/index";-import {- getAvailableFonts,- getLoginStatus,-} from "embedding-sdk-bundle/store/selectors";-import { getUser } from "metabase/selectors/user";-import { useInitData } from "./hooks/private/use-init-data";-import { useLogVersionInfo } from "embedding-sdk-bundle/hooks/private/use-log-version-info";-import { createDashboard } from "embedding-sdk-bundle/lib/create-dashboard";--/**- * IMPORTANT!- * Any rename/removal change for object is a breaking change between the SDK Bundle and the SDK NPM package,- * and should be done via the deprecation of the field first.- */-const sdkBundleExports: MetabaseEmbeddingSdkBundleExports = {- CollectionBrowser,- CreateDashboardModal,- CreateQuestion,- EditableDashboard,- InteractiveDashboard,- InteractiveQuestion,- ComponentProvider,- MetabotQuestion,- SdkDebugInfo,- StaticDashboard,- StaticQuestion,- getSdkStore,- createDashboard,- getApplicationName,- getAvailableFonts,- getLoginStatus,- getUser,- useInitData,- useLogVersionInfo,-};--window.METABASE_EMBEDDING_SDK_BUNDLE = sdkBundleExports;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/components/private/SdkThemeProvider.tsx b/enterprise/frontend/src/embedding-sdk-bundle/components/private/SdkThemeProvider.tsxindex d26e31c1d05..16f5eb544a5 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/components/private/SdkThemeProvider.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/components/private/SdkThemeProvider.tsx@@ -3,8 +3,8 @@ import { useContext, useId, useMemo } from "react";import { DEFAULT_FONT } from "embedding-sdk-bundle/config";import { getEmbeddingThemeOverride } from "embedding-sdk-bundle/lib/theme";-import { EnsureSingleInstance } from "embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";import type { MetabaseTheme } from "embedding-sdk-bundle/types/ui";+import { EnsureSingleInstance } from "embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";import { setGlobalEmbeddingColors } from "metabase/embedding-sdk/theme/embedding-color-palette";import { useSelector } from "metabase/lib/redux";import { getSettings } from "metabase/selectors/settings";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/components/public/ComponentProvider/ComponentProvider.tsx b/enterprise/frontend/src/embedding-sdk-bundle/components/public/ComponentProvider/ComponentProvider.tsxindex d3e9c72f48a..8eb11ebd7c3 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/components/public/ComponentProvider/ComponentProvider.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/components/public/ComponentProvider/ComponentProvider.tsx@@ -4,7 +4,6 @@ import { type JSX, memo, useEffect, useId, useRef } from "react";import { SdkThemeProvider } from "embedding-sdk-bundle/components/private/SdkThemeProvider";import { SdkIncompatibilityWithInstanceBanner } from "embedding-sdk-bundle/components/private/SdkVersionCompatibilityHandler/SdkIncompatibilityWithInstanceBanner";import { useInitDataInternal } from "embedding-sdk-bundle/hooks/private/use-init-data";-import { EnsureSingleInstance } from "embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";import { getSdkStore } from "embedding-sdk-bundle/store";import {setErrorComponent,@@ -14,6 +13,7 @@ import {} from "embedding-sdk-bundle/store/reducer";import type { SdkStore } from "embedding-sdk-bundle/store/types";import type { MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";+import { EnsureSingleInstance } from "embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";import { useInstanceLocale } from "metabase/common/hooks/use-instance-locale";import { MetabaseReduxProvider } from "metabase/lib/redux";import { LocaleProvider } from "metabase/public/LocaleProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/conventional-changelog-config.js b/enterprise/frontend/src/embedding-sdk-bundle/conventional-changelog-config.jsindex 7778829cc39..8dd4550c589 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/conventional-changelog-config.js+++ b/enterprise/frontend/src/embedding-sdk-bundle/conventional-changelog-config.js@@ -6,7 +6,7 @@ module.exports = {options: {preset: "angular",pkg: {- path: "enterprise/frontend/src/embedding-sdk-bundle/package.template.json",+ path: "enterprise/frontend/src/embedding-sdk-package/package.template.json",},tagPrefix: "embedding-sdk-",transform: function (commit, cb) {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-init-data/use-init-data-internal.ts b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-init-data/use-init-data-internal.tsindex 15de9e40a89..572cff44ab5 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-init-data/use-init-data-internal.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-init-data/use-init-data-internal.ts@@ -3,9 +3,6 @@ import { useMount } from "react-use";import _ from "underscore";import { getEmbeddingSdkPackageBuildData } from "embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data";-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";import { initAuth } from "embedding-sdk-bundle/store/auth";import {setFetchRefreshTokenFn,@@ -15,6 +12,9 @@ import {import { getFetchRefreshTokenFn } from "embedding-sdk-bundle/store/selectors";import type { SdkStore } from "embedding-sdk-bundle/store/types";import type { MetabaseAuthConfig } from "embedding-sdk-bundle/types";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";import { EMBEDDING_SDK_CONFIG } from "metabase/embedding-sdk/config";import api from "metabase/lib/api";import registerVisualizations from "metabase/visualizations/register";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.ts b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.tsindex 66704258d90..0784cbdc171 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.ts@@ -2,9 +2,9 @@ import { useEffect } from "react";import { getEmbeddingSdkPackageBuildData } from "embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data";import { isSdkPackageCompatibleWithSdkBundle } from "embedding-sdk-bundle/lib/version-utils";-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";import { getMetabaseInstanceVersion } from "embedding-sdk-bundle/store/selectors";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";export const useLogVersionInfo = () => {const {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.unit.spec.tsxindex af93c6604e1..ed833d7a37b 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.unit.spec.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/hooks/private/use-log-version-info/use-log-version-info.unit.spec.tsx@@ -1,11 +1,11 @@import { renderHook } from "@testing-library/react";-import "embedding-sdk-bundle/bundle";+import "embedding-sdk-bundle";import { useLogVersionInfo } from "embedding-sdk-bundle/hooks/private/use-log-version-info";import { getEmbeddingSdkPackageBuildData } from "embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data";import { getMetabaseInstanceVersion } from "embedding-sdk-bundle/store/selectors";-jest.mock("embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector", () => ({+jest.mock("embedding-sdk-shared/hooks/use-lazy-selector", () => ({useLazySelector: jest.fn((selector) => selector()),}));jest.mock(diff --git a/enterprise/frontend/src/embedding-sdk-bundle/index.ts b/enterprise/frontend/src/embedding-sdk-bundle/index.tsindex 59f226ded29..4edd67ed522 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/index.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/index.ts@@ -1,129 +1,71 @@+/* eslint-disable import/order */+import { EMBEDDING_SDK_CONFIG } from "metabase/embedding-sdk/config";-import { defineEmbeddingSdkPackageBuildInfo } from "metabase/embedding-sdk/lib/define-embedding-sdk-package-build-info";-import { defineGlobalDependencies } from "metabase/embedding-sdk/lib/define-global-dependencies";-// Enable SDK mode as we are in the SDK package+// Enable SDK mode as we are in the SDK bundle+// This applies to SDK derivatives such as new iframe embedding.EMBEDDING_SDK_CONFIG.isEmbeddingSdk = true;-defineEmbeddingSdkPackageBuildInfo();-defineGlobalDependencies();+// Import the embedding SDK vendors side-effects+import "metabase/embedding-sdk/vendors-side-effects";-export { CollectionBrowser } from "embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser";-export { CreateQuestion } from "embedding-sdk-bundle/sdk-package/components/public/CreateQuestion";-export { CreateDashboardModal } from "embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal";-export { EditableDashboard } from "embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard";-export { InteractiveDashboard } from "embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard";-export { StaticDashboard } from "embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard";-export { InteractiveQuestion } from "embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion";-export { StaticQuestion } from "embedding-sdk-bundle/sdk-package/components/public/StaticQuestion";-export { MetabaseProvider } from "embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider";-export { MetabotQuestion } from "embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion";-export * from "embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo";+// Import the EE plugins required by the embedding sdk.+import "sdk-ee-plugins";-export { useApplicationName } from "embedding-sdk-bundle/sdk-package/hooks/public/use-application-name";-export { useAvailableFonts } from "embedding-sdk-bundle/sdk-package/hooks/public/use-available-fonts";-export { useCurrentUser } from "embedding-sdk-bundle/sdk-package/hooks/public/use-current-user";-export { useCreateDashboardApi } from "embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api";-export { useMetabaseAuthStatus } from "embedding-sdk-bundle/sdk-package/hooks/public/use-metabase-auth-status";+// Imports which are only applicable to the embedding sdk, and not the new iframe embedding.+import "sdk-specific-imports";-export { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";-export { defineMetabaseTheme } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-theme";+import type { MetabaseEmbeddingSdkBundleExports } from "./types/sdk-bundle";-export {- type CollectionBrowserProps,- type CollectionBrowserListColumns,-} from "./components/public/CollectionBrowser";-export { type CreateDashboardModalProps } from "./components/public/CreateDashboardModal";-export { type CreateQuestionProps } from "./components/public/CreateQuestion";-export type {- StaticDashboardProps,- InteractiveDashboardProps,- EditableDashboardProps,+import { CollectionBrowser } from "./components/public/CollectionBrowser";+import { CreateDashboardModal } from "./components/public/CreateDashboardModal";+import { CreateQuestion } from "./components/public/CreateQuestion";+import { InteractiveQuestion } from "./components/public/InteractiveQuestion";+import { ComponentProvider } from "./components/public/ComponentProvider";+import { MetabotQuestion } from "./components/public/MetabotQuestion";+import { StaticQuestion } from "./components/public/StaticQuestion";+import {+ EditableDashboard,+ InteractiveDashboard,+ StaticDashboard,} from "./components/public/dashboard";-export {- type SdkQuestionProps,- type InteractiveQuestionBackButtonProps,- type InteractiveQuestionBreakoutDropdownProps,- type InteractiveQuestionChartTypeDropdownProps,- type InteractiveQuestionChartTypeSelectorProps,- type InteractiveQuestionDownloadWidgetProps,- type InteractiveQuestionDownloadWidgetDropdownProps,- type InteractiveQuestionEditorProps,- type InteractiveQuestionEditorButtonProps,- type InteractiveQuestionFilterProps,- type InteractiveQuestionFilterDropdownProps,- type InteractiveQuestionQuestionSettingsProps,- type InteractiveQuestionQuestionSettingsDropdownProps,- type InteractiveQuestionQuestionVisualizationProps,- type InteractiveQuestionResetButtonProps,- type InteractiveQuestionSaveButtonProps,- type InteractiveQuestionSaveQuestionFormProps,- type InteractiveQuestionSummarizeDropdownProps,- type InteractiveQuestionTitleProps,- type DrillThroughQuestionProps,-} from "./components/public/SdkQuestion";-export {- type InteractiveQuestionComponents,- type InteractiveQuestionProps,-} from "./components/public/InteractiveQuestion";-export {- type StaticQuestionProps,- type StaticQuestionComponents,-} from "./components/public/StaticQuestion";-export { type MetabaseProviderProps } from "./types/metabase-provider";--export type {- CustomDashboardCardMenuItem,- DashCardMenuItem,- DashboardCardCustomMenuItem,- DashboardCardMenuCustomElement,- DashboardCardMenu,-} from "metabase/dashboard/components/DashCard/DashCardMenu/dashcard-menu";--export type {- ButtonProps,- ChartColor,- CreateDashboardValues,- EntityTypeFilterKeys,- LoginStatus,- MetabaseAuthConfig,- MetabaseAuthConfigWithApiKey,- MetabaseAuthConfigWithJwt,- MetabaseAuthConfigWithSaml,- MetabaseClickActionPluginsConfig,- MetabaseColors,- MetabaseClickAction,- MetabaseComponentTheme,- MetabaseCollection,- MetabaseCollectionItem,- MetabaseDataPointObject,- MetabaseDashboard,- MetabaseDashboardPluginsConfig,- MetabaseFontFamily,- MetabasePluginsConfig,- MetabaseQuestion,- MetabaseTheme,- MetabaseUser,- SdkCollectionId,- SdkDashboardId,- SdkDashboardLoadEvent,- SdkEntityId,- SdkErrorComponent,- SdkErrorComponentProps,- SdkEventHandlersConfig,- SdkQuestionId,- SdkQuestionTitleProps,- SdkUserId,- SqlParameterValues,-} from "./types";--export type {- UserBackendJwtResponse,- MetabaseFetchRequestTokenFn,- MetabaseEmbeddingSessionToken,-} from "./types/refresh-token";+import { SdkDebugInfo } from "./components/public/debug/SdkDebugInfo";+import { getApplicationName } from "metabase/selectors/whitelabel";+import { getSdkStore } from "./store/index";+import {+ getAvailableFonts,+ getLoginStatus,+} from "embedding-sdk-bundle/store/selectors";+import { getUser } from "metabase/selectors/user";+import { useInitData } from "./hooks/private/use-init-data";+import { useLogVersionInfo } from "embedding-sdk-bundle/hooks/private/use-log-version-info";+import { createDashboard } from "embedding-sdk-bundle/lib/create-dashboard";-export type { EmbeddingEntityType } from "metabase-types/store/embedding-data-picker";+/**+ * IMPORTANT!+ * Any rename/removal change for object is a breaking change between the SDK Bundle and the SDK NPM package,+ * and should be done via the deprecation of the field first.+ */+const sdkBundleExports: MetabaseEmbeddingSdkBundleExports = {+ CollectionBrowser,+ CreateDashboardModal,+ CreateQuestion,+ EditableDashboard,+ InteractiveDashboard,+ InteractiveQuestion,+ ComponentProvider,+ MetabotQuestion,+ SdkDebugInfo,+ StaticDashboard,+ StaticQuestion,+ getSdkStore,+ createDashboard,+ getApplicationName,+ getAvailableFonts,+ getLoginStatus,+ getUser,+ useInitData,+ useLogVersionInfo,+};-export type { ParameterValues } from "metabase/embedding-sdk/types/dashboard";-export type { IconName } from "metabase/embedding-sdk/types/icon";+window.METABASE_EMBEDDING_SDK_BUNDLE = sdkBundleExports;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/lib/create-dashboard.ts b/enterprise/frontend/src/embedding-sdk-bundle/lib/create-dashboard.tsindex 524b3efc634..07fda2d6e57 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/lib/create-dashboard.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/lib/create-dashboard.ts@@ -1,9 +1,9 @@+import { getCollectionNumericIdFromReference } from "embedding-sdk-bundle/store/collections";+import type { SdkStore } from "embedding-sdk-bundle/store/types";import type {CreateDashboardValues,MetabaseDashboard,-} from "embedding-sdk-bundle";-import { getCollectionNumericIdFromReference } from "embedding-sdk-bundle/store/collections";-import type { SdkStore } from "embedding-sdk-bundle/store/types";+} from "embedding-sdk-package";import { createDashboard as createDashboardMutation } from "metabase/api/dashboard";export const createDashboard =diff --git a/enterprise/frontend/src/embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data.ts b/enterprise/frontend/src/embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data.tsindex fd68daf9de9..9eeaf731280 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/lib/get-embedding-sdk-package-build-data.ts@@ -1,4 +1,4 @@-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { getWindow } from "embedding-sdk-shared/lib/get-window";import type { BuildInfo } from "metabase/embedding-sdk/types/build-info";export const EMBEDDING_SDK_PACKAGE_UNKNOWN_VERSION = "unknown";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/__support__/ui.tsx b/enterprise/frontend/src/embedding-sdk-bundle/test/__support__/ui.tsxindex eac815edcc9..a61381a3a62 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/__support__/ui.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/__support__/ui.tsx@@ -4,11 +4,11 @@ import _ from "underscore";import { getStore } from "__support__/entities-store";import { ComponentProviderInternal } from "embedding-sdk-bundle/components/public/ComponentProvider";-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";import { sdkReducers } from "embedding-sdk-bundle/store";import type { SdkStore, SdkStoreState } from "embedding-sdk-bundle/store/types";import { createMockSdkState } from "embedding-sdk-bundle/test/mocks/state";import type { MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";import { Api } from "metabase/api";import { MetabaseReduxProvider } from "metabase/lib/redux";import type { MantineThemeOverride } from "metabase/ui";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/api-key.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/api-key.unit.spec.tsxindex 29db558062e..4a4f837f581 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/api-key.unit.spec.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/api-key.unit.spec.tsx@@ -1,5 +1,5 @@import { waitForRequest } from "__support__/utils";-import { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";+import { defineMetabaseAuthConfig } from "embedding-sdk-package/lib/public/define-metabase-auth-config";import { MOCK_API_KEY, MOCK_INSTANCE_URL } from "../mocks/sso";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/jwt.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/jwt.unit.spec.tsxindex 0741cba691b..80a6aa837a1 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/jwt.unit.spec.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/jwt.unit.spec.tsx@@ -5,8 +5,8 @@ import { renderWithProviders, waitForLoaderToBeRemoved } from "__support__/ui";import { waitForRequest } from "__support__/utils";import { ComponentProvider } from "embedding-sdk-bundle/components/public/ComponentProvider";import { StaticQuestion } from "embedding-sdk-bundle/components/public/StaticQuestion";-import { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";import type { MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";+import { defineMetabaseAuthConfig } from "embedding-sdk-package/lib/public/define-metabase-auth-config";import {MOCK_INSTANCE_URL,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/saml.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/saml.unit.spec.tsxindex 765ff0b6f54..9948b83ba78 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/saml.unit.spec.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/auth-flow/saml.unit.spec.tsx@@ -5,8 +5,8 @@ import { waitForLoaderToBeRemoved } from "__support__/ui";import { waitForRequest } from "__support__/utils";import { ComponentProvider } from "embedding-sdk-bundle/components/public/ComponentProvider";import { StaticQuestion } from "embedding-sdk-bundle/components/public/StaticQuestion";-import { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";import type { MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";+import { defineMetabaseAuthConfig } from "embedding-sdk-package/lib/public/define-metabase-auth-config";import {MOCK_INSTANCE_URL,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/environment.unit.spec.ts b/enterprise/frontend/src/embedding-sdk-bundle/test/environment.unit.spec.tsindex 3170c2cfb74..7c55af0263d 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/environment.unit.spec.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/environment.unit.spec.ts@@ -10,7 +10,7 @@ describe("SDK environment config", () => {(await import("metabase/embedding-sdk/config")).isEmbeddingSdk(),).toBe(false);- await import("embedding-sdk-bundle");+ await import("embedding-sdk-package");expect((await import("metabase/embedding-sdk/config")).isEmbeddingSdk(),@@ -22,7 +22,7 @@ describe("SDK environment config", () => {(await import("metabase/embedding-sdk/config")).isEmbeddingSdk(),).toBe(false);- await import("embedding-sdk-bundle/bundle");+ await import("embedding-sdk-bundle");expect((await import("metabase/embedding-sdk/config")).isEmbeddingSdk(),diff --git a/enterprise/frontend/src/embedding-sdk-bundle/test/sdk-config-errors/sdk-config-errors.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-bundle/test/sdk-config-errors/sdk-config-errors.unit.spec.tsxindex 9a11a585a6b..dda08967a9a 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/test/sdk-config-errors/sdk-config-errors.unit.spec.tsx+++ b/enterprise/frontend/src/embedding-sdk-bundle/test/sdk-config-errors/sdk-config-errors.unit.spec.tsx@@ -8,8 +8,8 @@ import { waitForLoaderToBeRemoved } from "__support__/ui";import { waitForRequest } from "__support__/utils";import { ComponentProvider } from "embedding-sdk-bundle/components/public/ComponentProvider";import { StaticQuestion } from "embedding-sdk-bundle/components/public/StaticQuestion";-import { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";import type { MetabaseAuthConfig } from "embedding-sdk-bundle/types";+import { defineMetabaseAuthConfig } from "embedding-sdk-package/lib/public/define-metabase-auth-config";import { createMockCard } from "metabase-types/api/mocks";import {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/types/sdk-bundle.ts b/enterprise/frontend/src/embedding-sdk-bundle/types/sdk-bundle.tsindex 1fd5652c5f5..e4246b59c5b 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/types/sdk-bundle.ts+++ b/enterprise/frontend/src/embedding-sdk-bundle/types/sdk-bundle.ts@@ -1,7 +1,3 @@-import type {- CreateDashboardValues,- MetabaseDashboard,-} from "embedding-sdk-bundle";import type { CollectionBrowser } from "embedding-sdk-bundle/components/public/CollectionBrowser";import type { ComponentProvider } from "embedding-sdk-bundle/components/public/ComponentProvider";import type { CreateDashboardModal } from "embedding-sdk-bundle/components/public/CreateDashboardModal";@@ -15,6 +11,10 @@ import type { StaticDashboard } from "embedding-sdk-bundle/components/public/dasimport type { SdkDebugInfo } from "embedding-sdk-bundle/components/public/debug/SdkDebugInfo";import type { SdkStore, SdkStoreState } from "embedding-sdk-bundle/store/types";import type { LoginStatus } from "embedding-sdk-bundle/types/user";+import type {+ CreateDashboardValues,+ MetabaseDashboard,+} from "embedding-sdk-package";import type { User } from "metabase-types/api";type InternalHook = () => void;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/README.md b/enterprise/frontend/src/embedding-sdk-package/README.mdsimilarity index 99%rename from enterprise/frontend/src/embedding-sdk-bundle/README.mdrename to enterprise/frontend/src/embedding-sdk-package/README.mdindex 5157a58d849..53f571b2b18 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/README.md+++ b/enterprise/frontend/src/embedding-sdk-package/README.md@@ -56,4 +56,4 @@ For the current limitations of the SDK, see the [SDK limitations section](https:## Development docs-For developing the SDK, see the [dev docs](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk-bundle/dev.md).+For developing the SDK, see the [dev docs](https://github.com/metabase/metabase/blob/master/enterprise/frontend/src/embedding-sdk-package/dev.md).diff --git a/enterprise/frontend/src/embedding-sdk-bundle/bin/.eslintrc b/enterprise/frontend/src/embedding-sdk-package/bin/.eslintrcsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/bin/.eslintrcrename to enterprise/frontend/src/embedding-sdk-package/bin/.eslintrcdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/bin/generate-cli-snippets-for-testing.ts b/enterprise/frontend/src/embedding-sdk-package/bin/generate-cli-snippets-for-testing.tssimilarity index 91%rename from enterprise/frontend/src/embedding-sdk-bundle/bin/generate-cli-snippets-for-testing.tsrename to enterprise/frontend/src/embedding-sdk-package/bin/generate-cli-snippets-for-testing.tsindex c057d79c729..b336b6202ab 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/bin/generate-cli-snippets-for-testing.ts+++ b/enterprise/frontend/src/embedding-sdk-package/bin/generate-cli-snippets-for-testing.ts@@ -2,13 +2,13 @@import fs from "fs";import path from "path";-import { MOCK_SERVER_PACKAGE_JSON } from "../cli/constants/mock-server-package-json";-import { getExpressServerSnippet } from "../cli/snippets/express-server-snippet";-import { getComponentSnippets } from "../cli/snippets/get-component-snippets";+import { MOCK_SERVER_PACKAGE_JSON } from "embedding-sdk-package/cli/constants/mock-server-package-json";+import { getExpressServerSnippet } from "embedding-sdk-package/cli/snippets/express-server-snippet";+import { getComponentSnippets } from "embedding-sdk-package/cli/snippets/get-component-snippets";import {getNextJsAnalyticsPageSnippet,getNextJsPagesWrapperOrAppWrapperSnippet,-} from "../cli/snippets/nextjs-snippets";+} from "embedding-sdk-package/cli/snippets/nextjs-snippets";function setupOutDir(outDir: string) {fs.mkdirSync(outDir, { recursive: true });diff --git a/enterprise/frontend/src/embedding-sdk-bundle/bin/generate-nextjs-compat.ts b/enterprise/frontend/src/embedding-sdk-package/bin/generate-nextjs-compat.tssimilarity index 93%rename from enterprise/frontend/src/embedding-sdk-bundle/bin/generate-nextjs-compat.tsrename to enterprise/frontend/src/embedding-sdk-package/bin/generate-nextjs-compat.tsindex 22b62e27cf6..993d0ecda19 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/bin/generate-nextjs-compat.ts+++ b/enterprise/frontend/src/embedding-sdk-package/bin/generate-nextjs-compat.ts@@ -1,7 +1,7 @@import fs from "fs";import path from "path";-import { getPublicComponents } from "embedding-sdk-bundle/bin/get-public-components";+import { getPublicComponents } from "embedding-sdk-package/bin/get-public-components";const destinationDir = path.resolve(__dirname,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/bin/get-public-components.ts b/enterprise/frontend/src/embedding-sdk-package/bin/get-public-components.tssimilarity index 88%rename from enterprise/frontend/src/embedding-sdk-bundle/bin/get-public-components.tsrename to enterprise/frontend/src/embedding-sdk-package/bin/get-public-components.tsindex c918aea6468..803f11f0dc2 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/bin/get-public-components.ts+++ b/enterprise/frontend/src/embedding-sdk-package/bin/get-public-components.ts@@ -7,10 +7,10 @@ export type ComponentDefinition = {export function getPublicComponents() {const project = new Project();const sdkPublicIndexSourceFile = project.addSourceFileAtPath(- "enterprise/frontend/src/embedding-sdk-bundle/index.ts",+ "enterprise/frontend/src/embedding-sdk-package/index.ts",);project.addSourceFilesAtPaths(- "enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/**/*{.ts,.tsx}",+ "enterprise/frontend/src/embedding-sdk-package/components/public/**/*{.ts,.tsx}",);const componentForNextJsCompatList: ComponentDefinition[] = [];diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/.eslintrc b/enterprise/frontend/src/embedding-sdk-package/cli/.eslintrcsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/.eslintrcrename to enterprise/frontend/src/embedding-sdk-package/cli/.eslintrcdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/actions/start.ts b/enterprise/frontend/src/embedding-sdk-package/cli/actions/start.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/actions/start.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/actions/start.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/cli.ts b/enterprise/frontend/src/embedding-sdk-package/cli/cli.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/cli.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/cli.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/config.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/config.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/config.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/config.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/database.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/database.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/database.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/database.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/env.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/env.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/env.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/env.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/hardcoded-users.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/hardcoded-users.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/hardcoded-users.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/hardcoded-users.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/messages.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/messages.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/messages.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/messages.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/constants/mock-server-package-json.ts b/enterprise/frontend/src/embedding-sdk-package/cli/constants/mock-server-package-json.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/constants/mock-server-package-json.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/constants/mock-server-package-json.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/run.ts b/enterprise/frontend/src/embedding-sdk-package/cli/run.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/run.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/run.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-css-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-css-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-css-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-css-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-dashboard-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-dashboard-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-dashboard-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-dashboard-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-page-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-page-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-page-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-page-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-provider-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-provider-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/analytics-provider-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/analytics-provider-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/embedding-provider-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/embedding-provider-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/embedding-provider-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/embedding-provider-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/express-server-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/express-server-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/express-server-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/express-server-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/get-component-snippets.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/get-component-snippets.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/get-component-snippets.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/get-component-snippets.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/index.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/index.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/nextjs-snippets.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/nextjs-snippets.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/nextjs-snippets.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/nextjs-snippets.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/theme-switcher-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/theme-switcher-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/theme-switcher-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/theme-switcher-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/user-switcher-snippet.ts b/enterprise/frontend/src/embedding-sdk-package/cli/snippets/user-switcher-snippet.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/snippets/user-switcher-snippet.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/snippets/user-switcher-snippet.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/add-database-connection.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/add-database-connection.tssimilarity index 97%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/add-database-connection.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/add-database-connection.tsindex cefd3e598d9..5d42d4f6c77 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/add-database-connection.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/add-database-connection.ts@@ -1,7 +1,7 @@import { search } from "@inquirer/prompts";import ora from "ora";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";import type { Settings } from "metabase-types/api/settings";import { isEngineKey } from "metabase-types/guards";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/ask-if-has-database.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/ask-if-has-database.tssimilarity index 78%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/ask-if-has-database.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/ask-if-has-database.tsindex dd697d3837b..0409c15e42d 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/ask-if-has-database.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/ask-if-has-database.ts@@ -1,7 +1,7 @@import toggle from "inquirer-toggle";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";-import { printHelperText } from "embedding-sdk-bundle/cli/utils/print";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";+import { printHelperText } from "embedding-sdk-package/cli/utils/print";/*** Asks the user first if they have a database to connect to.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/ask-tenancy-columns.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/ask-tenancy-columns.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/ask-tenancy-columns.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/ask-tenancy-columns.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-docker-container-exist.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-docker-container-exist.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-docker-container-exist.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/check-docker-container-exist.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-docker-running.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-docker-running.tssimilarity index 95%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-docker-running.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/check-docker-running.tsindex f0eed7eb323..05fee25f4c0 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-docker-running.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-docker-running.ts@@ -6,7 +6,7 @@ import { promisify } from "util";import type {CliError,CliStepMethod,-} from "embedding-sdk-bundle/cli/types/cli";+} from "embedding-sdk-package/cli/types/cli";const exec = promisify(execCallback);/**diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-if-react-project.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-if-react-project.tssimilarity index 96%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-if-react-project.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/check-if-react-project.tsindex bf2135653c6..db82dc3209b 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-if-react-project.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-if-react-project.ts@@ -5,7 +5,7 @@ import {MISSING_REACT_DEPENDENCY,PACKAGE_JSON_NOT_FOUND_MESSAGE,UNSUPPORTED_REACT_VERSION,-} from "embedding-sdk-bundle/cli/constants/messages";+} from "embedding-sdk-package/cli/constants/messages";import type { CliStepMethod } from "../types/cli";import {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-sdk-available.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-sdk-available.tssimilarity index 93%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-sdk-available.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/check-sdk-available.tsindex 7f9dab9dbc5..b352c7ba865 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/check-sdk-available.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/check-sdk-available.ts@@ -1,10 +1,11 @@import ora from "ora";import { SDK_PACKAGE_NAME } from "../constants/config";-import { installSdk } from "../steps/install-sdk";import type { CliStepMethod } from "../types/cli";import { getPackageVersions } from "../utils/get-package-version";+import { installSdk } from "./install-sdk";+export const checkSdkAvailable: CliStepMethod = async (state) => {const spinner = ora("Checking if SDK is installed…").start();diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-api-key.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/create-api-key.tssimilarity index 93%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-api-key.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/create-api-key.tsindex ce9a5c922e5..9f74f2410f9 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-api-key.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/create-api-key.ts@@ -1,6 +1,6 @@import ora from "ora";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";export const createApiKey: CliStepMethod = async (state) => {if (!state.instanceUrl || !state.cookie) {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-models-and-xrays.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/create-models-and-xrays.tssimilarity index 95%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-models-and-xrays.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/create-models-and-xrays.tsindex d42e327f104..721b0bc80d0 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/create-models-and-xrays.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/create-models-and-xrays.ts@@ -1,6 +1,6 @@import ora from "ora";-import { createCollection } from "embedding-sdk-bundle/cli/utils/create-collection";+import { createCollection } from "embedding-sdk-package/cli/utils/create-collection";import type { CliStepMethod } from "../types/cli";import type { DashboardInfo } from "../types/dashboard";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-component-files.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-component-files.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-component-files.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-component-files.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-credentials-file.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-credentials-file.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-credentials-file.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-credentials-file.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-credentials.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-credentials.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-credentials.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-credentials.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-express-server-file.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-express-server-file.tssimilarity index 94%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-express-server-file.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-express-server-file.tsindex 729b87620d6..5a6f04f2416 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/generate-express-server-file.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/generate-express-server-file.ts@@ -2,7 +2,7 @@ import fs from "fs/promises";import { input } from "@inquirer/prompts";-import { installMockServerDeps } from "embedding-sdk-bundle/cli/utils/install-mock-server-deps";+import { installMockServerDeps } from "embedding-sdk-package/cli/utils/install-mock-server-deps";import { MOCK_SERVER_PACKAGE_JSON } from "../constants/mock-server-package-json";import { getExpressServerSnippet } from "../snippets";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/index.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/index.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/install-sdk.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/install-sdk.tssimilarity index 91%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/install-sdk.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/install-sdk.tsindex 8fb0b6dd3a2..544c3c5e5fe 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/install-sdk.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/install-sdk.ts@@ -5,13 +5,13 @@ import toggle from "inquirer-toggle";import ora from "ora";import { promisify } from "util";-import { SDK_PACKAGE_NAME } from "embedding-sdk-bundle/cli/constants/config";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import { SDK_PACKAGE_NAME } from "embedding-sdk-package/cli/constants/config";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";import {printEmptyLines,printInfo,printSuccess,-} from "embedding-sdk-bundle/cli/utils/print";+} from "embedding-sdk-package/cli/utils/print";const getInstallCommand = async (packageName: string) => {const manager = await detect();diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/pick-database-tables.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/pick-database-tables.tssimilarity index 98%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/pick-database-tables.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/pick-database-tables.tsindex 1fabe54f2be..0b737450f98 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/pick-database-tables.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/pick-database-tables.ts@@ -1,7 +1,7 @@import { checkbox } from "@inquirer/prompts";import ora from "ora";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";import type { Table, TableId } from "metabase-types/api";import { SAMPLE_DATABASE_SELECTED_TABLES } from "../constants/config";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/poll-metabase-instance.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/poll-metabase-instance.tssimilarity index 93%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/poll-metabase-instance.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/poll-metabase-instance.tsindex 387136bde73..3df4ce91e43 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/poll-metabase-instance.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/poll-metabase-instance.ts@@ -1,6 +1,6 @@import ora from "ora";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";const delay = (duration: number) =>new Promise((resolve) => setTimeout(resolve, duration));diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-embedding-settings.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-embedding-settings.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-embedding-settings.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-embedding-settings.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-license.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-license.tssimilarity index 97%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-license.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-license.tsindex 0e3a2b63101..79332c4298d 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-license.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-license.ts@@ -4,7 +4,7 @@ import toggle from "inquirer-toggle";import open from "open";import ora from "ora";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";import {SETUP_PRO_LICENSE_MESSAGE,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-metabase-instance.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-metabase-instance.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-metabase-instance.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-metabase-instance.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-permission.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-permission.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/setup-permission.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/setup-permission.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/show-metabase-cli-title.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/show-metabase-cli-title.tssimilarity index 86%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/show-metabase-cli-title.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/show-metabase-cli-title.tsindex bf58e928098..29ff3b15d08 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/show-metabase-cli-title.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/show-metabase-cli-title.ts@@ -1,4 +1,4 @@-import { SDK_DOCS_LINK } from "embedding-sdk-bundle/cli/constants/config";+import { SDK_DOCS_LINK } from "embedding-sdk-package/cli/constants/config";import { SHOW_ON_STARTUP_MESSAGE } from "../constants/messages";import type { CliStepMethod } from "../types/cli";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/show-post-setup-steps.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/show-post-setup-steps.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/show-post-setup-steps.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/show-post-setup-steps.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/start-local-metabase-container.ts b/enterprise/frontend/src/embedding-sdk-package/cli/steps/start-local-metabase-container.tssimilarity index 87%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/steps/start-local-metabase-container.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/steps/start-local-metabase-container.tsindex 137cd9cec13..923b80ec3ae 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/steps/start-local-metabase-container.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/steps/start-local-metabase-container.ts@@ -8,12 +8,12 @@ import {CONTAINER_NAME,DEFAULT_PORT,IMAGE_NAME,-} from "embedding-sdk-bundle/cli/constants/config";-import { METABASE_INSTANCE_DEFAULT_ENVS } from "embedding-sdk-bundle/cli/constants/env";-import type { CliStepMethod } from "embedding-sdk-bundle/cli/types/cli";-import { getLocalMetabaseContainer } from "embedding-sdk-bundle/cli/utils/get-local-metabase-container";-import { checkIsPortTaken } from "embedding-sdk-bundle/cli/utils/is-port-taken";-import { printInfo, printSuccess } from "embedding-sdk-bundle/cli/utils/print";+} from "embedding-sdk-package/cli/constants/config";+import { METABASE_INSTANCE_DEFAULT_ENVS } from "embedding-sdk-package/cli/constants/env";+import type { CliStepMethod } from "embedding-sdk-package/cli/types/cli";+import { getLocalMetabaseContainer } from "embedding-sdk-package/cli/utils/get-local-metabase-container";+import { checkIsPortTaken } from "embedding-sdk-package/cli/utils/is-port-taken";+import { printInfo, printSuccess } from "embedding-sdk-package/cli/utils/print";const messageContainerRunning = (port: number) => `Your local Metabase instance is already running on port ${port}.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/types/cli.ts b/enterprise/frontend/src/embedding-sdk-package/cli/types/cli.tssimilarity index 93%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/types/cli.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/types/cli.tsindex 5fc24c4115d..3e8143882d6 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/types/cli.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/types/cli.ts@@ -1,7 +1,7 @@-import type { CLI_STEPS } from "embedding-sdk-bundle/cli/run";+import type { CLI_STEPS } from "embedding-sdk-package/cli/run";import type { Settings, Table } from "metabase-types/api";-import type { DashboardInfo } from "../types/dashboard";+import type { DashboardInfo } from "./dashboard";export type CliState = Partial<{port: number;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/types/dashboard.ts b/enterprise/frontend/src/embedding-sdk-package/cli/types/dashboard.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/types/dashboard.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/types/dashboard.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/add-database-connection.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/add-database-connection.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/add-database-connection.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/add-database-connection.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/add-file-to-git-ignore.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/add-file-to-git-ignore.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/add-file-to-git-ignore.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/add-file-to-git-ignore.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/ask-for-db-connection-info.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/ask-for-db-connection-info.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/ask-for-db-connection-info.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/ask-for-db-connection-info.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/check-typescript-project.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/check-typescript-project.tssimilarity index 91%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/check-typescript-project.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/check-typescript-project.tsindex ed6a792e6b8..a7f0ace8fc3 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/check-typescript-project.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/utils/check-typescript-project.ts@@ -1,7 +1,7 @@import fs from "fs";import path from "path";-import { getProjectDependenciesFromPackageJson } from "../utils/get-package-version";+import { getProjectDependenciesFromPackageJson } from "./get-package-version";/*** Checks if the current project is a TypeScript project.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/create-collection.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/create-collection.tssimilarity index 86%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/create-collection.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/create-collection.tsindex 34692710bec..abd99ea6bce 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/create-collection.ts+++ b/enterprise/frontend/src/embedding-sdk-package/cli/utils/create-collection.ts@@ -1,4 +1,4 @@-import { propagateErrorResponse } from "embedding-sdk-bundle/cli/utils/propagate-error-response";+import { propagateErrorResponse } from "embedding-sdk-package/cli/utils/propagate-error-response";interface Options {name: string;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/create-model-from-table.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/create-model-from-table.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/create-model-from-table.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/create-model-from-table.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/fetch-instance-settings.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/fetch-instance-settings.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/fetch-instance-settings.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/fetch-instance-settings.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/generate-password.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/generate-password.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/generate-password.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/generate-password.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-current-docker-port.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-current-docker-port.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-current-docker-port.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-current-docker-port.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-example-component-import-path.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-example-component-import-path.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-example-component-import-path.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-example-component-import-path.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-example-component-import-path.unit.spec.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-example-component-import-path.unit.spec.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-example-component-import-path.unit.spec.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-example-component-import-path.unit.spec.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-local-metabase-container.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-local-metabase-container.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-local-metabase-container.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-local-metabase-container.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-nextjs-setup-message.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-nextjs-setup-message.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-nextjs-setup-message.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-nextjs-setup-message.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-package-version.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-package-version.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-package-version.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-package-version.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-permission-groups.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-permission-groups.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-permission-groups.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-permission-groups.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-sandboxed-collection-permissions.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-sandboxed-collection-permissions.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-sandboxed-collection-permissions.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-sandboxed-collection-permissions.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-tenancy-isolation-sandboxes.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/get-tenancy-isolation-sandboxes.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/get-tenancy-isolation-sandboxes.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/get-tenancy-isolation-sandboxes.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/install-mock-server-deps.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/install-mock-server-deps.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/install-mock-server-deps.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/install-mock-server-deps.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/is-port-taken.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/is-port-taken.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/is-port-taken.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/is-port-taken.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/nextjs-helpers.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/nextjs-helpers.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/nextjs-helpers.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/nextjs-helpers.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/permissions-graph.unit.spec.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/permissions-graph.unit.spec.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/permissions-graph.unit.spec.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/permissions-graph.unit.spec.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/print.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/print.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/print.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/print.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/propagate-error-response.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/propagate-error-response.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/propagate-error-response.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/propagate-error-response.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/retry.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/retry.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/retry.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/retry.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/sample-tenancy-column-values.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/sample-tenancy-column-values.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/sample-tenancy-column-values.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/sample-tenancy-column-values.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/show-warning-prompt.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/show-warning-prompt.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/show-warning-prompt.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/show-warning-prompt.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/snippets-helpers.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/snippets-helpers.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/snippets-helpers.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/snippets-helpers.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/cli/utils/xray-models.ts b/enterprise/frontend/src/embedding-sdk-package/cli/utils/xray-models.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/cli/utils/xray-models.tsrename to enterprise/frontend/src/embedding-sdk-package/cli/utils/xray-models.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper.tsx b/enterprise/frontend/src/embedding-sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper.tsxsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper.tsxdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsx b/enterprise/frontend/src/embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsxsimilarity index 80%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsxindex e83c219da85..fb3428827d9 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper.tsx@@ -1,23 +1,23 @@import { type FunctionComponent, useEffect, useId, useRef } from "react";-import { ClientSideOnlyWrapper } from "embedding-sdk-bundle/sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper";-import { Error } from "embedding-sdk-bundle/sdk-package/components/private/Error/Error";-import { Loader } from "embedding-sdk-bundle/sdk-package/components/private/Loader/Loader";+import { ClientSideOnlyWrapper } from "embedding-sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper";+import { Error } from "embedding-sdk-package/components/private/Error/Error";+import { Loader } from "embedding-sdk-package/components/private/Loader/Loader";import {SDK_COMPONENT_NOT_YET_AVAILABLE_MESSAGE,SDK_LOADING_ERROR_MESSAGE,SDK_NOT_LOADED_YET_MESSAGE,SDK_NOT_STARTED_LOADING_MESSAGE,-} from "embedding-sdk-bundle/sdk-package/constants/error-messages";-import { EnsureSingleInstance } from "embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";-import { useSdkLoadingState } from "embedding-sdk-bundle/sdk-shared/hooks/use-sdk-loading-state";-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+} from "embedding-sdk-package/constants/error-messages";+import { EnsureSingleInstance } from "embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";+import { useSdkLoadingState } from "embedding-sdk-shared/hooks/use-sdk-loading-state";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";+import { getWindow } from "embedding-sdk-shared/lib/get-window";import {SdkLoadingError,SdkLoadingState,-} from "embedding-sdk-bundle/sdk-shared/types/sdk-loading";+} from "embedding-sdk-shared/types/sdk-loading";type Props<TComponentProps> = {getComponent: () => FunctionComponent<TComponentProps> | null | undefined;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Error/Error.tsx b/enterprise/frontend/src/embedding-sdk-package/components/private/Error/Error.tsxsimilarity index 89%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Error/Error.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/private/Error/Error.tsxindex 61002f2cdce..414e3e0d5c3 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Error/Error.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/private/Error/Error.tsx@@ -1,4 +1,4 @@-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";// eslint-disable-next-line no-external-references-for-sdk-package-codeimport { colors } from "metabase/lib/colors/colors";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Loader/Loader.tsx b/enterprise/frontend/src/embedding-sdk-package/components/private/Loader/Loader.tsxsimilarity index 91%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Loader/Loader.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/private/Loader/Loader.tsxindex 4cb7547426b..d45163c934c 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/private/Loader/Loader.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/private/Loader/Loader.tsx@@ -1,7 +1,7 @@// eslint-disable-next-line no-external-references-for-sdk-package-codeimport { getSdkLoaderCss } from "embedding/sdk-common/lib/get-sdk-loader-css";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";import type { CommonStylingProps } from "embedding-sdk-bundle/types/props";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";type SpinnerProps = {size?: string;diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsxsimilarity index 89%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsxindex 75a4d03fead..6ef9499e250 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.stories.tsx@@ -1,6 +1,6 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";import type { MetabaseCollectionItem } from "embedding-sdk-bundle/types";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsxsimilarity index 55%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsxindex 2e19b8e26d6..f5877688b07 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/CollectionBrowser.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** A component that allows you to browse collections and their items.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CollectionBrowser/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/CollectionBrowser/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsxsimilarity index 88%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsxindex a2fb3ee5b3c..bd1be4b4198 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.stories.tsx@@ -1,6 +1,6 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";import type { MetabaseDashboard } from "embedding-sdk-bundle/types/dashboard";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsxsimilarity index 51%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsxindex 662b29db29f..72c1970c924 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/CreateDashboardModal.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Creates a dashboarddiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateDashboardModal/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateDashboardModal/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsxsimilarity index 82%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsxindex 49194a18674..1358fee2916 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.tsxsimilarity index 55%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.tsxindex 253e436f68d..684822e8d51 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/CreateQuestion.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/CreateQuestion.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** @functiondiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/CreateQuestion/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/CreateQuestion/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsxsimilarity index 89%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsxindex 21f8f814502..710e5b34b87 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsxsimilarity index 95%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsxindex 73f29a41972..39c49f0dbb1 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion.tsx@@ -1,6 +1,6 @@import type { InteractiveQuestionComponents } from "embedding-sdk-bundle/components/public/InteractiveQuestion/InteractiveQuestion";-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";const _InteractiveQuestion = createComponent(() => getWindow()?.METABASE_EMBEDDING_SDK_BUNDLE?.InteractiveQuestion,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/InteractiveQuestion/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsxsimilarity index 83%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsxindex 63b6bc5d68b..f170d72e377 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.stories.tsx@@ -1,8 +1,8 @@import { StrictMode } from "react";-import { InteractiveQuestion } from "embedding-sdk-bundle/sdk-package/components/public/InteractiveQuestion/InteractiveQuestion";-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { InteractiveQuestion } from "embedding-sdk-package/components/public/InteractiveQuestion/InteractiveQuestion";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "./MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsxsimilarity index 80%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsxindex 8e158e73810..bcd0babf53d 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/MetabaseProvider.tsx@@ -2,15 +2,15 @@ import { memo, useEffect, useId, useMemo } from "react";// eslint-disable-next-line no-external-references-for-sdk-package-codeimport useDeepCompareEffect from "react-use/lib/useDeepCompareEffect";-import { ClientSideOnlyWrapper } from "embedding-sdk-bundle/sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper";-import { useLoadSdkBundle } from "embedding-sdk-bundle/sdk-package/hooks/private/use-load-sdk-bundle";-import { EnsureSingleInstance } from "embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";-import { useSdkLoadingState } from "embedding-sdk-bundle/sdk-shared/hooks/use-sdk-loading-state";-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";-import { SdkLoadingState } from "embedding-sdk-bundle/sdk-shared/types/sdk-loading";import type { MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";+import { ClientSideOnlyWrapper } from "embedding-sdk-package/components/private/ClientSideOnlyWrapper/ClientSideOnlyWrapper";+import { useLoadSdkBundle } from "embedding-sdk-package/hooks/private/use-load-sdk-bundle";+import { EnsureSingleInstance } from "embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";+import { useSdkLoadingState } from "embedding-sdk-shared/hooks/use-sdk-loading-state";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";+import { getWindow } from "embedding-sdk-shared/lib/get-window";+import { SdkLoadingState } from "embedding-sdk-shared/types/sdk-loading";/*** We call `use-init-data` hook to initialize the SDK with the initial data.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabaseProvider/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsxsimilarity index 82%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsxindex 015658156be..de132a47df4 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsxsimilarity index 52%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsxindex 7583723078b..2a4ac2aa7ac 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/MetabotQuestion.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** A component that renders a metabot question.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/MetabotQuestion/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/MetabotQuestion/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsxsimilarity index 84%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsxindex 9dd4293750c..04729c40040 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.tsxsimilarity index 92%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.tsxindex c54a65468a2..fc0a9d575c8 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/StaticQuestion.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/StaticQuestion.tsx@@ -1,6 +1,6 @@import type { StaticQuestionComponents } from "embedding-sdk-bundle/components/public/StaticQuestion/StaticQuestion";-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";const _StaticQuestion = createComponent(() => getWindow()?.METABASE_EMBEDDING_SDK_BUNDLE?.StaticQuestion,diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/StaticQuestion/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/StaticQuestion/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsxsimilarity index 84%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsxindex f4928e06ccb..6f93b1d82a8 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsxsimilarity index 65%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsxindex 52fc7ab024d..c18e3506244 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/EditableDashboard.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** A dashboard component with the features available in the `InteractiveDashboard` component, as well as the ability to add and update questions, layout, and content within your dashboard.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/EditableDashboard/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/EditableDashboard/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsxsimilarity index 85%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsxindex ad76db513d3..16ef0bef88b 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsxsimilarity index 60%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsxindex 7ef3ab6cdfa..469024ae481 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/InteractiveDashboard.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** A dashboard component with drill downs, click behaviors, and the ability to view and click into questions.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/InteractiveDashboard/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/InteractiveDashboard/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsxsimilarity index 84%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsxindex e1e74d4fa28..fe0b4810ca4 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsxsimilarity index 52%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsxindex 0af69963325..84337c87647 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/StaticDashboard.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** A lightweight dashboard component.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/dashboard/StaticDashboard/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/dashboard/StaticDashboard/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsxsimilarity index 91%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsxindex c5e568d9fc4..a70237f6ffb 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.stories.tsx@@ -1,5 +1,5 @@-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { MetabaseProvider } from "../../MetabaseProvider";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsx b/enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsxsimilarity index 53%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsxrename to enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsxindex e88106b57ac..b4cdfeced63 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/SdkDebugInfo.tsx@@ -1,5 +1,5 @@-import { createComponent } from "embedding-sdk-bundle/sdk-package/components/private/ComponentWrapper/ComponentWrapper";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { createComponent } from "embedding-sdk-package/components/private/ComponentWrapper/ComponentWrapper";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Intended for debugging purposes only, so we don't want to expose it in the d.ts files.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/index.ts b/enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/components/public/debug/SdkDebugInfo/index.tsrename to enterprise/frontend/src/embedding-sdk-package/components/public/debug/SdkDebugInfo/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/constants/error-messages.ts b/enterprise/frontend/src/embedding-sdk-package/constants/error-messages.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/constants/error-messages.tsrename to enterprise/frontend/src/embedding-sdk-package/constants/error-messages.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/constants/sdk-bundle-script-data-attribute-name.ts b/enterprise/frontend/src/embedding-sdk-package/constants/sdk-bundle-script-data-attribute-name.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/constants/sdk-bundle-script-data-attribute-name.tsrename to enterprise/frontend/src/embedding-sdk-package/constants/sdk-bundle-script-data-attribute-name.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/dev.md b/enterprise/frontend/src/embedding-sdk-package/dev.mdsimilarity index 94%rename from enterprise/frontend/src/embedding-sdk-bundle/dev.mdrename to enterprise/frontend/src/embedding-sdk-package/dev.mdindex 7b7974bd8a7..1db6fe8e94a 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/dev.md+++ b/enterprise/frontend/src/embedding-sdk-package/dev.md@@ -2,6 +2,10 @@These docs are for building the sdk locally, if you just want to use the sdk, please refer to the [sdk documentation](https://www.metabase.com/docs/latest/embedding/sdk/introduction).+### Important++Code in this directory should carefully reference external code, including code of the main app and 3rd party dependencies. The reason is that we want keep the Embedding SDK Package bundle as small as possible. To control it, a special eslint rule `no-external-references-for-sdk-package-code` is defined in `enterprise/frontend/src/.eslintrc.js`+## BuildYou can build the SDK NPM package with `yarn build-embedding-sdk-package`.@@ -9,7 +13,7 @@ You can build the SDK bundle with `yarn build-release:embedding-sdk-bundle`#### embedding-sdk:dev-Builds both SDK NPM package and SDK bundle in the `watch` mode.+The `embedding-sdk:dev` command builds both SDK NPM package and SDK bundle in the `watch` mode.It runs a local dev server that serves compiled files; the server is used by `Cypress`.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/embedding-sdk-api-extractor.json b/enterprise/frontend/src/embedding-sdk-package/embedding-sdk-api-extractor.jsonsimilarity index 89%rename from enterprise/frontend/src/embedding-sdk-bundle/embedding-sdk-api-extractor.jsonrename to enterprise/frontend/src/embedding-sdk-package/embedding-sdk-api-extractor.jsonindex 774af435878..c883d0d66c9 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/embedding-sdk-api-extractor.json+++ b/enterprise/frontend/src/embedding-sdk-package/embedding-sdk-api-extractor.json@@ -1,6 +1,6 @@{"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",- "mainEntryPointFilePath": "<projectFolder>/resources/embedding-sdk/dist/enterprise/frontend/src/embedding-sdk-bundle/index.d.ts",+ "mainEntryPointFilePath": "<projectFolder>/resources/embedding-sdk/dist/enterprise/frontend/src/embedding-sdk-package/index.d.ts","bundledPackages": [],"apiReport": {"enabled": falsediff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/private/use-load-sdk-bundle.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/private/use-load-sdk-bundle.tssimilarity index 90%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/private/use-load-sdk-bundle.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/private/use-load-sdk-bundle.tsindex e853af832ef..eb4bd99a691 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/private/use-load-sdk-bundle.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/private/use-load-sdk-bundle.ts@@ -2,13 +2,13 @@ import { useEffect } from "react";// eslint-disable-next-line no-external-references-for-sdk-package-codeimport { SDK_BUNDLE_FULL_PATH } from "build-configs/embedding-sdk/constants/sdk-bundle";-import { SDK_BUNDLE_SCRIPT_DATA_ATTRIBUTE_PASCAL_CASED } from "embedding-sdk-bundle/sdk-package/constants/sdk-bundle-script-data-attribute-name";-import { getSdkBundleScriptElement } from "embedding-sdk-bundle/sdk-package/lib/private/get-sdk-bundle-script-element";-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";+import { SDK_BUNDLE_SCRIPT_DATA_ATTRIBUTE_PASCAL_CASED } from "embedding-sdk-package/constants/sdk-bundle-script-data-attribute-name";+import { getSdkBundleScriptElement } from "embedding-sdk-package/lib/private/get-sdk-bundle-script-element";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";import {SdkLoadingError,SdkLoadingState,-} from "embedding-sdk-bundle/sdk-shared/types/sdk-loading";+} from "embedding-sdk-shared/types/sdk-loading";const ERROR_MESSAGE = "Failed to load Embedding SDK bundle";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-application-name.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-application-name.tssimilarity index 62%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-application-name.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-application-name.tsindex 13c4f79f6f5..b791c58cf49 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-application-name.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-application-name.ts@@ -1,5 +1,5 @@-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Returns application name.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-available-fonts.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-available-fonts.tssimilarity index 74%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-available-fonts.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-available-fonts.tsindex 0de525703b8..1bdedfb2543 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-available-fonts.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-available-fonts.ts@@ -1,7 +1,7 @@import { useMemo } from "react";-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Returns available fonts.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/index.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/index.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/index.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/index.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsx b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsxsimilarity index 87%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsxrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsxindex ab8c54e8083..8dfb6a303f8 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsx+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.stories.tsx@@ -1,13 +1,13 @@import type { StoryFn } from "@storybook/react";import { type JSXElementConstructor, useState } from "react";-import { MetabaseProvider } from "embedding-sdk-bundle/sdk-package/components/public/MetabaseProvider";-import { getHostedBundleStoryDecorator } from "embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator";import { getStorybookSdkAuthConfigForUser } from "embedding-sdk-bundle/test/CommonSdkStoryWrapper";import type {CreateDashboardValues,MetabaseDashboard,} from "embedding-sdk-bundle/types/dashboard";+import { MetabaseProvider } from "embedding-sdk-package/components/public/MetabaseProvider";+import { getHostedBundleStoryDecorator } from "embedding-sdk-package/test/getHostedBundleStoryDecorator";import { Box, Button } from "metabase/ui";import { useCreateDashboardApi } from "./use-create-dashboard-api";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.tssimilarity index 76%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.tsindex c8924f3b928..2f75dd81cba 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.ts@@ -1,8 +1,8 @@import { useMemo } from "react";-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { useMetabaseProviderPropsStore } from "embedding-sdk-shared/hooks/use-metabase-provider-props-store";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Creates a dashboard.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.unit.spec.tsxrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-create-dashboard-api/use-create-dashboard-api.unit.spec.tsxdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-current-user.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-current-user.tssimilarity index 68%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-current-user.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-current-user.tsindex 56bd52c0e07..34dfb628095 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-current-user.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-current-user.ts@@ -1,6 +1,6 @@-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";import type { MetabaseUser } from "embedding-sdk-bundle/types/user";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Returns the current user.diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-metabase-auth-status.ts b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-metabase-auth-status.tssimilarity index 67%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-metabase-auth-status.tsrename to enterprise/frontend/src/embedding-sdk-package/hooks/public/use-metabase-auth-status.tsindex 302b7f54cf5..ccf9e448342 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/hooks/public/use-metabase-auth-status.ts+++ b/enterprise/frontend/src/embedding-sdk-package/hooks/public/use-metabase-auth-status.ts@@ -1,5 +1,5 @@-import { useLazySelector } from "embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector";-import { getWindow } from "embedding-sdk-bundle/sdk-shared/lib/get-window";+import { useLazySelector } from "embedding-sdk-shared/hooks/use-lazy-selector";+import { getWindow } from "embedding-sdk-shared/lib/get-window";/*** Returns the authentication status of the current user in the Metabase embedding SDK.diff --git a/enterprise/frontend/src/embedding-sdk-package/index.ts b/enterprise/frontend/src/embedding-sdk-package/index.tsnew file mode 100644index 00000000000..a2d413a25e1--- /dev/null+++ b/enterprise/frontend/src/embedding-sdk-package/index.ts@@ -0,0 +1,132 @@+// eslint-disable-next-line no-external-references-for-sdk-package-code+import { EMBEDDING_SDK_CONFIG } from "metabase/embedding-sdk/config";+// eslint-disable-next-line no-external-references-for-sdk-package-code+import { defineEmbeddingSdkPackageBuildInfo } from "metabase/embedding-sdk/lib/define-embedding-sdk-package-build-info";+// eslint-disable-next-line no-external-references-for-sdk-package-code+import { defineGlobalDependencies } from "metabase/embedding-sdk/lib/define-global-dependencies";++// Enable SDK mode as we are in the SDK package+EMBEDDING_SDK_CONFIG.isEmbeddingSdk = true;++defineEmbeddingSdkPackageBuildInfo();+defineGlobalDependencies();++export { CollectionBrowser } from "./components/public/CollectionBrowser";+export { CreateQuestion } from "./components/public/CreateQuestion";+export { CreateDashboardModal } from "./components/public/CreateDashboardModal";+export { EditableDashboard } from "./components/public/dashboard/EditableDashboard";+export { InteractiveDashboard } from "./components/public/dashboard/InteractiveDashboard";+export { StaticDashboard } from "./components/public/dashboard/StaticDashboard";+export { InteractiveQuestion } from "./components/public/InteractiveQuestion";+export { StaticQuestion } from "./components/public/StaticQuestion";+export { MetabaseProvider } from "./components/public/MetabaseProvider";+export { MetabotQuestion } from "./components/public/MetabotQuestion";+export * from "./components/public/debug/SdkDebugInfo";++export { useApplicationName } from "./hooks/public/use-application-name";+export { useAvailableFonts } from "./hooks/public/use-available-fonts";+export { useCurrentUser } from "./hooks/public/use-current-user";+export { useCreateDashboardApi } from "./hooks/public/use-create-dashboard-api";+export { useMetabaseAuthStatus } from "./hooks/public/use-metabase-auth-status";++export { defineMetabaseAuthConfig } from "./lib/public/define-metabase-auth-config";+export { defineMetabaseTheme } from "./lib/public/define-metabase-theme";++export {+ type CollectionBrowserProps,+ type CollectionBrowserListColumns,+} from "embedding-sdk-bundle/components/public/CollectionBrowser";+export { type CreateDashboardModalProps } from "embedding-sdk-bundle/components/public/CreateDashboardModal";+export { type CreateQuestionProps } from "embedding-sdk-bundle/components/public/CreateQuestion";+export type {+ StaticDashboardProps,+ InteractiveDashboardProps,+ EditableDashboardProps,+} from "embedding-sdk-bundle/components/public/dashboard";+export {+ type SdkQuestionProps,+ type InteractiveQuestionBackButtonProps,+ type InteractiveQuestionBreakoutDropdownProps,+ type InteractiveQuestionChartTypeDropdownProps,+ type InteractiveQuestionChartTypeSelectorProps,+ type InteractiveQuestionDownloadWidgetProps,+ type InteractiveQuestionDownloadWidgetDropdownProps,+ type InteractiveQuestionEditorProps,+ type InteractiveQuestionEditorButtonProps,+ type InteractiveQuestionFilterProps,+ type InteractiveQuestionFilterDropdownProps,+ type InteractiveQuestionQuestionSettingsProps,+ type InteractiveQuestionQuestionSettingsDropdownProps,+ type InteractiveQuestionQuestionVisualizationProps,+ type InteractiveQuestionResetButtonProps,+ type InteractiveQuestionSaveButtonProps,+ type InteractiveQuestionSaveQuestionFormProps,+ type InteractiveQuestionSummarizeDropdownProps,+ type InteractiveQuestionTitleProps,+ type DrillThroughQuestionProps,+} from "embedding-sdk-bundle/components/public/SdkQuestion";+export {+ type InteractiveQuestionComponents,+ type InteractiveQuestionProps,+} from "embedding-sdk-bundle/components/public/InteractiveQuestion";+export {+ type StaticQuestionProps,+ type StaticQuestionComponents,+} from "embedding-sdk-bundle/components/public/StaticQuestion";+export { type MetabaseProviderProps } from "embedding-sdk-bundle/types/metabase-provider";++export type {+ CustomDashboardCardMenuItem,+ DashCardMenuItem,+ DashboardCardCustomMenuItem,+ DashboardCardMenuCustomElement,+ DashboardCardMenu,+} from "metabase/dashboard/components/DashCard/DashCardMenu/dashcard-menu";++export type {+ ButtonProps,+ ChartColor,+ CreateDashboardValues,+ EntityTypeFilterKeys,+ LoginStatus,+ MetabaseAuthConfig,+ MetabaseAuthConfigWithApiKey,+ MetabaseAuthConfigWithJwt,+ MetabaseAuthConfigWithSaml,+ MetabaseClickActionPluginsConfig,+ MetabaseColors,+ MetabaseClickAction,+ MetabaseComponentTheme,+ MetabaseCollection,+ MetabaseCollectionItem,+ MetabaseDataPointObject,+ MetabaseDashboard,+ MetabaseDashboardPluginsConfig,+ MetabaseFontFamily,+ MetabasePluginsConfig,+ MetabaseQuestion,+ MetabaseTheme,+ MetabaseUser,+ SdkCollectionId,+ SdkDashboardId,+ SdkDashboardLoadEvent,+ SdkEntityId,+ SdkErrorComponent,+ SdkErrorComponentProps,+ SdkEventHandlersConfig,+ SdkQuestionId,+ SdkQuestionTitleProps,+ SdkUserId,+ SqlParameterValues,+} from "embedding-sdk-bundle/types";++export type {+ UserBackendJwtResponse,+ MetabaseFetchRequestTokenFn,+ MetabaseEmbeddingSessionToken,+} from "embedding-sdk-bundle/types/refresh-token";++export type { EmbeddingEntityType } from "metabase-types/store/embedding-data-picker";++export type { ParameterValues } from "metabase/embedding-sdk/types/dashboard";+export type { IconName } from "metabase/embedding-sdk/types/icon";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/private/get-sdk-bundle-script-element.ts b/enterprise/frontend/src/embedding-sdk-package/lib/private/get-sdk-bundle-script-element.tssimilarity index 75%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/private/get-sdk-bundle-script-element.tsrename to enterprise/frontend/src/embedding-sdk-package/lib/private/get-sdk-bundle-script-element.tsindex 695916de945..479c9156228 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/private/get-sdk-bundle-script-element.ts+++ b/enterprise/frontend/src/embedding-sdk-package/lib/private/get-sdk-bundle-script-element.ts@@ -1,4 +1,4 @@-import { SDK_BUNDLE_SCRIPT_DATA_ATTRIBUTE_DASH_CASED } from "embedding-sdk-bundle/sdk-package/constants/sdk-bundle-script-data-attribute-name";+import { SDK_BUNDLE_SCRIPT_DATA_ATTRIBUTE_DASH_CASED } from "embedding-sdk-package/constants/sdk-bundle-script-data-attribute-name";export function getSdkBundleScriptElement(): HTMLScriptElement | null {return document.querySelector(diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config.ts b/enterprise/frontend/src/embedding-sdk-package/lib/public/define-metabase-auth-config.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config.tsrename to enterprise/frontend/src/embedding-sdk-package/lib/public/define-metabase-auth-config.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/public/define-metabase-theme.ts b/enterprise/frontend/src/embedding-sdk-package/lib/public/define-metabase-theme.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/lib/public/define-metabase-theme.tsrename to enterprise/frontend/src/embedding-sdk-package/lib/public/define-metabase-theme.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/package.template.json b/enterprise/frontend/src/embedding-sdk-package/package.template.jsonsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/package.template.jsonrename to enterprise/frontend/src/embedding-sdk-package/package.template.jsondiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator.tsx b/enterprise/frontend/src/embedding-sdk-package/test/getHostedBundleStoryDecorator.tsxsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-package/test/getHostedBundleStoryDecorator.tsxrename to enterprise/frontend/src/embedding-sdk-package/test/getHostedBundleStoryDecorator.tsxdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/tsconfig.cli-snippets.json b/enterprise/frontend/src/embedding-sdk-package/tsconfig.cli-snippets.jsonsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/tsconfig.cli-snippets.jsonrename to enterprise/frontend/src/embedding-sdk-package/tsconfig.cli-snippets.jsondiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsx b/enterprise/frontend/src/embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsxsimilarity index 96%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsxrename to enterprise/frontend/src/embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsxindex f86468dc5e4..12a5393d8a3 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsx+++ b/enterprise/frontend/src/embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.tsx@@ -1,6 +1,6 @@import { type ReactNode, useCallback, useEffect, useMemo } from "react";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";+import { useMetabaseProviderPropsStore } from "../../hooks/use-metabase-provider-props-store";export const useSingleInstanceIdsData = () => {const {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.unit.spec.tsx b/enterprise/frontend/src/embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.unit.spec.tsxsimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.unit.spec.tsxrename to enterprise/frontend/src/embedding-sdk-shared/components/EnsureSingleInstance/EnsureSingleInstance.unit.spec.tsxdiff --git a/enterprise/frontend/src/embedding-sdk-shared/dev.md b/enterprise/frontend/src/embedding-sdk-shared/dev.mdnew file mode 100644index 00000000000..7f0b00940a9--- /dev/null+++ b/enterprise/frontend/src/embedding-sdk-shared/dev.md@@ -0,0 +1,7 @@+# Embedding SDK Shared++This folder contains shared code between Embedding SDK Bundle and Embedding SDK Package.++### Important++Code in this directory should carefully reference external code, including code of the main app and 3rd party dependencies. The reason is that we want keep the Embedding SDK Package bundle as small as possible. To control it, a special eslint rule `no-external-references-for-sdk-package-code` is defined in `enterprise/frontend/src/.eslintrc.js`diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector.ts b/enterprise/frontend/src/embedding-sdk-shared/hooks/use-lazy-selector.tssimilarity index 89%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector.tsrename to enterprise/frontend/src/embedding-sdk-shared/hooks/use-lazy-selector.tsindex 6fe6b2cf3c6..544a8e9d4a6 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-lazy-selector.ts+++ b/enterprise/frontend/src/embedding-sdk-shared/hooks/use-lazy-selector.ts@@ -1,8 +1,9 @@import { useCallback, useSyncExternalStore } from "react";-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";import type { SdkStoreState } from "embedding-sdk-bundle/store/types";+import { useMetabaseProviderPropsStore } from "./use-metabase-provider-props-store";+const noop = () => {};/**diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store.ts b/enterprise/frontend/src/embedding-sdk-shared/hooks/use-metabase-provider-props-store.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store.tsrename to enterprise/frontend/src/embedding-sdk-shared/hooks/use-metabase-provider-props-store.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-sdk-loading-state.ts b/enterprise/frontend/src/embedding-sdk-shared/hooks/use-sdk-loading-state.tssimilarity index 75%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-sdk-loading-state.tsrename to enterprise/frontend/src/embedding-sdk-shared/hooks/use-sdk-loading-state.tsindex fc93f8d0b6a..2fce81a7229 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/hooks/use-sdk-loading-state.ts+++ b/enterprise/frontend/src/embedding-sdk-shared/hooks/use-sdk-loading-state.ts@@ -1,8 +1,6 @@-import { useMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/hooks/use-metabase-provider-props-store";-import {- SdkLoadingError,- SdkLoadingState,-} from "embedding-sdk-bundle/sdk-shared/types/sdk-loading";+import { SdkLoadingError, SdkLoadingState } from "../types/sdk-loading";++import { useMetabaseProviderPropsStore } from "./use-metabase-provider-props-store";export function useSdkLoadingState() {const {diff --git a/enterprise/frontend/src/embedding-sdk-bundle/jest/console-restrictions.js b/enterprise/frontend/src/embedding-sdk-shared/jest/console-restrictions.jssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/jest/console-restrictions.jsrename to enterprise/frontend/src/embedding-sdk-shared/jest/console-restrictions.jsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/jest/setup-after-env.js b/enterprise/frontend/src/embedding-sdk-shared/jest/setup-after-env.jssimilarity index 68%rename from enterprise/frontend/src/embedding-sdk-bundle/jest/setup-after-env.jsrename to enterprise/frontend/src/embedding-sdk-shared/jest/setup-after-env.jsindex ae31911b026..69c5914c63f 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/jest/setup-after-env.js+++ b/enterprise/frontend/src/embedding-sdk-shared/jest/setup-after-env.js@@ -1,4 +1,4 @@-import { ensureMetabaseProviderPropsStore } from "embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store";+import { ensureMetabaseProviderPropsStore } from "embedding-sdk-shared/lib/ensure-metabase-provider-props-store";afterEach(() => {ensureMetabaseProviderPropsStore().cleanup();diff --git a/enterprise/frontend/src/embedding-sdk-bundle/jest/setup-env.js b/enterprise/frontend/src/embedding-sdk-shared/jest/setup-env.jssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/jest/setup-env.jsrename to enterprise/frontend/src/embedding-sdk-shared/jest/setup-env.jsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store.ts b/enterprise/frontend/src/embedding-sdk-shared/lib/ensure-metabase-provider-props-store.tssimilarity index 96%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store.tsrename to enterprise/frontend/src/embedding-sdk-shared/lib/ensure-metabase-provider-props-store.tsindex 8f72f33f0c2..1d2cdd859e2 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store.ts+++ b/enterprise/frontend/src/embedding-sdk-shared/lib/ensure-metabase-provider-props-store.ts@@ -1,8 +1,6 @@import type { ComponentProviderProps } from "embedding-sdk-bundle/components/public/ComponentProvider";-import {- type SdkLoadingError,- SdkLoadingState,-} from "embedding-sdk-bundle/sdk-shared/types/sdk-loading";++import { type SdkLoadingError, SdkLoadingState } from "../types/sdk-loading";import { getWindow } from "./get-window";diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/lib/get-window.ts b/enterprise/frontend/src/embedding-sdk-shared/lib/get-window.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/lib/get-window.tsrename to enterprise/frontend/src/embedding-sdk-shared/lib/get-window.tsdiff --git a/enterprise/frontend/src/embedding-sdk-bundle/types/globalTypes.d.ts b/enterprise/frontend/src/embedding-sdk-shared/types/globals.d.tssimilarity index 75%rename from enterprise/frontend/src/embedding-sdk-bundle/types/globalTypes.d.tsrename to enterprise/frontend/src/embedding-sdk-shared/types/globals.d.tsindex 9c19ac7b0e9..7d62a7f1b51 100644--- a/enterprise/frontend/src/embedding-sdk-bundle/types/globalTypes.d.ts+++ b/enterprise/frontend/src/embedding-sdk-shared/types/globals.d.ts@@ -7,6 +7,6 @@ interface Window {ReactDOMServer?: unknown;METABASE_EMBEDDING_SDK_BUNDLE?: import("embedding-sdk-bundle/types/sdk-bundle").MetabaseEmbeddingSdkBundleExports;- METABASE_PROVIDER_PROPS_STORE?: import("embedding-sdk-bundle/sdk-shared/lib/ensure-metabase-provider-props-store").MetabaseProviderPropsStore;+ METABASE_PROVIDER_PROPS_STORE?: import("embedding-sdk-shared/lib/ensure-metabase-provider-props-store").MetabaseProviderPropsStore;METABASE_EMBEDDING_SDK_PACKAGE_BUILD_INFO?: import("metabase/embedding-sdk/types/build-info").BuildInfo;}diff --git a/enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/types/sdk-loading.ts b/enterprise/frontend/src/embedding-sdk-shared/types/sdk-loading.tssimilarity index 100%rename from enterprise/frontend/src/embedding-sdk-bundle/sdk-shared/types/sdk-loading.tsrename to enterprise/frontend/src/embedding-sdk-shared/types/sdk-loading.tsdiff --git a/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/components/SdkIframeEmbedRoute.tsx b/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/components/SdkIframeEmbedRoute.tsxindex 502809ffd36..fe03da59c2b 100644--- a/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/components/SdkIframeEmbedRoute.tsx+++ b/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/components/SdkIframeEmbedRoute.tsx@@ -9,7 +9,7 @@ import {InteractiveDashboard,StaticDashboard,} from "embedding-sdk-bundle/components/public/dashboard";-import { defineMetabaseAuthConfig } from "embedding-sdk-bundle/sdk-package/lib/public/define-metabase-auth-config";+import type { MetabaseAuthConfig } from "embedding-sdk-package";import { EMBEDDING_SDK_IFRAME_EMBEDDING_CONFIG } from "metabase/embedding-sdk/config";import { PLUGIN_EMBEDDING_IFRAME_SDK } from "metabase/plugins";import { Box } from "metabase/ui";@@ -62,10 +62,10 @@ export const SdkIframeEmbedRoute = () => {const { theme, locale } = embedSettings;- const authConfig = defineMetabaseAuthConfig({+ const authConfig: MetabaseAuthConfig = {metabaseInstanceUrl: embedSettings.instanceUrl,apiKey: embedSettings.apiKey,- });+ };return (<ComponentProvider authConfig={authConfig} theme={theme} locale={locale}>diff --git a/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/types/embed.ts b/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/types/embed.tsindex d721c74dd94..859a3f4bd43 100644--- a/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/types/embed.ts+++ b/enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/types/embed.ts@@ -1,13 +1,13 @@+import type { MetabaseError } from "embedding-sdk-bundle/errors";+import type { MetabaseAuthMethod } from "embedding-sdk-bundle/types";+import type { MetabaseEmbeddingSessionToken } from "embedding-sdk-bundle/types/refresh-token";import type {CollectionBrowserListColumns,EmbeddingEntityType,EntityTypeFilterKeys,MetabaseTheme,SqlParameterValues,-} from "embedding-sdk-bundle";-import type { MetabaseError } from "embedding-sdk-bundle/errors";-import type { MetabaseAuthMethod } from "embedding-sdk-bundle/types";-import type { MetabaseEmbeddingSessionToken } from "embedding-sdk-bundle/types/refresh-token";+} from "embedding-sdk-package";import type { ParameterValues } from "metabase/embedding-sdk/types/dashboard";import type { CollectionId } from "metabase-types/api";diff --git a/frontend/build/embedding-sdk/lib/get-sdk-version-from-package-json.js b/frontend/build/embedding-sdk/lib/get-sdk-version-from-package-json.jsindex d1ae3c5f80f..3e7acfd58cf 100644--- a/frontend/build/embedding-sdk/lib/get-sdk-version-from-package-json.js+++ b/frontend/build/embedding-sdk/lib/get-sdk-version-from-package-json.js@@ -9,7 +9,7 @@ module.exports.getSdkVersionFromPackageJson = () => {path.join(__dirname,"../../../../",- "enterprise/frontend/src/embedding-sdk-bundle/package.template.json",+ "enterprise/frontend/src/embedding-sdk-package/package.template.json",),),"utf-8",diff --git a/frontend/src/metabase/.eslintrc b/frontend/src/metabase/.eslintrcindex c2b36ef745c..4745a8b407e 100644--- a/frontend/src/metabase/.eslintrc+++ b/frontend/src/metabase/.eslintrc@@ -49,6 +49,12 @@"ttag/no-module-declaration": 2,},"overrides": [+ {+ "files": ["./app.js"],+ "rules": {+ "import/no-duplicates": 0,+ },+ },{"files": ["**/*.stories.tsx"],"rules": {diff --git a/frontend/src/metabase/app.js b/frontend/src/metabase/app.jsindex 514f69160fe..8aa974fca50 100644--- a/frontend/src/metabase/app.js+++ b/frontend/src/metabase/app.js@@ -6,7 +6,6 @@ import "regenerator-runtime/runtime";// This is conditionally aliased in the webpack config.// If EE isn't enabled, it loads an empty file.// Should be imported before any other metabase import-// eslint-disable-next-line import/no-duplicatesimport "ee-overrides";import "metabase/lib/dayjs";@@ -26,7 +25,6 @@ import "metabase/plugins/builtin";// This is conditionally aliased in the webpack config.// If EE isn't enabled, it loads an empty file.-// eslint-disable-next-line import/no-duplicatesimport "ee-plugins";// Set nonce for mantine v6 depsdiff --git a/frontend/src/metabase/metadata/.eslintrc b/frontend/src/metabase/metadata/.eslintrcindex 311bd83b63d..571ee33de34 100644--- a/frontend/src/metabase/metadata/.eslintrc+++ b/frontend/src/metabase/metadata/.eslintrc@@ -10,8 +10,9 @@"metabase-enterprise","metabase-enterprise/*","cljs/metabase.lib*",- "/embedding-sdk",+ "/embedding-sdk-package","/embedding-sdk-bundle",+ "/embedding-sdk-shared","metabase-lib/v1/metadata","metabase-lib/v1/metadata/*","metabase/entities",diff --git a/jest.config.js b/jest.config.jsindex 3a94384d19a..26f9215aab8 100644--- a/jest.config.js+++ b/jest.config.js@@ -127,18 +127,18 @@ const config = {displayName: "sdk",testMatch: [- "<rootDir>/enterprise/frontend/src/embedding-sdk-bundle/**/*.unit.spec.{js,jsx,ts,tsx}",+ "<rootDir>/enterprise/frontend/src/embedding-sdk-{package,bundle,shared}/**/*.unit.spec.{js,jsx,ts,tsx}",],setupFiles: [...baseConfig.setupFiles,- "<rootDir>/enterprise/frontend/src/embedding-sdk-bundle/jest/setup-env.js",+ "<rootDir>/enterprise/frontend/src/embedding-sdk-shared/jest/setup-env.js",],setupFilesAfterEnv: [...baseConfig.setupFilesAfterEnv,- "<rootDir>/enterprise/frontend/src/embedding-sdk-bundle/jest/setup-after-env.js",- "<rootDir>/enterprise/frontend/src/embedding-sdk-bundle/jest/console-restrictions.js",+ "<rootDir>/enterprise/frontend/src/embedding-sdk-shared/jest/setup-after-env.js",+ "<rootDir>/enterprise/frontend/src/embedding-sdk-shared/jest/console-restrictions.js",],},{@@ -146,7 +146,9 @@ const config = {displayName: "core",testPathIgnorePatterns: [...(baseConfig.testPathIgnorePatterns || []),+ "<rootDir>/enterprise/frontend/src/embedding-sdk-package/","<rootDir>/enterprise/frontend/src/embedding-sdk-bundle/",+ "<rootDir>/enterprise/frontend/src/embedding-sdk-shared/",],},],diff --git a/package.json b/package.jsonindex 9498ad050c0..0b540c82103 100644--- a/package.json+++ b/package.json@@ -436,8 +436,8 @@"embedding-sdk:generate-package": "node ./bin/embedding-sdk/generate-sdk-package-files.js","embedding-sdk:generate-changelog": "yarn conventional-changelog --config enterprise/frontend/src/embedding-sdk-bundle/conventional-changelog-config.js","embedding-sdk:publish": "cd ./resources/embedding-sdk && npm publish",- "embedding-sdk:generate-nextjs-compat": "tsx enterprise/frontend/src/embedding-sdk-bundle/bin/generate-nextjs-compat.ts",- "embedding-sdk:test-unit": "yarn test-unit enterprise/frontend/src/embedding-sdk-bundle/",+ "embedding-sdk:generate-nextjs-compat": "tsx enterprise/frontend/src/embedding-sdk-package/bin/generate-nextjs-compat.ts",+ "embedding-sdk:test-unit": "yarn test-unit enterprise/frontend/src/embedding-sdk-{package,bundle,shared}/","embedding-sdk:dts:generate": "yarn embedding-sdk:clean:tsbuildinfo && yarn tsc --project tsconfig.sdk.json || true && yarn embedding-sdk:dts:fixup","embedding-sdk:dts:fixup": "node ./bin/embedding-sdk/fixup-types-after-compilation.js","embedding-sdk:docs:generate:pure": "typedoc --options ./.typedoc/typedoc.html.config.js && typedoc --options ./.typedoc/typedoc.markdown.config.js",@@ -514,7 +514,7 @@"e2e/test/scenarios/*/{*.(js|ts),!(helpers|shared)/*.(js|ts)}": ["node e2e/validate-e2e-test-files.js"],- "enterprise/frontend/src/embedding-sdk-bundle/README.md": [+ "enterprise/frontend/src/embedding-sdk-package/README.md": ["prettier --write"],"+(.storybook|.storybook-sdk)/**/*.{js,jsx,ts,tsx,css}": [diff --git a/rspack.embedding-sdk-bundle.config.js b/rspack.embedding-sdk-bundle.config.jsindex 15b484af4fb..209a62fef2d 100644--- a/rspack.embedding-sdk-bundle.config.js+++ b/rspack.embedding-sdk-bundle.config.js@@ -39,7 +39,7 @@ const {getBuildInfoValues,} = require("./frontend/build/embedding-sdk/rspack/get-build-info-values");-const SDK_SRC_PATH =+const SDK_BUNDLE_SRC_PATH =__dirname + "/enterprise/frontend/src/embedding-sdk-bundle";const BUILD_PATH = __dirname + "/resources/frontend_client";@@ -55,9 +55,9 @@ const config = {name: "embedding_sdk_bundle",- context: SDK_SRC_PATH,+ context: SDK_BUNDLE_SRC_PATH,- entry: "./bundle.ts",+ entry: "./index.ts",output: {// we must use a different directory than the main rspack config,@@ -199,7 +199,7 @@ config.resolve.alias = {"ee-overrides": ENTERPRISE_SRC_PATH + "/overrides",// Allows importing side effects that applies only to the SDK.- "sdk-specific-imports": SDK_SRC_PATH + "/lib/sdk-specific-imports.ts",+ "sdk-specific-imports": SDK_BUNDLE_SRC_PATH + "/lib/sdk-specific-imports.ts",};if (config.cache) {diff --git a/rspack.embedding-sdk-cli.config.js b/rspack.embedding-sdk-cli.config.jsindex 012b84c3e90..eb559301503 100644--- a/rspack.embedding-sdk-cli.config.js+++ b/rspack.embedding-sdk-cli.config.js@@ -5,11 +5,13 @@ const path = require("path");const rspack = require("@rspack/core");const SDK_CLI_DIST_PATH = path.join(__dirname, "/resources/embedding-sdk/dist");-const SDK_SRC_PATH =+const SDK_PACKAGE_SRC_PATH =+ __dirname + "/enterprise/frontend/src/embedding-sdk-package";+const SDK_BUNDLE_SRC_PATH =__dirname + "/enterprise/frontend/src/embedding-sdk-bundle";const SDK_CLI_PATH = path.join(__dirname,- "/enterprise/frontend/src/embedding-sdk-bundle/cli",+ "/enterprise/frontend/src/embedding-sdk-package/cli",);const METABASE_SRC_PATH = path.join(__dirname, "/frontend/src/metabase");@@ -35,7 +37,8 @@ const config = {alias: {metabase: METABASE_SRC_PATH,"metabase-types": TYPES_SRC_PATH,- "embedding-sdk-bundle": SDK_SRC_PATH,+ "embedding-sdk-package": SDK_PACKAGE_SRC_PATH,+ "embedding-sdk-bundle": SDK_BUNDLE_SRC_PATH,},},module: {diff --git a/rspack.embedding-sdk-package.config.js b/rspack.embedding-sdk-package.config.jsindex ad207b611e5..f820acdef1b 100644--- a/rspack.embedding-sdk-package.config.js+++ b/rspack.embedding-sdk-package.config.js@@ -24,18 +24,20 @@ const {getSdkVersionFromPackageJson,} = require("./frontend/build/embedding-sdk/lib/get-sdk-version-from-package-json");-const SDK_SRC_PATH =- __dirname + "/enterprise/frontend/src/embedding-sdk-bundle";+const SDK_PACKAGE_SRC_PATH =+ __dirname + "/enterprise/frontend/src/embedding-sdk-package";+const BUILD_PATH = __dirname + "/resources/embedding-sdk";const EMBEDDING_SDK_BUNDLE_HOST = process.env.EMBEDDING_SDK_BUNDLE_HOST || "";const config = {- context: SDK_SRC_PATH,+ context: SDK_PACKAGE_SRC_PATH,devtool: false,entry: "./index.ts",+output: {path: BUILD_PATH + "/dist",publicPath: "",diff --git a/rspack.iframe-sdk-embed.config.js b/rspack.iframe-sdk-embed.config.jsindex 677e30da339..eda5f625a57 100644--- a/rspack.iframe-sdk-embed.config.js+++ b/rspack.iframe-sdk-embed.config.js@@ -17,7 +17,7 @@ const SCRIPT_TAG_PATH = path.resolve(const BUILD_PATH = __dirname + "/resources/frontend_client";const EMBEDDING_SRC_PATH = __dirname + "/enterprise/frontend/src/embedding";-const SDK_SRC_PATH =+const SDK_BUNDLE_SRC_PATH =__dirname + "/enterprise/frontend/src/embedding-sdk-bundle";const OUT_FILE_NAME = "embed.js";@@ -77,7 +77,7 @@ module.exports = {extensions: [".js", ".ts"],alias: {embedding: EMBEDDING_SRC_PATH,- "embedding-sdk-bundle": SDK_SRC_PATH,+ "embedding-sdk-bundle": SDK_BUNDLE_SRC_PATH,},},};diff --git a/rspack.main.config.js b/rspack.main.config.jsindex 202334b7a3b..ef993fe7a29 100644--- a/rspack.main.config.js+++ b/rspack.main.config.js@@ -28,8 +28,12 @@ const LIB_SRC_PATH = __dirname + "/frontend/src/metabase-lib";const ENTERPRISE_SRC_PATH =__dirname + "/enterprise/frontend/src/metabase-enterprise";const EMBEDDING_SRC_PATH = __dirname + "/enterprise/frontend/src/embedding";-const SDK_SRC_PATH =+const SDK_PACKAGE_SRC_PATH =+ __dirname + "/enterprise/frontend/src/embedding-sdk-package";+const SDK_BUNDLE_SRC_PATH =__dirname + "/enterprise/frontend/src/embedding-sdk-bundle";+const SDK_SHARED_SRC_PATH =+ __dirname + "/enterprise/frontend/src/embedding-sdk-shared";const TYPES_SRC_PATH = __dirname + "/frontend/src/metabase-types";const CLJS_SRC_PATH = __dirname + "/target/cljs_release";const CLJS_SRC_PATH_DEV = __dirname + "/target/cljs_dev";@@ -225,7 +229,9 @@ const config = {"ee-plugins": resolveEnterprisePathOrNoop("/plugins"),"ee-overrides": resolveEnterprisePathOrNoop("/overrides"),embedding: EMBEDDING_SRC_PATH,- "embedding-sdk-bundle": SDK_SRC_PATH,+ "embedding-sdk-package": SDK_PACKAGE_SRC_PATH,+ "embedding-sdk-bundle": SDK_BUNDLE_SRC_PATH,+ "embedding-sdk-shared": SDK_SHARED_SRC_PATH,"sdk-iframe-embedding-ee-plugins": resolveEnterprisePathOrNoop("/sdk-iframe-embedding-plugins",),diff --git a/rspack.static-viz.config.js b/rspack.static-viz.config.jsindex 432ab6ffb19..f7a263c8bda 100644--- a/rspack.static-viz.config.js+++ b/rspack.static-viz.config.js@@ -12,7 +12,7 @@ const CLJS_SRC_PATH_DEV = __dirname + "/target/cljs_dev";const LIB_SRC_PATH = __dirname + "/frontend/src/metabase-lib";const TYPES_SRC_PATH = __dirname + "/frontend/src/metabase-types";const EMBEDDING_SRC_PATH = __dirname + "/enterprise/frontend/src/embedding";-const SDK_SRC_PATH =+const SDK_BUNDLE_SRC_PATH =__dirname + "/enterprise/frontend/src/embedding-sdk-bundle";const ENTERPRISE_SRC_PATH =__dirname + "/enterprise/frontend/src/metabase-enterprise";@@ -119,7 +119,7 @@ module.exports = (env) => {"metabase-lib": LIB_SRC_PATH,"metabase-types": TYPES_SRC_PATH,embedding: EMBEDDING_SRC_PATH,- "embedding-sdk-bundle": SDK_SRC_PATH,+ "embedding-sdk-bundle": SDK_BUNDLE_SRC_PATH,"process/browser": require.resolve("process/browser"),"ee-overrides":process.env.MB_EDITION === "ee"