@ptengine/lp-editor-core 1.0.0-alpha.7 → 1.0.0-alpha.8

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "COMPILER_VERSION": "2",
2
+ "COMPILER_VERSION": "3",
3
3
  "fixtures": [
4
4
  {
5
5
  "fixture": "canonical/01-tailwind-landing.txt",
@@ -692,14 +692,14 @@
692
692
  "kind": "export",
693
693
  "input": "fixtures/page/01-etvos-article-lp.html#document",
694
694
  "inputSha256": "363c2748670245a1fe44f4eb4bf30ee9ceed07dbcb72b8ef79a6d8f40f74161a",
695
- "sha256": "7cb7aba645c6d3c682c29694a6c78ad91a74944afc6d2ed9591724167ba9b9d0"
695
+ "sha256": "770251c6de37fd744d4f219fd2d391e5f2ff0c018d586052009127af15bfb1cb"
696
696
  },
697
697
  {
698
698
  "fixture": "export/01-etvos-article-lp.html.txt",
699
699
  "kind": "export",
700
700
  "input": "fixtures/page/01-etvos-article-lp.html#html",
701
701
  "inputSha256": "363c2748670245a1fe44f4eb4bf30ee9ceed07dbcb72b8ef79a6d8f40f74161a",
702
- "sha256": "466d649a03de2c3a3362a43c60b8a5d98840f9f8804c6940777557a36c716688"
702
+ "sha256": "79f3d0f2db69a85150e0c4fa52007d91180637d194f554d60df3c3a88086613c"
703
703
  },
704
704
  {
705
705
  "fixture": "export/01-etvos-article-lp.js.txt",
@@ -720,14 +720,14 @@
720
720
  "kind": "export",
721
721
  "input": "fixtures/page/02-vivaia-campaign-lp.html#document",
722
722
  "inputSha256": "7584711561c7a7dd5e8d7541f0dc9492b4d02fdc797c09692e26d1a9e29fae09",
723
- "sha256": "b82ad94ef75d7abfe0e8271c3ed9d25ef39d4a827cf3801d65d42a1d5c881ce1"
723
+ "sha256": "357d5756b79269ab634355f3c73fe7fa0fbf321d50f8b6775fb3b279e2349a12"
724
724
  },
725
725
  {
726
726
  "fixture": "export/02-vivaia-campaign-lp.html.txt",
727
727
  "kind": "export",
728
728
  "input": "fixtures/page/02-vivaia-campaign-lp.html#html",
729
729
  "inputSha256": "7584711561c7a7dd5e8d7541f0dc9492b4d02fdc797c09692e26d1a9e29fae09",
730
- "sha256": "03e958eee10e1a837fbb5de8dbdd60ed945b8e6c24b1cc881038f3915b677655"
730
+ "sha256": "13b06f002e37b85abb0b492a4b6c318546edf0fe33570e7872e6d88a5b1d8755"
731
731
  },
732
732
  {
733
733
  "fixture": "export/02-vivaia-campaign-lp.js.txt",
package/dist/index.d.ts CHANGED
@@ -980,8 +980,8 @@ declare function checkVariants(className: string): VariantCheck;
980
980
  * 护栏:export golden 断言「输出变了而 COMPILER_VERSION 没变就红」。
981
981
  * 递增它是一次显式动作,不要顺手跟着包版本一起改。
982
982
  */
983
- declare const VERSION = "1.0.0-alpha.7";
984
- declare const COMPILER_VERSION = "2";
983
+ declare const VERSION = "1.0.0-alpha.8";
984
+ declare const COMPILER_VERSION = "3";
985
985
 
986
986
  /**
987
987
  * core 的入口。宿主注入 DOM 之后拿到一组行为。
package/dist/index.js CHANGED
@@ -369,8 +369,8 @@ var rules = {
369
369
  };
370
370
 
371
371
  // src/version.ts
372
- var VERSION = "1.0.0-alpha.7";
373
- var COMPILER_VERSION = "2";
372
+ var VERSION = "1.0.0-alpha.8";
373
+ var COMPILER_VERSION = "3";
374
374
 
375
375
  // src/validate/tree.ts
376
376
  var INLINE_SET = new Set(INLINE_NO_ID_TAGS);
@@ -2498,7 +2498,9 @@ var STRIPPED_ATTRS = [
2498
2498
  "data-pt-name",
2499
2499
  "data-pt-description",
2500
2500
  "data-pt-image-prompt",
2501
- "data-pt-placeholder"
2501
+ "data-pt-placeholder",
2502
+ // 运行时零消费方,且是成品里最大的一块死重。见文件头那条对照。
2503
+ "data-pt-component-settings"
2502
2504
  ];
2503
2505
  function stripEditorState(doc) {
2504
2506
  for (const attr of STRIPPED_ATTRS) {
@@ -2516,10 +2518,10 @@ function stripEditorState(doc) {
2516
2518
  async function exportDocument(doc) {
2517
2519
  const out = doc.cloneNode(true);
2518
2520
  renderPlaceholders(out);
2519
- stripEditorState(out);
2520
2521
  const theme = themeOf(doc);
2521
2522
  const classes = collectClasses(out);
2522
2523
  const components = expandComponents(out);
2524
+ stripEditorState(out);
2523
2525
  const resolve = (name) => themeValue(name, theme);
2524
2526
  const tokenCss = await componentTokenCss(components.types, resolve);
2525
2527
  const tailwind = await fresh(classes, theme);