@blocklet/pages-kit 0.7.0 → 0.7.2

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.
@@ -29,6 +29,7 @@ const arcblockUx = __importStar(require("../builtin/arcblock/ux"));
29
29
  const imagePreview = __importStar(require("../builtin/async/image-preview"));
30
30
  const colorPicker = __importStar(require("../builtin/color-picker"));
31
31
  const components = __importStar(require("../builtin/components"));
32
+ const dayjs = __importStar(require("../builtin/dayjs"));
32
33
  const emotionCss = __importStar(require("../builtin/emotion/css"));
33
34
  const eventBus = __importStar(require("../builtin/event-bus"));
34
35
  const iconifyReact = __importStar(require("../builtin/iconify/react"));
@@ -67,6 +68,7 @@ function injectGlobalComponents() {
67
68
  const modules = {
68
69
  React: react,
69
70
  ReactDOM: reactDOM,
71
+ '@blocklet/pages-kit/builtin/dayjs': dayjs,
70
72
  '@blocklet/pages-kit/builtin/utils': utils,
71
73
  '@blocklet/pages-kit/builtin/react': react,
72
74
  '@blocklet/pages-kit/builtin/react-dom': reactDOM,
@@ -294,6 +294,9 @@ const getComponentByComponentId = ({ componentId, locale, instanceId, }) => {
294
294
  };
295
295
  function usePreloadComponent({ instanceId, componentId, properties, locale, dev }) {
296
296
  const previousRef = useRef(undefined);
297
+ if (dev?.mode === 'draft') {
298
+ return null;
299
+ }
297
300
  const realLocale = getRealLocale(locale);
298
301
  const result = getComponentByComponentId({ componentId, locale: realLocale, instanceId });
299
302
  if (result) {