soma-core 1.3.5 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +20 -7
  2. package/app/SomaPageClient.tsx +4 -4
  3. package/app/components/SomaHostPage.tsx +5 -5
  4. package/app/components/SomaHydrationShell.tsx +4 -7
  5. package/app/globals.css +126 -3
  6. package/core/build/{v2 → blocks}/block-compile.ts +47 -18
  7. package/core/build/{v2/soma-file-loader.ts → blocks/block-container.ts} +28 -37
  8. package/core/build/{v2 → blocks}/block-loader.ts +1 -1
  9. package/core/build/{v2 → blocks}/html-index.ts +1 -1
  10. package/core/build/{v2/migrate-v1.ts → blocks/migrate-flat.ts} +27 -27
  11. package/core/build/compiler/host-config-sync.cjs +2 -9
  12. package/core/build/compiler/page-declaration-compiler.ts +32 -4
  13. package/core/build/compiler/soma-manifest-webpack-plugin.js +1 -1
  14. package/core/build/compiler/soma-precompile.js +2057 -35
  15. package/core/build/compiler/soma-precompile.ts +2 -2
  16. package/core/build/component/component-graph.ts +208 -0
  17. package/core/build/eject/component-eject.ts +473 -0
  18. package/core/build/eject/component-upgrade.ts +359 -0
  19. package/core/build/layout/constraint-solver.ts +235 -0
  20. package/core/build/layout/css-emitter.ts +116 -0
  21. package/core/build/layout/page-layout.ts +85 -0
  22. package/core/build/pack/pack-init.ts +265 -0
  23. package/core/client/base/SomaPageRootBase.ts +61 -0
  24. package/core/client/component/ai-catalog.ts +83 -8
  25. package/core/client/component/component-defaults.ts +100 -0
  26. package/core/client/component/component-definition.types.ts +39 -0
  27. package/core/client/component/component-manager.ts +79 -4
  28. package/core/client/component/component-pack.ts +126 -2
  29. package/core/client/component/contract-compat.ts +32 -3
  30. package/core/client/component/{example-v2.ts → example-blocks.ts} +19 -19
  31. package/core/client/component/keyboard-matrix.ts +144 -0
  32. package/core/client/component/pack-styles.ts +59 -1
  33. package/core/client/component/style-features.ts +131 -0
  34. package/core/client/component/theme-component-tokens.ts +83 -0
  35. package/core/client/data/data-object-resolver.ts +407 -4
  36. package/core/client/data/reaction-engine.ts +176 -0
  37. package/core/client/data/window-engine.ts +477 -0
  38. package/core/client/engine/event-engine.ts +98 -0
  39. package/core/client/engine/soma-bootstrap.ts +286 -7
  40. package/core/client/engine/step-runner.ts +134 -0
  41. package/core/client/engine/style-binder.ts +1 -1
  42. package/core/client/infra/notify/DomNotifyService.ts +2 -1
  43. package/core/client/infra/notify/INotifyTheme.ts +1 -1
  44. package/core/client/parser/{v2 → blocks}/namespace.ts +1 -1
  45. package/core/client/parser/{v2 → blocks}/page-parser.ts +30 -16
  46. package/core/client/parser/{v2 → blocks}/use-parser.ts +24 -25
  47. package/core/client/parser/data-config-parser.ts +316 -8
  48. package/core/client/parser/duration.ts +16 -0
  49. package/core/client/parser/layout-parser.ts +157 -0
  50. package/core/client/parser/page-state-parser.ts +166 -0
  51. package/core/client/parser/pipeline-parser.ts +76 -1
  52. package/core/client/parser/reaction-parser.ts +459 -0
  53. package/core/client/parser/reaction-sugar.ts +47 -0
  54. package/core/client/parser/step-parser.ts +359 -0
  55. package/core/client/parser/style-config-parser.ts +7 -7
  56. package/core/client/parser/ui-config-parser.ts +59 -0
  57. package/core/client/parser/value-lang.ts +1 -1
  58. package/core/client/parser/window-parser.ts +294 -0
  59. package/core/client/registry/index.ts +8 -0
  60. package/core/client/theme/theme-engine.ts +144 -16
  61. package/core/client/typography/typography-base.ts +1 -1
  62. package/core/index.ts +188 -13
  63. package/core/server/host/csp-nonce-metadata.ts +1 -1
  64. package/core/server/host/published-page-assets.ts +3 -8
  65. package/core/server/host/soma-page-compile.ts +1 -1
  66. package/core/server/index.ts +2 -2
  67. package/core/shared/block-errors.ts +11 -0
  68. package/core/shared/calc/coerce.ts +29 -0
  69. package/core/shared/calc/errors.ts +43 -0
  70. package/core/shared/calc/evaluator.ts +101 -0
  71. package/core/shared/calc/index.ts +12 -0
  72. package/core/shared/calc/lexer.ts +194 -0
  73. package/core/shared/calc/parser.ts +204 -0
  74. package/core/shared/calc/typer.ts +184 -0
  75. package/core/shared/path-algebra.ts +169 -0
  76. package/core/shared/predicates/index.ts +527 -0
  77. package/core/shared/published-page-route.ts +61 -0
  78. package/core/shared/types/adaptive.types.ts +1 -1
  79. package/core/shared/types/component-contract.types.ts +128 -2
  80. package/core/shared/types/data-config.types.ts +149 -2
  81. package/core/shared/types/domain.types.ts +13 -0
  82. package/core/shared/types/event.types.ts +22 -2
  83. package/core/shared/types/layout-constraint.types.ts +73 -0
  84. package/core/shared/types/page-state.types.ts +60 -0
  85. package/core/shared/types/reaction.types.ts +144 -0
  86. package/core/shared/types/scope-manifest.types.ts +11 -15
  87. package/core/shared/types/step.types.ts +91 -0
  88. package/core/shared/types/style-config.types.ts +4 -4
  89. package/core/shared/types/ui-config.types.ts +18 -0
  90. package/core/shared/types/window.types.ts +177 -0
  91. package/dist/cli/soma.js +28 -3
  92. package/dist/core/index.cjs +4829 -405
  93. package/dist/types/build/{v2 → blocks}/block-compile.d.ts +7 -7
  94. package/dist/types/build/{v2/soma-file-loader.d.ts → blocks/block-container.d.ts} +6 -11
  95. package/dist/types/build/{v2/migrate-v1.d.ts → blocks/migrate-flat.d.ts} +6 -6
  96. package/dist/types/build/compiler/page-declaration-compiler.d.ts +2 -0
  97. package/dist/types/build/component/component-graph.d.ts +85 -0
  98. package/dist/types/build/eject/component-eject.d.ts +121 -0
  99. package/dist/types/build/eject/component-upgrade.d.ts +43 -0
  100. package/dist/types/build/layout/constraint-solver.d.ts +36 -0
  101. package/dist/types/build/layout/css-emitter.d.ts +18 -0
  102. package/dist/types/build/layout/page-layout.d.ts +24 -0
  103. package/dist/types/build/pack/pack-init.d.ts +8 -0
  104. package/dist/types/client/base/SomaPageRootBase.d.ts +28 -0
  105. package/dist/types/client/component/ai-catalog.d.ts +24 -1
  106. package/dist/types/client/component/component-defaults.d.ts +15 -0
  107. package/dist/types/client/component/component-definition.types.d.ts +38 -0
  108. package/dist/types/client/component/component-manager.d.ts +36 -0
  109. package/dist/types/client/component/component-pack.d.ts +32 -2
  110. package/dist/types/client/component/contract-compat.d.ts +2 -2
  111. package/dist/types/client/component/example-blocks.d.ts +9 -0
  112. package/dist/types/client/component/keyboard-matrix.d.ts +24 -0
  113. package/dist/types/client/component/pack-styles.d.ts +21 -0
  114. package/dist/types/client/component/style-features.d.ts +26 -0
  115. package/dist/types/client/component/theme-component-tokens.d.ts +14 -0
  116. package/dist/types/client/data/data-object-resolver.d.ts +106 -1
  117. package/dist/types/client/data/reaction-engine.d.ts +21 -0
  118. package/dist/types/client/data/window-engine.d.ts +27 -0
  119. package/dist/types/client/engine/event-engine.d.ts +15 -0
  120. package/dist/types/client/engine/soma-bootstrap.d.ts +70 -0
  121. package/dist/types/client/engine/step-runner.d.ts +24 -0
  122. package/dist/types/client/infra/notify/DomNotifyService.d.ts +2 -1
  123. package/dist/types/client/infra/notify/INotifyTheme.d.ts +1 -1
  124. package/dist/types/client/parser/{v2 → blocks}/page-parser.d.ts +2 -2
  125. package/dist/types/client/parser/{v2 → blocks}/use-parser.d.ts +3 -3
  126. package/dist/types/client/parser/duration.d.ts +1 -0
  127. package/dist/types/client/parser/layout-parser.d.ts +9 -0
  128. package/dist/types/client/parser/page-state-parser.d.ts +32 -0
  129. package/dist/types/client/parser/reaction-parser.d.ts +16 -0
  130. package/dist/types/client/parser/reaction-sugar.d.ts +13 -0
  131. package/dist/types/client/parser/step-parser.d.ts +23 -0
  132. package/dist/types/client/parser/style-config-parser.d.ts +1 -1
  133. package/dist/types/client/parser/ui-config-parser.d.ts +5 -0
  134. package/dist/types/client/parser/window-parser.d.ts +25 -0
  135. package/dist/types/client/registry/index.d.ts +1 -0
  136. package/dist/types/client/theme/theme-engine.d.ts +37 -0
  137. package/dist/types/index.d.ts +40 -9
  138. package/dist/types/server/host/published-page-assets.d.ts +3 -2
  139. package/dist/types/server/index.d.ts +1 -1
  140. package/dist/types/shared/block-errors.d.ts +5 -0
  141. package/dist/types/shared/calc/coerce.d.ts +4 -0
  142. package/dist/types/shared/calc/errors.d.ts +14 -0
  143. package/dist/types/shared/calc/evaluator.d.ts +2 -0
  144. package/dist/types/shared/calc/index.d.ts +6 -0
  145. package/dist/types/shared/calc/lexer.d.ts +20 -0
  146. package/dist/types/shared/calc/parser.d.ts +49 -0
  147. package/dist/types/shared/calc/typer.d.ts +16 -0
  148. package/dist/types/shared/path-algebra.d.ts +56 -0
  149. package/dist/types/shared/predicates/index.d.ts +79 -0
  150. package/dist/types/shared/published-page-route.d.ts +21 -0
  151. package/dist/types/shared/types/component-contract.types.d.ts +112 -0
  152. package/dist/types/shared/types/data-config.types.d.ts +132 -2
  153. package/dist/types/shared/types/domain.types.d.ts +12 -0
  154. package/dist/types/shared/types/event.types.d.ts +8 -2
  155. package/dist/types/shared/types/layout-constraint.types.d.ts +52 -0
  156. package/dist/types/shared/types/page-state.types.d.ts +49 -0
  157. package/dist/types/shared/types/reaction.types.d.ts +115 -0
  158. package/dist/types/shared/types/scope-manifest.types.d.ts +11 -11
  159. package/dist/types/shared/types/step.types.d.ts +76 -0
  160. package/dist/types/shared/types/style-config.types.d.ts +4 -4
  161. package/dist/types/shared/types/ui-config.types.d.ts +18 -0
  162. package/dist/types/shared/types/window.types.d.ts +171 -0
  163. package/package.json +2 -6
  164. package/dist/types/client/component/example-v2.d.ts +0 -9
  165. package/postcss.config.js +0 -6
  166. package/tailwind.config.ts +0 -43
  167. /package/dist/types/build/{v2 → blocks}/block-loader.d.ts +0 -0
  168. /package/dist/types/build/{v2 → blocks}/html-index.d.ts +0 -0
  169. /package/dist/types/client/parser/{v2 → blocks}/namespace.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- // v1 → v2 迁移器(REQ-005 F8.3)。
1
+ // 平铺声明 → 块声明 迁移器(REQ-005 F8.3)。
2
2
  //
3
3
  // 迁移必须是**机械的**:逐条封闭变换规则,不含判断、不猜意图。
4
4
  // 因为迁移器要跑在存量页面上,一次"聪明的推断"就是一次静默改语义。
@@ -12,7 +12,7 @@
12
12
 
13
13
  import type { BindDeclaration, UiConfig } from '../../shared/types/ui-config.types';
14
14
 
15
- export interface V1PageFiles {
15
+ export interface FlatPageFiles {
16
16
  uiYaml: Record<string, unknown>;
17
17
  eventYaml?: Record<string, unknown>;
18
18
  styleYaml?: Record<string, unknown>;
@@ -27,20 +27,20 @@ export interface MigrationReport {
27
27
  }
28
28
 
29
29
  export interface MigrationResult {
30
- /** v2 文本(含 `{{` 开关) */
30
+ /** 块声明文本(含 `{{` 开关) */
31
31
  somaText: string;
32
32
  /** 结构形态(便于测试与等价比对) */
33
33
  blocks: Record<string, unknown>;
34
34
  report: MigrationReport;
35
35
  }
36
36
 
37
- /** 迁移一页 v1 声明为 v2 块结构 */
38
- export function migrateV1(files: V1PageFiles): MigrationResult {
37
+ /** 把一页平铺声明迁移为块结构 */
38
+ export function migrateFlatToBlocks(files: FlatPageFiles): MigrationResult {
39
39
  const report: MigrationReport = { changes: [], manual: [] };
40
40
  const ui = files.uiYaml as unknown as UiConfig;
41
41
 
42
42
  if (!ui?.bind?.obj) {
43
- throw new Error('[soma-core][引擎] v1 _ui.yaml 缺少 bind.obj,无法迁移');
43
+ throw new Error('[soma-core][引擎] 平铺 _ui.yaml 缺少 bind.obj,无法迁移');
44
44
  }
45
45
 
46
46
  const pageBlock: Record<string, unknown> = { domain: ui.bind.obj };
@@ -51,12 +51,12 @@ export function migrateV1(files: V1PageFiles): MigrationResult {
51
51
  }
52
52
  if (ui.bind.var && ui.bind.var !== 'page') {
53
53
  report.manual.push(
54
- `顶层变量名是 "${ui.bind.var}" 而非 page——v2 固定为 page,`
54
+ `顶层变量名是 "${ui.bind.var}" 而非 page——块声明固定为 page,`
55
55
  + '请全局替换该页所有引用后再迁移',
56
56
  );
57
57
  }
58
58
 
59
- // watch:v1 onChange → v2 watch 段
59
+ // watch:平铺 onChange → 块 watch 段
60
60
  if (ui.bind.onChange?.length) {
61
61
  pageBlock.watch = ui.bind.onChange.map((rule) => ({
62
62
  path: rule.condition,
@@ -105,7 +105,7 @@ export function migrateV1(files: V1PageFiles): MigrationResult {
105
105
  return { somaText: renderSoma(blocks), blocks, report };
106
106
  }
107
107
 
108
- /** show 树 → 平铺 page.ui + 组件块(实例分离是 v2 的核心形状变化) */
108
+ /** show 树 → 平铺 page.ui + 组件块(实例分离是块声明的核心形状变化) */
109
109
  function flattenShow(
110
110
  show: Record<string, unknown>,
111
111
  pageUi: Record<string, unknown>,
@@ -175,8 +175,8 @@ function migrateEvents(
175
175
  const extra: Record<string, unknown> = {};
176
176
 
177
177
  /**
178
- * 列表作用域在 v1 事件里是**嵌套**的(外层键 = 列表锚点)。
179
- * v2 保持同形——曾经把它拍平成 `列表.锚点.事件` 三段,
178
+ * 列表作用域在平铺事件里是**嵌套**的(外层键 = 列表锚点)。
179
+ * 块声明保持同形——曾经把它拍平成 `列表.锚点.事件` 三段,
180
180
  * 解析器直接拒收(DOM 事件白名单只认两段),既有 Host 实迁时当场暴露。
181
181
  * 嵌套照搬,只把其中的 emit 抽走。
182
182
  */
@@ -234,7 +234,7 @@ function reportStyleMigration(styleYaml: Record<string, unknown>, report: Migrat
234
234
  if (transitions && Object.keys(transitions).length > 0) {
235
235
  report.manual.push(
236
236
  `_style.yaml transitions(${Object.keys(transitions).length} 项):`
237
- + '改写为 HTML class 的 Tailwind 变体(hover: / focus:)',
237
+ + '改写为 HTML class 的 CSS 变体(hover: / focus:;具体实现由宿主样式系统提供)',
238
238
  );
239
239
  }
240
240
  if (states && Object.keys(states).length > 0) {
@@ -244,7 +244,7 @@ function reportStyleMigration(styleYaml: Record<string, unknown>, report: Migrat
244
244
  }
245
245
  }
246
246
 
247
- /** 块结构 → v2 文本(YAML 风格,两空格缩进) */
247
+ /** 块结构 → 块声明文本(YAML 风格,两空格缩进) */
248
248
  function renderSoma(blocks: Record<string, unknown>): string {
249
249
  const lines: string[] = ['{{'];
250
250
  for (const [blockId, body] of Object.entries(blocks)) {
@@ -301,29 +301,29 @@ function formatScalar(value: unknown): string {
301
301
  * 但绑定关系、作用域层级、事件路由必须逐条对得上。
302
302
  */
303
303
  export function verifyEquivalence(
304
- v1Ui: UiConfig,
305
- v2Compiled: { ui: UiConfig; event: Record<string, unknown> },
306
- v1Event: Record<string, unknown> = {},
304
+ flatUi: UiConfig,
305
+ blockCompiled: { ui: UiConfig; event: Record<string, unknown> },
306
+ flatEvent: Record<string, unknown> = {},
307
307
  ): string[] {
308
308
  const issues: string[] = [];
309
309
 
310
- if (v1Ui.bind.obj !== v2Compiled.ui.bind.obj) {
311
- issues.push(`domain 不一致: ${v1Ui.bind.obj} → ${v2Compiled.ui.bind.obj}`);
310
+ if (flatUi.bind.obj !== blockCompiled.ui.bind.obj) {
311
+ issues.push(`domain 不一致: ${flatUi.bind.obj} → ${blockCompiled.ui.bind.obj}`);
312
312
  }
313
313
 
314
- const v1Paths = collectBindings(v1Ui.show ?? {}, '');
315
- const v2Paths = collectBindings(v2Compiled.ui.show ?? {}, '');
316
- for (const [anchor, expr] of v1Paths) {
317
- const after = v2Paths.get(anchor);
314
+ const flatPaths = collectBindings(flatUi.show ?? {}, '');
315
+ const blockPaths = collectBindings(blockCompiled.ui.show ?? {}, '');
316
+ for (const [anchor, expr] of flatPaths) {
317
+ const after = blockPaths.get(anchor);
318
318
  if (after === undefined) issues.push(`绑定丢失: ${anchor}`);
319
319
  else if (after !== expr) issues.push(`绑定变化: ${anchor} "${expr}" → "${after}"`);
320
320
  }
321
321
 
322
- // 两侧必须同法拍平:v2 保留列表作用域嵌套,直接比顶层键会把嵌套项误判成丢失
323
- const v1EventKeys = collectEventKeys(v1Event, '');
324
- const v2EventKeys = new Set(collectEventKeys(v2Compiled.event, ''));
325
- for (const key of v1EventKeys) {
326
- if (!v2EventKeys.has(key)) issues.push(`事件丢失: ${key}`);
322
+ // 两侧必须同法拍平:块声明保留列表作用域嵌套,直接比顶层键会把嵌套项误判成丢失
323
+ const flatEventKeys = collectEventKeys(flatEvent, '');
324
+ const blockEventKeys = new Set(collectEventKeys(blockCompiled.event, ''));
325
+ for (const key of flatEventKeys) {
326
+ if (!blockEventKeys.has(key)) issues.push(`事件丢失: ${key}`);
327
327
  }
328
328
 
329
329
  return issues;
@@ -6,7 +6,6 @@ const { resolveHostConfigRoot } = require('../../server/host/host-config-paths.c
6
6
  const SYNC_FILES = [
7
7
  'locale.yaml',
8
8
  'app.config.yaml',
9
- 'tailwind.config.js',
10
9
  ];
11
10
 
12
11
  function listEnvAppConfigFiles(configRoot) {
@@ -28,14 +27,8 @@ function syncHostConfig(hostDir, outputDir) {
28
27
  if (!fs.existsSync(target)) fs.mkdirSync(target, { recursive: true });
29
28
 
30
29
  for (const rel of SYNC_FILES) {
31
- const resolvedSrc =
32
- rel === 'tailwind.config.js'
33
- ? path.join(hostDir, rel)
34
- : path.join(configRoot, rel);
35
- const dest =
36
- rel === 'tailwind.config.js'
37
- ? path.join(target, rel)
38
- : path.join(target, 'config', rel);
30
+ const resolvedSrc = path.join(configRoot, rel);
31
+ const dest = path.join(target, 'config', rel);
39
32
  if (!fs.existsSync(resolvedSrc)) {
40
33
  skipped.push(rel);
41
34
  continue;
@@ -1,5 +1,5 @@
1
1
  import yaml from 'js-yaml';
2
- import { compileSomaV2 } from '../v2/block-compile';
2
+ import { compileSomaBlocks } from '../blocks/block-compile';
3
3
  import { expandSomaHtmlIncludes } from './html-include-expander';
4
4
  import type { SomaDataConfig } from '../../shared/types/data-config.types';
5
5
  import type { ParsedEvent } from '../../shared/types/event.types';
@@ -11,6 +11,8 @@ import {
11
11
  compileDataConfig,
12
12
  compileEventConfigFromRaw,
13
13
  } from './soma-precompile';
14
+ import { compilePageLayout } from '../layout/page-layout';
15
+ import { parsePageState } from '../../client/parser/page-state-parser';
14
16
 
15
17
  export interface SomaPageDeclarationInput {
16
18
  html: string;
@@ -37,6 +39,8 @@ export interface CompiledPageDeclaration {
37
39
  timers: ParsedTimer[];
38
40
  styleConfig?: StyleConfig;
39
41
  dataConfig?: SomaDataConfig;
42
+ /** `layout:` 段的构建期产物:只含容器查询 + flex(CL-2);没声明就没有 */
43
+ layoutCss?: string;
40
44
  runtimeAssets: SomaRuntimeDeclarationAssets;
41
45
  }
42
46
 
@@ -61,7 +65,7 @@ export function compilePageDeclaration(input: SomaPageDeclarationInput): Compile
61
65
  );
62
66
  }
63
67
 
64
- const compiled = compileSomaV2({
68
+ const compiled = compileSomaBlocks({
65
69
  html: expandSomaHtmlIncludes(input.html, input.includes),
66
70
  uiYamlRaw: input.uiYaml,
67
71
  ...(input.externalBlocks ? { externalBlocks: input.externalBlocks } : {}),
@@ -69,14 +73,38 @@ export function compilePageDeclaration(input: SomaPageDeclarationInput): Compile
69
73
  const eventBundle = compileEventConfigFromRaw(compiled.event);
70
74
  const embeddedDataYaml = Object.keys(compiled.data).length > 0 ? dump({ data: compiled.data }) : '';
71
75
 
76
+ // state:这里两份资产都在手(数据对象名 + HTML 锚点),做完整校验。
77
+ // parseUiConfig 在运行时只校验形状——它拿不到数据对象名(见那边的注释)。
78
+ if (compiled.ui.state !== undefined) {
79
+ compiled.ui.state = parsePageState(
80
+ {
81
+ raw: compiled.ui.state,
82
+ objectNames: Object.keys(compiled.data),
83
+ anchorIds: [...compiled.htmlIndex.anchors.keys()],
84
+ path: 'page.state',
85
+ },
86
+ { fail(message, path): never { throw new Error(`[soma-core][页面态] ${message}(${path})`); } },
87
+ );
88
+ }
89
+
90
+ // layout:构建期求解(CL-4)。运行时资产里只留产物 `layout_css`,声明本身不下发——
91
+ // 下发了浏览器也不会(也不该)去解它。
92
+ const layout = compiled.ui.layout !== undefined
93
+ ? compilePageLayout({ raw: compiled.ui.layout, htmlIndex: compiled.htmlIndex, hostClass: compiled.ui.bind.obj })
94
+ : null;
95
+ if (layout) compiled.ui.layout = layout.constraints;
96
+ const { layout: _layoutDecl, ...runtimeUi } = compiled.ui;
97
+ const runtimeUiWithCss = layout ? { ...runtimeUi, layout_css: layout.css } : runtimeUi;
98
+
72
99
  return {
73
- uiConfig: compiled.ui,
100
+ uiConfig: layout ? { ...compiled.ui, layoutCss: layout.css } : compiled.ui,
74
101
  eventConfig: eventBundle.events,
75
102
  triggers: eventBundle.triggers,
76
103
  timers: eventBundle.timers,
77
104
  ...(embeddedDataYaml ? { dataConfig: compileDataConfig(embeddedDataYaml) } : {}),
105
+ ...(layout ? { layoutCss: layout.css } : {}),
78
106
  runtimeAssets: {
79
- uiYaml: dump(compiled.ui),
107
+ uiYaml: dump(runtimeUiWithCss),
80
108
  eventYaml: Object.keys(compiled.event).length > 0 ? dump(compiled.event) : '',
81
109
  styleYaml: '',
82
110
  ...(embeddedDataYaml ? { dataYaml: embeddedDataYaml } : {}),
@@ -214,7 +214,7 @@ class SomaManifestWebpackPlugin {
214
214
 
215
215
  try {
216
216
  const { precompileAll } = this.jiti('./full-manifest-builder.ts');
217
- const { loadExternalBlocks } = this.jiti('../v2/block-loader.ts');
217
+ const { loadExternalBlocks } = this.jiti('../blocks/block-loader.ts');
218
218
  const sources = getSomaAssetSources(hostDir);
219
219
  const pageEntries = collectPageEntries(sources);
220
220
  const includes = collectIncludes(sources);