@appaflytech/zeyrek-ai-mcp 0.0.8 → 0.0.9
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.
- package/README.md +27 -21
- package/dist/config.js +2 -0
- package/dist/knowledge/componentCatalog.js +122 -27
- package/dist/knowledge/componentEvents.js +35 -4
- package/dist/knowledge/errorPath.js +1 -1
- package/dist/knowledge/normalize.js +15 -0
- package/dist/knowledge/rules.js +3 -1
- package/dist/knowledge/styleResolve.js +46 -4
- package/dist/knowledge/themeResolve.js +936 -0
- package/dist/knowledge/themeRules.js +221 -0
- package/dist/knowledge/themeSchema.js +335 -0
- package/dist/platform/domSummary.js +144 -0
- package/dist/platform/screenshot.js +414 -23
- package/dist/platform/screenshotMemory.js +55 -0
- package/dist/resources/examples/layout-app-shell.json +1 -1
- package/dist/resources/examples/theme-brand.json +162 -0
- package/dist/resources/guides/component.md +7 -1
- package/dist/resources/guides/getting-started.md +4 -0
- package/dist/resources/guides/layout.md +30 -26
- package/dist/resources/guides/microservice.md +55 -1
- package/dist/resources/guides/page.md +87 -44
- package/dist/resources/guides/theme.md +210 -0
- package/dist/resources/guides/translation.md +6 -4
- package/dist/resources/guides/workflow.md +91 -6
- package/dist/resources/schema-fingerprint.json +2 -2
- package/dist/server.js +52 -43
- package/dist/tools/components.js +8 -0
- package/dist/tools/designSchemaPatch.js +152 -0
- package/dist/tools/flows.js +15 -18
- package/dist/tools/layouts.js +4 -4
- package/dist/tools/microservices.js +5 -5
- package/dist/tools/pages.js +196 -323
- package/dist/tools/projects.js +66 -9
- package/dist/tools/schemaOps.js +280 -0
- package/dist/tools/screenWrite.js +2 -1
- package/dist/tools/screens.js +0 -7
- package/dist/tools/themes.js +163 -0
- package/dist/tools/workflows.js +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
* `TYPED_STYLE_COMPONENTS` kaydına eklenir — başka hiçbir yer değişmez.
|
|
23
23
|
*/
|
|
24
24
|
export const STYLE_PRESET_KEY = '$preset';
|
|
25
|
+
/**
|
|
26
|
+
* Düğümün hangi BİLEŞEN PRESETİ versiyonundan kurulduğunu anan işaret (frontend
|
|
27
|
+
* `style-presets.ts` kopyası). Kaskad katmanı değildir: versiyonun prop'ları düğüm oluşturulurken
|
|
28
|
+
* zaten yazılır, bu anahtar yalnız seçicinin hangi satırı seçili göstereceğini söyler.
|
|
29
|
+
*/
|
|
30
|
+
export const STYLE_COMPONENT_PRESET_KEY = '$componentPreset';
|
|
25
31
|
/**
|
|
26
32
|
* Satır yüksekliği ÜÇ yazımı da kabul eder: oran (1.4), yüzde ('140%') ve CSS
|
|
27
33
|
* uzunluğu ('24px'). Çıplak sayı ikircikli tek durumdur — eski panel YÜZDE
|
|
@@ -53,17 +59,24 @@ export const deepMergeStyle = (base, override) => {
|
|
|
53
59
|
};
|
|
54
60
|
export const resolveNodeStyleLayers = (style, source, nodeType) => {
|
|
55
61
|
const styleObject = isPlainObject(style) ? style : undefined;
|
|
56
|
-
|
|
62
|
+
// İKİ sihirli anahtar da düşer. `$componentPreset` bir kaskad katmanı DEĞİLDİR: bileşen preseti
|
|
63
|
+
// versiyonu düğüm kurulurken prop'lara materialize edilir, bu anahtar yalnız "hangi versiyondan
|
|
64
|
+
// geldi"yi anar (`style-presets.ts:180-184`, 2026-09-07). Ayıklanmazsa emotion onu çöp bir CSS
|
|
65
|
+
// kuralına çevirir ve `resolvedStyle` ajana stil diye '$componentPreset: V1' gösterir (S-2).
|
|
66
|
+
const { [STYLE_PRESET_KEY]: presetName, [STYLE_COMPONENT_PRESET_KEY]: componentPreset, ...own } = styleObject ?? {};
|
|
57
67
|
const componentStyle = nodeType && isPlainObject(source?.componentStyles?.[nodeType]) ? source.componentStyles[nodeType] : undefined;
|
|
58
68
|
const preset = typeof presetName === 'string' && isPlainObject(source?.presets?.[presetName]) ? source.presets[presetName] : undefined;
|
|
59
69
|
let theme;
|
|
60
70
|
if (componentStyle || preset) {
|
|
61
71
|
theme = deepMergeStyle(componentStyle ?? {}, preset ?? {});
|
|
72
|
+
// Preset'in KENDİSİ de işaret taşıyabilir: tema JSON'u elle düzenlenmişse.
|
|
62
73
|
delete theme[STYLE_PRESET_KEY];
|
|
74
|
+
delete theme[STYLE_COMPONENT_PRESET_KEY];
|
|
63
75
|
}
|
|
76
|
+
const version = typeof componentPreset === 'string' && componentPreset ? componentPreset : undefined;
|
|
64
77
|
if (!styleObject && typeof style === 'string' && style)
|
|
65
|
-
return { theme, own: style };
|
|
66
|
-
return { theme, own: Object.keys(own).length ? own : undefined };
|
|
78
|
+
return { theme, own: style, componentPreset: version };
|
|
79
|
+
return { theme, own: Object.keys(own).length ? own : undefined, componentPreset: version };
|
|
67
80
|
};
|
|
68
81
|
export const resolveNodeStyle = (style, source, nodeType) => {
|
|
69
82
|
if (!isPlainObject(style) && style !== undefined && style !== null)
|
|
@@ -308,6 +321,23 @@ export const applyLegacyTextProps = (input, root) => {
|
|
|
308
321
|
: `var(${STATUS_COLOR_VARS[color] ?? STATUS_COLOR_VARS.primary})`;
|
|
309
322
|
}
|
|
310
323
|
};
|
|
324
|
+
/* ---- button: emekli kind:'custom' takma adı (frontend `button-style-logic.ts` kopyası) ---- */
|
|
325
|
+
export const BUTTON_LEGACY_CUSTOM_COLOR_VAR = '--ng-btn-custom-color';
|
|
326
|
+
/**
|
|
327
|
+
* `button`'ın EMEKLİ `kind: 'custom'` + `customColor` ikilisi (Dalga 4, 2026-09-14) kayıtlı
|
|
328
|
+
* sayfalarda aynen çizilir: Surface › Background BOŞSA köke eski `--ng-btn-custom-color`
|
|
329
|
+
* değişkeni yazılır, bileşenin `.ng-button--custom` bloğu okur. Bilerek `background` DEĞİL
|
|
330
|
+
* değişken: eski custom outline/text butonlar zemin değil kenarlık/yazı rengi alıyordu.
|
|
331
|
+
*/
|
|
332
|
+
export const applyLegacyButtonProps = (input, root) => {
|
|
333
|
+
if (root.background !== undefined)
|
|
334
|
+
return;
|
|
335
|
+
if (input.kind !== 'custom')
|
|
336
|
+
return;
|
|
337
|
+
if (!isRenderableColorLike(input.customColor))
|
|
338
|
+
return;
|
|
339
|
+
root[BUTTON_LEGACY_CUSTOM_COLOR_VAR] = String(input.customColor).trim();
|
|
340
|
+
};
|
|
311
341
|
/* ---- container: başlık bölgesi (frontend `container-style-logic.ts` kopyası) ---- */
|
|
312
342
|
const CONTAINER_HEADER_SELECTOR = '&__header';
|
|
313
343
|
const CONTAINER_TITLE_SELECTOR = '&__title';
|
|
@@ -419,6 +449,14 @@ export const TYPED_STYLE_COMPONENTS = {
|
|
|
419
449
|
// Taşma hedefi olmayan komponentte contentOverflow ölü kural üretirdi.
|
|
420
450
|
omit: { surfaceStyle: ['contentOverflow'] }
|
|
421
451
|
},
|
|
452
|
+
button: {
|
|
453
|
+
groups: ['surfaceStyle'],
|
|
454
|
+
ext: { extra: applyLegacyButtonProps },
|
|
455
|
+
// `kind` emekli değil; takma ad yalnız eski 'custom' değerini okur.
|
|
456
|
+
legacyProps: ['kind', 'customColor'],
|
|
457
|
+
// Kaydırılan içeriği yok; taşma alanı ölü kural üretirdi.
|
|
458
|
+
omit: { surfaceStyle: ['contentOverflow'] }
|
|
459
|
+
},
|
|
422
460
|
form: {
|
|
423
461
|
// Çerçeve <form> KÖKÜNDE: yüzey köke, taşma gövdeye (S-19, 2026-09-15).
|
|
424
462
|
// Genel düğüm yüzeyi yolu değeri kökün dışındaki kutuya yazıp ikinci çerçeve çiziyordu.
|
|
@@ -516,12 +554,16 @@ export function resolveNodeStyleReport(node, source) {
|
|
|
516
554
|
const ownStyle = rawProp(props, 'style');
|
|
517
555
|
const config = node.type ? TYPED_STYLE_COMPONENTS[node.type] : undefined;
|
|
518
556
|
const presetName = isPlainObject(ownStyle) ? ownStyle[STYLE_PRESET_KEY] : undefined;
|
|
557
|
+
const versionName = isPlainObject(ownStyle) ? ownStyle[STYLE_COMPONENT_PRESET_KEY] : undefined;
|
|
519
558
|
const typedGroups = config ? config.groups.filter(name => isPlainObject(rawProp(props, name))) : [];
|
|
559
|
+
const magicKeys = [STYLE_PRESET_KEY, STYLE_COMPONENT_PRESET_KEY];
|
|
520
560
|
const layers = {
|
|
521
561
|
typedGroups,
|
|
522
562
|
componentStyle: Boolean(node.type && isPlainObject(source?.componentStyles?.[node.type])),
|
|
523
563
|
preset: typeof presetName === 'string' && presetName ? presetName : null,
|
|
524
|
-
|
|
564
|
+
componentPreset: typeof versionName === 'string' && versionName ? versionName : null,
|
|
565
|
+
// İşaretler stil DEĞİLDİR: yalnız onları taşıyan düğüm "kendi stili var" sayılmamalı.
|
|
566
|
+
own: isPlainObject(ownStyle) ? Object.keys(ownStyle).filter(key => !magicKeys.includes(key)).length > 0 : Boolean(ownStyle)
|
|
525
567
|
};
|
|
526
568
|
if (!config) {
|
|
527
569
|
// Kayıtsız tip: eski birleşik kaskad. Kap tiplerinde tipli yüzey grubu
|