@gct-paas/word 0.2.1 → 0.2.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.
@@ -8,5 +8,6 @@ export declare const SEARCHABLE_FIELD_DEFAULT_FIELDS_MAP: {
8
8
  material: string[];
9
9
  reasonAndGroup: string[];
10
10
  operation: string[];
11
+ warehouse: string[];
11
12
  };
12
13
  export declare const getDefaultQuickSearchFields: (fieldMeta: FieldMeta, tableType?: string) => string[];
@@ -13,11 +13,6 @@ export type CjkFontSpec = {
13
13
  localKeyIncludes: string;
14
14
  };
15
15
  export declare const CJK_FONT_SPECS: CjkFontSpec[];
16
- /** 屏显 + PDF 对齐所需的最小字重集 */
17
- export declare const SCREEN_ESSENTIAL_FONTS: Array<{
18
- family: CjkFontFamily;
19
- weight: CjkFontWeight;
20
- }>;
21
16
  export declare function findCjkFontSpec(family: CjkFontFamily, weight: CjkFontWeight): CjkFontSpec;
22
17
  /** 与 Ribbon 选项一致的文档 CSS 栈(黑体 / 宋体 / 楷体) */
23
18
  export declare const CJK_DOCUMENT_FONT_FAMILY: Record<CjkFontFamily, string>;
@@ -1,12 +1,12 @@
1
1
  import { CjkFontFamily, CjkFontWeight } from './cjk-font-catalog';
2
+ import { ModelFontUsage } from '../../core/model/font-usage';
3
+ type RequiredScreenFont = {
4
+ family: CjkFontFamily;
5
+ weight: CjkFontWeight;
6
+ };
2
7
  /** 加载字体字节(PDF embed 与屏显共用缓存) */
3
8
  export declare function loadCjkFontBytes(family?: CjkFontFamily, weight?: CjkFontWeight): Promise<ArrayBuffer>;
4
- /**
5
- * 将字体注册到 document.fonts,供 Konva / canvas 度量与绘制使用。
6
- * 楷体 Medium 同时以 500、700 注册,兼容 Konva bold。
7
- */
8
- export declare function ensureScreenFontFace(family: CjkFontFamily, weight: CjkFontWeight): Promise<void>;
9
- /** 屏显必需字体:三套族的 Regular + 加粗字重 */
10
- export declare function ensureDocumentFontsLoaded(): Promise<void>;
11
- /** 预热:不阻塞,尽早开始拉字体 */
12
- export declare function preloadDocumentFonts(): void;
9
+ /** 使用 ModelConverter 转换阶段维护的索引,不再遍历完整文档。 */
10
+ export declare function collectRequiredScreenFontsForUsage(usage?: ModelFontUsage | null): RequiredScreenFont[];
11
+ export declare function ensureDocumentFontsForUsage(usage?: ModelFontUsage | null): Promise<void>;
12
+ export {};
package/dist/word.css CHANGED
@@ -7106,7 +7106,7 @@ textarea[data-v-a7d89044]::placeholder {
7106
7106
  transition: opacity 340ms ease-out;
7107
7107
  opacity: 1;
7108
7108
  }
7109
- .segment-slider[data-v-d855709f] {
7109
+ .segment-slider[data-v-4e541969] {
7110
7110
  display: inline-flex;
7111
7111
  position: relative;
7112
7112
  box-sizing: border-box;
@@ -7119,11 +7119,11 @@ textarea[data-v-a7d89044]::placeholder {
7119
7119
  user-select: none;
7120
7120
  gap: 4px;
7121
7121
  }
7122
- .segment-slider.is-disabled[data-v-d855709f] {
7122
+ .segment-slider.is-disabled[data-v-4e541969] {
7123
7123
  opacity: 0.5;
7124
7124
  pointer-events: none;
7125
7125
  }
7126
- .segment-slider__thumb[data-v-d855709f] {
7126
+ .segment-slider__thumb[data-v-4e541969] {
7127
7127
  position: absolute;
7128
7128
  inset: 2px 0;
7129
7129
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
@@ -7131,7 +7131,7 @@ textarea[data-v-a7d89044]::placeholder {
7131
7131
  background: #fff;
7132
7132
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12);
7133
7133
  }
7134
- .segment-slider__item[data-v-d855709f] {
7134
+ .segment-slider__item[data-v-4e541969] {
7135
7135
  display: flex;
7136
7136
  position: relative;
7137
7137
  z-index: 1;
@@ -7146,22 +7146,22 @@ textarea[data-v-a7d89044]::placeholder {
7146
7146
  font-size: 14px;
7147
7147
  cursor: pointer;
7148
7148
  }
7149
- .segment-slider__item.is-active[data-v-d855709f] {
7149
+ .segment-slider__item.is-active[data-v-4e541969] {
7150
7150
  color: rgba(0, 0, 0, 0.8);
7151
7151
  }
7152
- .segment-slider__item.is-active .icon[data-v-d855709f] {
7152
+ .segment-slider__item.is-active .g-icon[data-v-4e541969] {
7153
7153
  color: rgba(0, 0, 0, 0.88);
7154
7154
  }
7155
- .segment-slider__item.disabled[data-v-d855709f] {
7155
+ .segment-slider__item.disabled[data-v-4e541969] {
7156
7156
  opacity: 0.3;
7157
7157
  cursor: no-drop;
7158
7158
  }
7159
- .segment-slider.is-multiple .segment-slider__item.is-active[data-v-d855709f] {
7159
+ .segment-slider.is-multiple .segment-slider__item.is-active[data-v-4e541969] {
7160
7160
  border-radius: 4px;
7161
7161
  background: #fff;
7162
7162
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12);
7163
7163
  }
7164
- .segment-slider .v-popper.segment-slider__label-tooltip[data-v-d855709f] {
7164
+ .segment-slider .v-popper.segment-slider__label-tooltip[data-v-4e541969] {
7165
7165
  display: inline-flex;
7166
7166
  flex: 1;
7167
7167
  align-items: center;
@@ -7171,7 +7171,7 @@ textarea[data-v-a7d89044]::placeholder {
7171
7171
  white-space: nowrap;
7172
7172
  pointer-events: all;
7173
7173
  }
7174
- .segment-slider__label[data-v-d855709f] {
7174
+ .segment-slider__label[data-v-4e541969] {
7175
7175
  display: inline-block;
7176
7176
  overflow: hidden;
7177
7177
  line-height: 24px;
@@ -7179,13 +7179,13 @@ textarea[data-v-a7d89044]::placeholder {
7179
7179
  word-wrap: normal;
7180
7180
  white-space: nowrap;
7181
7181
  }
7182
- .segment-slider__label.has-icon[data-v-d855709f] {
7182
+ .segment-slider__label.has-icon[data-v-4e541969] {
7183
7183
  margin-left: 6px;
7184
7184
  }
7185
- .segment-icon .segment-slider__label[data-v-d855709f] {
7185
+ .segment-icon .segment-slider__label[data-v-4e541969] {
7186
7186
  display: none;
7187
7187
  }
7188
- .segment-icon .icon[data-v-d855709f] {
7188
+ .segment-icon .g-icon[data-v-4e541969] {
7189
7189
  width: 100%;
7190
7190
  line-height: 24px;
7191
7191
  text-align: center;
@@ -13593,7 +13593,7 @@ svg.portrait-icon[data-v-8bdb451e] {
13593
13593
  background-color: #026ac8;
13594
13594
  color: #fff;
13595
13595
  }
13596
- .editor-tip[data-v-3b76bd37] {
13596
+ .editor-tip[data-v-586dbbaa] {
13597
13597
  margin-top: 4px;
13598
13598
  color: #a6a6a6;
13599
13599
  font-size: 12px;
@@ -14025,18 +14025,19 @@ svg.portrait-icon[data-v-8bdb451e] {
14025
14025
  line-height: 22px;
14026
14026
  white-space: nowrap;
14027
14027
  }
14028
- .common-regex-panel[data-v-d83cfeed] {
14028
+ .common-regex-panel[data-v-3f35dba7] {
14029
14029
  display: flex;
14030
14030
  box-sizing: border-box;
14031
14031
  flex-direction: column;
14032
14032
  width: 360px;
14033
14033
  max-height: 360px;
14034
14034
  }
14035
- .common-regex-panel__header[data-v-d83cfeed] {
14035
+ .common-regex-panel__header[data-v-3f35dba7] {
14036
14036
  display: flex;
14037
14037
  position: sticky;
14038
14038
  z-index: 1;
14039
14039
  top: 0;
14040
+ box-sizing: content-box;
14040
14041
  flex-shrink: 0;
14041
14042
  align-items: center;
14042
14043
  justify-content: space-between;
@@ -14044,7 +14045,7 @@ svg.portrait-icon[data-v-8bdb451e] {
14044
14045
  padding: 16px;
14045
14046
  background: #fff;
14046
14047
  }
14047
- .common-regex-panel__header.has-border[data-v-d83cfeed]::after {
14048
+ .common-regex-panel__header.has-border[data-v-3f35dba7]::after {
14048
14049
  content: '';
14049
14050
  position: absolute;
14050
14051
  right: 16px;
@@ -14053,13 +14054,13 @@ svg.portrait-icon[data-v-8bdb451e] {
14053
14054
  height: 1px;
14054
14055
  background-color: #e8ebf0;
14055
14056
  }
14056
- .common-regex-panel__title[data-v-d83cfeed] {
14057
+ .common-regex-panel__title[data-v-3f35dba7] {
14057
14058
  color: #1a1d23;
14058
14059
  font-size: 14px;
14059
14060
  font-weight: 500;
14060
14061
  line-height: 20px;
14061
14062
  }
14062
- .common-regex-panel__add[data-v-d83cfeed] {
14063
+ .common-regex-panel__add[data-v-3f35dba7] {
14063
14064
  display: inline-flex;
14064
14065
  align-items: center;
14065
14066
  padding: 0;
@@ -14071,32 +14072,32 @@ svg.portrait-icon[data-v-8bdb451e] {
14071
14072
  cursor: pointer;
14072
14073
  gap: 4px;
14073
14074
  }
14074
- .common-regex-panel__add[data-v-d83cfeed]:hover {
14075
+ .common-regex-panel__add[data-v-3f35dba7]:hover {
14075
14076
  opacity: 0.85;
14076
14077
  }
14077
- .common-regex-panel__empty[data-v-d83cfeed] {
14078
+ .common-regex-panel__empty[data-v-3f35dba7] {
14078
14079
  display: flex;
14079
14080
  flex-direction: column;
14080
14081
  align-items: center;
14081
14082
  padding: 16px 16px 40px;
14082
14083
  gap: 12px;
14083
14084
  }
14084
- .common-regex-panel__empty-icon[data-v-d83cfeed] {
14085
+ .common-regex-panel__empty-icon[data-v-3f35dba7] {
14085
14086
  line-height: 1;
14086
14087
  }
14087
- .common-regex-panel__empty-tip[data-v-d83cfeed] {
14088
+ .common-regex-panel__empty-tip[data-v-3f35dba7] {
14088
14089
  margin-bottom: 4px;
14089
14090
  color: #8b8b8b;
14090
14091
  font-size: 14px;
14091
14092
  line-height: 20px;
14092
14093
  }
14093
- .common-regex-panel__empty-btn-add-icon[data-v-d83cfeed] {
14094
+ .common-regex-panel__empty-btn-add-icon[data-v-3f35dba7] {
14094
14095
  vertical-align: inherit;
14095
14096
  }
14096
- .common-regex-panel__list[data-v-d83cfeed] {
14097
+ .common-regex-panel__list[data-v-3f35dba7] {
14097
14098
  padding-bottom: 16px;
14098
14099
  }
14099
- .common-regex-panel__item[data-v-d83cfeed] {
14100
+ .common-regex-panel__item[data-v-3f35dba7] {
14100
14101
  display: flex;
14101
14102
  position: relative;
14102
14103
  box-sizing: border-box;
@@ -14105,7 +14106,7 @@ svg.portrait-icon[data-v-8bdb451e] {
14105
14106
  padding: 12px 16px;
14106
14107
  gap: 8px;
14107
14108
  }
14108
- .common-regex-panel__item[data-v-d83cfeed]::after {
14109
+ .common-regex-panel__item[data-v-3f35dba7]::after {
14109
14110
  content: '';
14110
14111
  position: absolute;
14111
14112
  right: 16px;
@@ -14114,11 +14115,11 @@ svg.portrait-icon[data-v-8bdb451e] {
14114
14115
  height: 1px;
14115
14116
  background-color: #e8ebf0;
14116
14117
  }
14117
- .common-regex-panel__item-main[data-v-d83cfeed] {
14118
+ .common-regex-panel__item-main[data-v-3f35dba7] {
14118
14119
  flex: 1;
14119
14120
  min-width: 0;
14120
14121
  }
14121
- .common-regex-panel__item-name[data-v-d83cfeed] {
14122
+ .common-regex-panel__item-name[data-v-3f35dba7] {
14122
14123
  overflow: hidden;
14123
14124
  color: #1a1d23;
14124
14125
  font-size: 14px;
@@ -14126,7 +14127,7 @@ svg.portrait-icon[data-v-8bdb451e] {
14126
14127
  text-overflow: ellipsis;
14127
14128
  white-space: nowrap;
14128
14129
  }
14129
- .common-regex-panel__item-value[data-v-d83cfeed] {
14130
+ .common-regex-panel__item-value[data-v-3f35dba7] {
14130
14131
  margin-top: 6px;
14131
14132
  overflow: hidden;
14132
14133
  color: #8b8b8b;
@@ -14135,13 +14136,13 @@ svg.portrait-icon[data-v-8bdb451e] {
14135
14136
  text-overflow: ellipsis;
14136
14137
  white-space: nowrap;
14137
14138
  }
14138
- .common-regex-panel__item-actions[data-v-d83cfeed] {
14139
+ .common-regex-panel__item-actions[data-v-3f35dba7] {
14139
14140
  display: inline-flex;
14140
14141
  flex-shrink: 0;
14141
14142
  align-items: center;
14142
14143
  gap: 4px;
14143
14144
  }
14144
- .action-fill[data-v-d83cfeed] {
14145
+ .action-fill[data-v-3f35dba7] {
14145
14146
  padding: 0 4px;
14146
14147
  border: none;
14147
14148
  background: transparent;
@@ -14150,10 +14151,10 @@ svg.portrait-icon[data-v-8bdb451e] {
14150
14151
  line-height: 22px;
14151
14152
  cursor: pointer;
14152
14153
  }
14153
- .action-fill[data-v-d83cfeed]:hover {
14154
+ .action-fill[data-v-3f35dba7]:hover {
14154
14155
  opacity: 0.85;
14155
14156
  }
14156
- .action-icon[data-v-d83cfeed] {
14157
+ .action-icon[data-v-3f35dba7] {
14157
14158
  display: inline-flex;
14158
14159
  align-items: center;
14159
14160
  justify-content: center;
@@ -14165,30 +14166,30 @@ svg.portrait-icon[data-v-8bdb451e] {
14165
14166
  background: transparent;
14166
14167
  cursor: pointer;
14167
14168
  }
14168
- .action-icon .gct-icon[data-v-d83cfeed] {
14169
+ .action-icon .gct-icon[data-v-3f35dba7] {
14169
14170
  color: #8b8b8b;
14170
14171
  }
14171
- .action-icon.action-edit[data-v-d83cfeed]:hover {
14172
+ .action-icon.action-edit[data-v-3f35dba7]:hover {
14172
14173
  background: rgba(2, 106, 200, 0.12);
14173
14174
  }
14174
- .action-icon.action-edit:hover .gct-icon[data-v-d83cfeed] {
14175
+ .action-icon.action-edit:hover .gct-icon[data-v-3f35dba7] {
14175
14176
  color: #1a1d23;
14176
14177
  }
14177
- .action-icon.action-delete[data-v-d83cfeed]:hover,
14178
- .action-icon.action-delete.is-active[data-v-d83cfeed] {
14178
+ .action-icon.action-delete[data-v-3f35dba7]:hover,
14179
+ .action-icon.action-delete.is-active[data-v-3f35dba7] {
14179
14180
  background: rgba(255, 77, 79, 0.12);
14180
14181
  }
14181
- .action-icon.action-delete:hover .gct-icon[data-v-d83cfeed],
14182
- .action-icon.action-delete.is-active .gct-icon[data-v-d83cfeed] {
14182
+ .action-icon.action-delete:hover .gct-icon[data-v-3f35dba7],
14183
+ .action-icon.action-delete.is-active .gct-icon[data-v-3f35dba7] {
14183
14184
  color: #ff4d4f;
14184
14185
  }
14185
- .action-delete-wrap[data-v-d83cfeed] {
14186
+ .action-delete-wrap[data-v-3f35dba7] {
14186
14187
  position: relative;
14187
14188
  }
14188
- .delete-confirm[data-v-d83cfeed] {
14189
+ .delete-confirm[data-v-3f35dba7] {
14189
14190
  min-width: 180px;
14190
14191
  }
14191
- .delete-confirm__title[data-v-d83cfeed] {
14192
+ .delete-confirm__title[data-v-3f35dba7] {
14192
14193
  display: flex;
14193
14194
  align-items: center;
14194
14195
  color: #1a1d23;
@@ -14197,22 +14198,22 @@ svg.portrait-icon[data-v-8bdb451e] {
14197
14198
  white-space: nowrap;
14198
14199
  gap: 8px;
14199
14200
  }
14200
- .delete-confirm__actions[data-v-d83cfeed] {
14201
+ .delete-confirm__actions[data-v-3f35dba7] {
14201
14202
  display: flex;
14202
14203
  justify-content: flex-end;
14203
14204
  gap: 8px;
14204
14205
  margin-top: 12px;
14205
14206
  }
14206
- .common-regex-panel__form[data-v-d83cfeed] {
14207
+ .common-regex-panel__form[data-v-3f35dba7] {
14207
14208
  padding: 16px;
14208
14209
  }
14209
- .common-regex-panel__form-footer[data-v-d83cfeed] {
14210
+ .common-regex-panel__form-footer[data-v-3f35dba7] {
14210
14211
  display: flex;
14211
14212
  justify-content: flex-end;
14212
14213
  gap: 8px;
14213
14214
  margin-top: 16px;
14214
14215
  }
14215
- .error[data-v-d83cfeed] {
14216
+ .error[data-v-3f35dba7] {
14216
14217
  margin-top: 4px;
14217
14218
  color: #ff4d4f;
14218
14219
  font-size: 12px;
@@ -14353,23 +14354,23 @@ svg.portrait-icon[data-v-8bdb451e] {
14353
14354
  font-size: 12px;
14354
14355
  line-height: 18px;
14355
14356
  }
14356
- .panel-field-trace-config[data-v-54af6906] {
14357
- padding: 16px;
14358
- }
14359
- .panel-field-trace-config .record-no-text[data-v-54af6906] {
14360
- margin-top: 4px;
14361
- line-height: 20px;
14362
- }
14363
- .panel-field-trace-config .switch-content[data-v-54af6906] {
14357
+ .switch-content[data-v-f574825f] {
14364
14358
  display: flex;
14365
14359
  justify-content: flex-end;
14366
14360
  }
14367
- .panel-field-trace-config .device-group-tip[data-v-54af6906] {
14361
+ .device-group-tip[data-v-f574825f] {
14368
14362
  margin-top: 4px;
14369
14363
  color: rgba(0, 0, 0, 0.45);
14370
14364
  font-size: 12px;
14371
14365
  line-height: 20px;
14372
14366
  }
14367
+ .panel-field-trace-config[data-v-53a31bd4] {
14368
+ padding: 16px;
14369
+ }
14370
+ .panel-field-trace-config .record-no-text[data-v-53a31bd4] {
14371
+ margin-top: 4px;
14372
+ line-height: 20px;
14373
+ }
14373
14374
  .panel-field-user-config[data-v-7f519405] {
14374
14375
  padding: 16px;
14375
14376
  }
@@ -14467,18 +14468,18 @@ svg.portrait-icon[data-v-8bdb451e] {
14467
14468
  flex-direction: column;
14468
14469
  gap: 8px;
14469
14470
  }
14470
- .panel-widget-diagonal-config[data-v-b9d90d02] {
14471
+ .panel-widget-diagonal-config[data-v-816027bf] {
14471
14472
  padding: 16px;
14472
14473
  }
14473
- .size-mode-group[data-v-b9d90d02] {
14474
+ .size-mode-group[data-v-816027bf] {
14474
14475
  margin-top: 12px;
14475
14476
  margin-bottom: 12px;
14476
14477
  line-height: 1;
14477
14478
  }
14478
- .size-mode-group .size-mode-radio-group[data-v-b9d90d02] {
14479
+ .size-mode-group .size-mode-radio-group[data-v-816027bf] {
14479
14480
  gap: 16px;
14480
14481
  }
14481
- .size-number[data-v-b9d90d02] {
14482
+ .size-number[data-v-816027bf] {
14482
14483
  gap: 12px;
14483
14484
  }
14484
14485
  .panel-widget-image-config[data-v-36c19c7b] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",
@@ -1,2 +0,0 @@
1
- export { loadCjkFontBytes } from '../fonts/ensure-document-fonts';
2
- export { resolveCjkFontRef, type CjkFontFamily, type CjkFontWeight, } from '../fonts/cjk-font-catalog';