@blocklet/pages-kit 0.2.422 → 0.2.424

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,9 +5,10 @@ const ufo_1 = require("ufo");
5
5
  const request_1 = require("./request");
6
6
  const presets = {
7
7
  avatar: { w: 80 },
8
+ default: { w: 1200 },
8
9
  };
9
10
  function getAssetUrl({ blockletDid, aid, filename, w, preset, }) {
10
- var _a;
11
+ var _a, _b;
11
12
  const url = filename && aid && !(filename === null || filename === void 0 ? void 0 : filename.startsWith('http'))
12
13
  ? (0, ufo_1.withQuery)((0, ufo_1.joinURL)((0, request_1.getAIRuntimeApiPrefix)(), '/api/agents', aid, 'assets', filename), {
13
14
  blockletDid,
@@ -15,9 +16,10 @@ function getAssetUrl({ blockletDid, aid, filename, w, preset, }) {
15
16
  : filename;
16
17
  if (!url)
17
18
  return url;
18
- const width = w !== null && w !== void 0 ? w : (_a = presets[preset]) === null || _a === void 0 ? void 0 : _a.w;
19
+ const width = (_b = w !== null && w !== void 0 ? w : (_a = presets[preset]) === null || _a === void 0 ? void 0 : _a.w) !== null && _b !== void 0 ? _b : presets.default.w;
19
20
  return (0, ufo_1.withQuery)(url, {
20
21
  imageFilter: width ? 'resize' : undefined,
22
+ f: 'webp',
21
23
  w: width,
22
24
  });
23
25
  }
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.MarkdownView = exports.GoogleSearchSourcesView = exports.GoogleSearchRelatedQuestionsView = exports.ImagesView = exports.OpeningQuestionsView = exports.ShareView = exports.ReferencedLinksView = exports.SuggestedQuestionsView = exports.PhotoGalleryItem = exports.ChatOutput = exports.SimpleOutput = exports.AutoForm = exports.PhotoGallery = exports.SimpleChat = exports.SimplePage = exports.ChatBotButton = exports.Runtime = exports.useAppearances = exports.ActiveAgentProvider = exports.CurrentMessageProvider = exports.CurrentAgentProvider = exports.ComponentPreferencesProvider = exports.RuntimeProvider = exports.AgentErrorBoundary = exports.runAgent = void 0;
20
+ exports.NFTDisplay = exports.MarkdownView = exports.GoogleSearchSourcesView = exports.GoogleSearchRelatedQuestionsView = exports.ImagesView = exports.OpeningQuestionsView = exports.ShareView = exports.ReferencedLinksView = exports.SuggestedQuestionsView = exports.PhotoGalleryItem = exports.ChatOutput = exports.SimpleOutput = exports.AutoForm = exports.PhotoGallery = exports.SimpleChat = exports.SimplePage = exports.ChatBotButton = exports.Runtime = exports.useAppearances = exports.ActiveAgentProvider = exports.CurrentMessageProvider = exports.CurrentAgentProvider = exports.ComponentPreferencesProvider = exports.RuntimeProvider = exports.AgentErrorBoundary = exports.runAgent = void 0;
21
21
  var session_1 = require("./api/session");
22
22
  Object.defineProperty(exports, "runAgent", { enumerable: true, get: function () { return session_1.runAgent; } });
23
23
  var AgentErrorBoundary_1 = require("./components/AgentErrorBoundary");
@@ -77,5 +77,7 @@ var GoogleSearchSourcesView_1 = require("./runtime-components/GoogleSearch/Googl
77
77
  Object.defineProperty(exports, "GoogleSearchSourcesView", { enumerable: true, get: function () { return __importDefault(GoogleSearchSourcesView_1).default; } });
78
78
  var MarkdownView_1 = require("./runtime-components/MarkdownView");
79
79
  Object.defineProperty(exports, "MarkdownView", { enumerable: true, get: function () { return __importDefault(MarkdownView_1).default; } });
80
+ var NFTDisplay_1 = require("@arcblock/ux/lib/NFTDisplay");
81
+ Object.defineProperty(exports, "NFTDisplay", { enumerable: true, get: function () { return __importDefault(NFTDisplay_1).default; } });
80
82
  // only use to debug, should be removed when PR
81
83
  __exportStar(require("./runtime-components/V0"), exports);