@dxtmisha/wiki 0.64.0 → 0.67.0
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/dist/media.js +305 -176
- package/dist/src/media/descriptions/wikiDescriptionsMenuButton.d.ts +7 -0
- package/dist/src/media/descriptions/wikiDescriptionsMenuChip.d.ts +7 -0
- package/dist/src/media/descriptions/wikiDescriptionsMenuCountry.d.ts +7 -0
- package/dist/src/media/mdx/MenuButton/wikiMdxMenuButton.d.ts +7 -0
- package/dist/src/media/mdx/MenuChip/wikiMdxMenuChip.d.ts +7 -0
- package/dist/src/media/mdx/MenuCountry/wikiMdxMenuCountry.d.ts +3 -0
- package/dist/src/media/props/wikiMenuButton.d.ts +7 -0
- package/dist/src/media/props/wikiMenuChip.d.ts +7 -0
- package/dist/src/media/props/wikiMenuCountry.d.ts +7 -0
- package/dist/storybook.js +1345 -951
- package/dist/{wikiDescriptions-n3cFkYRZ.js → wikiDescriptions-BxZP798_.js} +172 -1
- package/package.json +1 -1
- package/src/media/functional/functional-basic/functions/isTab/isTab.en.mdx +30 -0
- package/src/media/functional/functional-basic/functions/isTab/isTab.ru.mdx +30 -0
- package/src/media/functional/functional-basic/functions/isTab/isTab.vi.mdx +30 -0
- package/src/media/functional/scripts/bin/dxt-build-packages/build-packages.en.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-build-packages/build-packages.ru.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-build-packages/build-packages.vi.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.en.mdx +51 -0
- package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.ru.mdx +51 -0
- package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.vi.mdx +51 -0
- package/src/media/functional/scripts/bin/dxt-constructor/design-constructor.en.mdx +48 -0
- package/src/media/functional/scripts/bin/dxt-constructor/design-constructor.ru.mdx +48 -0
- package/src/media/functional/scripts/bin/dxt-constructor/design-constructor.vi.mdx +48 -0
- package/src/media/functional/scripts/bin/dxt-figma-layout/design-figma.en.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-figma-layout/design-figma.ru.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-figma-layout/design-figma.vi.mdx +45 -0
- package/src/media/functional/scripts/bin/dxt-flags/design-flags.en.mdx +41 -0
- package/src/media/functional/scripts/bin/dxt-flags/design-flags.ru.mdx +41 -0
- package/src/media/functional/scripts/bin/dxt-flags/design-flags.vi.mdx +41 -0
- package/src/media/functional/scripts/bin/dxt-library/design-library.en.mdx +40 -0
- package/src/media/functional/scripts/bin/dxt-library/design-library.ru.mdx +40 -0
- package/src/media/functional/scripts/bin/dxt-library/design-library.vi.mdx +40 -0
- package/src/media/functional/scripts/bin/dxt-package/design-package.en.mdx +48 -0
- package/src/media/functional/scripts/bin/dxt-package/design-package.ru.mdx +48 -0
- package/src/media/functional/scripts/bin/dxt-package/design-package.vi.mdx +48 -0
- package/src/media/functional/scripts/classes/BuildPackages/BuildPackages.en.mdx +34 -0
- package/src/media/functional/scripts/classes/BuildPackages/BuildPackages.ru.mdx +34 -0
- package/src/media/functional/scripts/classes/BuildPackages/BuildPackages.vi.mdx +34 -0
- package/src/media/functional/scripts/classes/BuildPublishPackages/BuildPublishPackages.en.mdx +33 -0
- package/src/media/functional/scripts/classes/BuildPublishPackages/BuildPublishPackages.ru.mdx +33 -0
- package/src/media/functional/scripts/classes/BuildPublishPackages/BuildPublishPackages.vi.mdx +33 -0
- package/src/media/functional/scripts/classes/DesignFigma/DesignFigma.en.mdx +54 -0
- package/src/media/functional/scripts/classes/DesignFigma/DesignFigma.ru.mdx +54 -0
- package/src/media/functional/scripts/classes/DesignFigma/DesignFigma.vi.mdx +54 -0
- package/src/media/functional/scripts/classes/DesignFlags/DesignFlags.en.mdx +2 -0
- package/src/media/functional/scripts/classes/DesignFlags/DesignFlags.ru.mdx +2 -0
- package/src/media/functional/scripts/classes/DesignFlags/DesignFlags.vi.mdx +2 -0
- package/src/media/functional/scripts/classes/LibraryExport/LibraryExport.en.mdx +33 -17
- package/src/media/functional/scripts/classes/LibraryExport/LibraryExport.ru.mdx +33 -17
- package/src/media/functional/scripts/classes/LibraryExport/LibraryExport.vi.mdx +33 -17
|
@@ -2025,6 +2025,177 @@ var e = [
|
|
|
2025
2025
|
description: "\nComprehensive navigational component that integrates a trigger (Control), a floating container (Window), and a structured dataset (List). Designed for multi-level menus, context-sensitive actions, and complex selection interfaces requiring icons or grouping.\nFeatures support for hierarchical data structures (nested submenus), real-time AJAX loading, and full keyboard accessibility. Includes sophisticated focus management, automatic positioning relative to the trigger, and a lite rendering mode for optimized performance with large lists.\nControlled via the list prop for items and v-model:selected for state tracking. Use for user profile menus, sidebar navigation, or advanced select-like UI patterns where standard dropdowns lack sufficient structural flexibility.\n "
|
|
2026
2026
|
}
|
|
2027
2027
|
},
|
|
2028
|
+
{
|
|
2029
|
+
name: "MenuButton",
|
|
2030
|
+
description: {
|
|
2031
|
+
en: "Button-based dropdown selector combining Button, Menu, and Select for clean, compact selection interfaces",
|
|
2032
|
+
ru: "Кнопочный выпадающий селектор, объединяющий Button, Menu и Select для компактных интерфейсов выбора"
|
|
2033
|
+
},
|
|
2034
|
+
possibilities: {
|
|
2035
|
+
en: [
|
|
2036
|
+
"button trigger interface instead of standard field outline",
|
|
2037
|
+
"displays selected value names with a custom separator",
|
|
2038
|
+
"supports hiding the value when an icon is present (hideValueIcon)",
|
|
2039
|
+
"supports hiding the label when a value is selected (hideLabelValue)",
|
|
2040
|
+
"built-in search and filtering inside the dropdown header",
|
|
2041
|
+
"single or multiple value selection",
|
|
2042
|
+
"standard form data integration via a hidden input element"
|
|
2043
|
+
],
|
|
2044
|
+
ru: [
|
|
2045
|
+
"интерфейс кнопки-триггера вместо стандартной рамки поля",
|
|
2046
|
+
"отображает имена выбранных значений с настраиваемым разделителем",
|
|
2047
|
+
"поддержка скрытия значения при наличии иконки (hideValueIcon)",
|
|
2048
|
+
"поддержка скрытия метки при выборе значения (hideLabelValue)",
|
|
2049
|
+
"встроенный поиск и фильтрация внутри заголовка выпадающего меню",
|
|
2050
|
+
"одиночный или множественный выбор значений",
|
|
2051
|
+
"стандартная интеграция данных формы через скрытый элемент ввода input"
|
|
2052
|
+
]
|
|
2053
|
+
},
|
|
2054
|
+
import: ["import { ref } from 'vue'"],
|
|
2055
|
+
render: "\n <DesignComponent v-bind=\"args\" />\n ",
|
|
2056
|
+
stories: [
|
|
2057
|
+
{
|
|
2058
|
+
id: "MenuButtonBasic",
|
|
2059
|
+
name: {
|
|
2060
|
+
en: "Basic",
|
|
2061
|
+
ru: "Базовые"
|
|
2062
|
+
},
|
|
2063
|
+
setup: "\n const options = ref([\n { label: 'English', value: 'en' },\n { label: 'Russian', value: 'ru' },\n { label: 'Vietnamese', value: 'vi' },\n { label: 'Spanish', value: 'es' }\n ])\n const value1 = ref('en')\n const value2 = ref('ru')\n const value3 = ref('vi')\n\n return { options, value1, value2, value3 }\n ",
|
|
2064
|
+
template: "\n <div class=\"wiki-storybook-flex\">\n <DesignComponent\n v-model=\"value1\"\n type=\"menuButton\"\n label=\"Language\"\n :option=\"options\"\n />\n <DesignComponent\n v-model=\"value2\"\n type=\"menuButton\"\n label=\"With search\"\n showSearch\n :option=\"options\"\n />\n <DesignComponent\n v-model=\"value3\"\n type=\"menuButton\"\n label=\"Hide value if icon\"\n icon=\"settings\"\n hideValueIcon\n :option=\"options\"\n />\n </div>\n "
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
id: "MenuButtonVModel",
|
|
2068
|
+
name: {
|
|
2069
|
+
en: "Two-way binding (v-model)",
|
|
2070
|
+
ru: "Двусторонняя привязка (v-model)"
|
|
2071
|
+
},
|
|
2072
|
+
setup: "\n const valueSingle = ref('option2')\n const valueMultiple = ref(['option1', 'option3'])\n const options = [\n { label: 'First option', value: 'option1' },\n { label: 'Second option', value: 'option2' },\n { label: 'Third option', value: 'option3' }\n ]\n\n return { valueSingle, valueMultiple, options }\n ",
|
|
2073
|
+
template: "\n <div class=\"wiki-storybook-flex-column\">\n <div class=\"wiki-storybook-flex-align-center\">\n <span>Value: <strong>{{ valueSingle }}</strong></span>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option1'\">option 1</button>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option2'\">option 2</button>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option3'\">option 3</button>\n </div>\n\n <DesignComponent\n v-model=\"valueSingle\"\n type=\"menuButton\"\n label=\"Single select\"\n :option=\"options\"\n />\n\n <div class=\"wiki-storybook-flex-align-center\">\n <span>Value: <strong>{{ valueMultiple }}</strong></span>\n <button class=\"wiki-storybook-button\" @click=\"valueMultiple = ['option1', 'option2']\">option 1, 2</button>\n <button class=\"wiki-storybook-button wiki-storybook-button--warning\" @click=\"valueMultiple = []\">Clear</button>\n </div>\n\n <DesignComponent\n v-model=\"valueMultiple\"\n type=\"menuButton\"\n label=\"Multiple select\"\n multiple\n :option=\"options\"\n />\n </div>\n "
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
id: "MenuButtonSkeleton",
|
|
2077
|
+
name: {
|
|
2078
|
+
en: "Skeleton",
|
|
2079
|
+
ru: "Скелетон"
|
|
2080
|
+
},
|
|
2081
|
+
components: ["Skeleton"],
|
|
2082
|
+
template: "\n <DesignSkeleton :active=\"true\" style=\"max-width:320px\">\n <div class=\"wiki-storybook-flex-column\">\n <DesignComponent\n type=\"menuButton\"\n label=\"Loading menu button\"\n :option=\"[\n { label: 'First option', value: 'option1' },\n { label: 'Second option', value: 'option2' },\n { label: 'Third option', value: 'option3' }\n ]\"\n :buttonAttrs=\"{isSkeleton: true}\"\n />\n </div>\n </DesignSkeleton>\n "
|
|
2083
|
+
}
|
|
2084
|
+
],
|
|
2085
|
+
documentation: {
|
|
2086
|
+
body: "\n<StorybookDescriptions componentName={'MenuButton'} type={'menuButton'}/>\n<Canvas of={Component.MenuButtonBasic}/>\n\n<StorybookDescriptions componentName={'Value'} type={'value'}/>\n<StorybookDescriptions componentName={'Value'} type={'v-model'}/>\n<Canvas of={Component.MenuButtonVModel}/>\n\n<StorybookDescriptions componentName={'Style'} type={'isSkeleton'}/>\n<Canvas of={Component.MenuButtonSkeleton}/>\n ",
|
|
2087
|
+
events: "\n<StorybookDescriptions componentName={'Event'} type={'input'}/>\n<StorybookDescriptions componentName={'Event'} type={'change'}/>\n ",
|
|
2088
|
+
expose: "\n<StorybookDescriptions componentName={'Expose'} type={'selected'}/>\n<StorybookDescriptions componentName={'Expose'} type={'validation'}/>\n ",
|
|
2089
|
+
slots: "\n<StorybookDescriptions componentName={'Slot'} type={'default'} />\n<StorybookDescriptions componentName={'Menu'} type={'slots'}/>\n "
|
|
2090
|
+
},
|
|
2091
|
+
ai: { description: "\nButton-based dropdown selector combining a trigger Button and a dropdown Menu. Designed for space-saving select dropdowns where a standard text field outline is undesirable.\nDisplays selected values with configurable label separators (labelSeparator) and label hiding options (hideLabelValue, hideValueIcon).\nIntegrated hidden inputs provide standard form data carrying, while optional header search components (showSearch) allow filterable options lists.\n " }
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
name: "MenuChip",
|
|
2095
|
+
description: {
|
|
2096
|
+
en: "Chip-based dropdown selector combining Chip, Menu, and Select for clean, compact selection interfaces",
|
|
2097
|
+
ru: "Выпадающий селектор на основе чипа (Chip), объединяющий Chip, Menu и Select для компактных интерфейсов выбора"
|
|
2098
|
+
},
|
|
2099
|
+
possibilities: {
|
|
2100
|
+
en: [
|
|
2101
|
+
"chip trigger interface instead of standard field outline",
|
|
2102
|
+
"displays selected value names with a custom separator",
|
|
2103
|
+
"supports hiding the value when an icon is present (hideValueIcon)",
|
|
2104
|
+
"supports hiding the label when a value is selected (hideLabelValue)",
|
|
2105
|
+
"built-in search and filtering inside the dropdown header",
|
|
2106
|
+
"single or multiple value selection",
|
|
2107
|
+
"standard form data integration via a hidden input element"
|
|
2108
|
+
],
|
|
2109
|
+
ru: [
|
|
2110
|
+
"интерфейс чипа-триггера вместо стандартной рамки поля",
|
|
2111
|
+
"отображает имена выбранных значений с настраиваемым разделителем",
|
|
2112
|
+
"поддержка скрытия значения при наличии иконки (hideValueIcon)",
|
|
2113
|
+
"поддержка скрытия метки при выборе значения (hideLabelValue)",
|
|
2114
|
+
"встроенный поиск и фильтрация внутри заголовка выпадающего меню",
|
|
2115
|
+
"одиночный или множественный выбор значений",
|
|
2116
|
+
"стандартная интеграция данных формы через скрытый элемент ввода input"
|
|
2117
|
+
]
|
|
2118
|
+
},
|
|
2119
|
+
import: ["import { ref } from 'vue'"],
|
|
2120
|
+
stories: [
|
|
2121
|
+
{
|
|
2122
|
+
id: "MenuChipBasic",
|
|
2123
|
+
name: {
|
|
2124
|
+
en: "Basic",
|
|
2125
|
+
ru: "Базовые"
|
|
2126
|
+
},
|
|
2127
|
+
setup: "\n const options = ref([\n { label: 'English', value: 'en' },\n { label: 'Russian', value: 'ru' },\n { label: 'Vietnamese', value: 'vi' },\n { label: 'Spanish', value: 'es' }\n ])\n const value1 = ref('en')\n const value2 = ref('ru')\n const value3 = ref('vi')\n\n return { options, value1, value2, value3 }\n ",
|
|
2128
|
+
template: "\n <div class=\"wiki-storybook-flex\">\n <DesignComponent\n v-model=\"value1\"\n type=\"menuChip\"\n label=\"Language\"\n :option=\"options\"\n />\n <DesignComponent\n v-model=\"value2\"\n type=\"menuChip\"\n label=\"With search\"\n showSearch\n :option=\"options\"\n />\n <DesignComponent\n v-model=\"value3\"\n type=\"menuChip\"\n label=\"Hide value if icon\"\n icon=\"settings\"\n hideValueIcon\n :option=\"options\"\n />\n </div>\n "
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
id: "MenuChipVModel",
|
|
2132
|
+
name: {
|
|
2133
|
+
en: "Two-way binding (v-model)",
|
|
2134
|
+
ru: "Двусторонняя привязка (v-model)"
|
|
2135
|
+
},
|
|
2136
|
+
setup: "\n const valueSingle = ref('option2')\n const valueMultiple = ref(['option1', 'option3'])\n const options = [\n { label: 'First option', value: 'option1' },\n { label: 'Second option', value: 'option2' },\n { label: 'Third option', value: 'option3' }\n ]\n\n return { valueSingle, valueMultiple, options }\n ",
|
|
2137
|
+
template: "\n <div class=\"wiki-storybook-flex-column\">\n <div class=\"wiki-storybook-flex-align-center\">\n <span>Value: <strong>{{ valueSingle }}</strong></span>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option1'\">option 1</button>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option2'\">option 2</button>\n <button class=\"wiki-storybook-button\" @click=\"valueSingle = 'option3'\">option 3</button>\n </div>\n\n <DesignComponent\n v-model=\"valueSingle\"\n type=\"menuChip\"\n label=\"Single select\"\n :option=\"options\"\n />\n\n <div class=\"wiki-storybook-flex-align-center\">\n <span>Value: <strong>{{ valueMultiple }}</strong></span>\n <button class=\"wiki-storybook-button\" @click=\"valueMultiple = ['option1', 'option2']\">option 1, 2</button>\n <button class=\"wiki-storybook-button wiki-storybook-button--warning\" @click=\"valueMultiple = []\">Clear</button>\n </div>\n\n <DesignComponent\n v-model=\"valueMultiple\"\n type=\"menuChip\"\n label=\"Multiple select\"\n multiple\n :option=\"options\"\n />\n </div>\n "
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
id: "MenuChipSkeleton",
|
|
2141
|
+
name: {
|
|
2142
|
+
en: "Skeleton",
|
|
2143
|
+
ru: "Скелетон"
|
|
2144
|
+
},
|
|
2145
|
+
components: ["Skeleton"],
|
|
2146
|
+
template: "\n <DesignSkeleton :active=\"true\" style=\"max-width:320px\">\n <div class=\"wiki-storybook-flex-column\">\n <DesignComponent\n type=\"menuChip\"\n label=\"Loading menu chip\"\n :option=\"[\n { label: 'First option', value: 'option1' },\n { label: 'Second option', value: 'option2' },\n { label: 'Third option', value: 'option3' }\n ]\"\n :chipAttrs=\"{isSkeleton: true}\"\n />\n </div>\n </DesignSkeleton>\n "
|
|
2147
|
+
}
|
|
2148
|
+
],
|
|
2149
|
+
documentation: {
|
|
2150
|
+
body: "\n<StorybookDescriptions componentName={'MenuChip'} type={'menuChip'}/>\n<Canvas of={Component.MenuChipBasic}/>\n\n<StorybookDescriptions componentName={'Value'} type={'value'}/>\n<StorybookDescriptions componentName={'Value'} type={'v-model'}/>\n<Canvas of={Component.MenuChipVModel}/>\n\n<StorybookDescriptions componentName={'Style'} type={'isSkeleton'}/>\n<Canvas of={Component.MenuChipSkeleton}/>\n ",
|
|
2151
|
+
events: "\n<StorybookDescriptions componentName={'Event'} type={'input'}/>\n<StorybookDescriptions componentName={'Event'} type={'change'}/>\n ",
|
|
2152
|
+
expose: "\n<StorybookDescriptions componentName={'Expose'} type={'selected'}/>\n<StorybookDescriptions componentName={'Expose'} type={'validation'}/>\n ",
|
|
2153
|
+
slots: "\n<StorybookDescriptions componentName={'Slot'} type={'default'} />\n<StorybookDescriptions componentName={'Menu'} type={'slots'}/>\n "
|
|
2154
|
+
},
|
|
2155
|
+
ai: { description: "\nChip-based dropdown selector combining a trigger Chip and a dropdown Menu. Designed for space-saving select dropdowns where a standard text field outline or large button trigger is undesirable.\nDisplays selected values with configurable label separators (labelSeparator) and label hiding options (hideLabelValue, hideValueIcon).\nIntegrated hidden inputs provide standard form data carrying, while optional header search components (showSearch) allow filterable options lists.\n " }
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
name: "MenuCountry",
|
|
2159
|
+
description: {
|
|
2160
|
+
en: "Specialized menu for selecting countries with automatic flag and name loading",
|
|
2161
|
+
ru: "Специализированное меню для выбора стран с автоматической загрузкой флагов и названий"
|
|
2162
|
+
},
|
|
2163
|
+
possibilities: {
|
|
2164
|
+
en: [
|
|
2165
|
+
"automatic generation of country list via GeoFlagRef",
|
|
2166
|
+
"filtering by country codes via countryList prop",
|
|
2167
|
+
"all features of the base Menu component",
|
|
2168
|
+
"support for internationalized country names"
|
|
2169
|
+
],
|
|
2170
|
+
ru: [
|
|
2171
|
+
"автоматическая генерация списка стран через GeoFlagRef",
|
|
2172
|
+
"фильтрация по кодам стран через свойство countryList",
|
|
2173
|
+
"все возможности базового компонента Menu",
|
|
2174
|
+
"поддержка интернационализированных названий стран"
|
|
2175
|
+
]
|
|
2176
|
+
},
|
|
2177
|
+
import: ["import { ref } from 'vue'"],
|
|
2178
|
+
render: "\n <DesignComponent v-bind=\"args\">\n <template #control=\"{binds}\">\n <button class=\"wiki-storybook-button\" v-bind=\"binds\">Select Country</button>\n </template>\n </DesignComponent>\n ",
|
|
2179
|
+
stories: [{
|
|
2180
|
+
id: "MenuCountryFilter",
|
|
2181
|
+
name: {
|
|
2182
|
+
en: "Filtering countries",
|
|
2183
|
+
ru: "Фильтрация стран"
|
|
2184
|
+
},
|
|
2185
|
+
setup: "\n return {\n selectedValue: ref('US'),\n list: ['US', 'CA', 'MX', 'GB', 'FR', 'DE', 'IT', 'ES']\n }\n ",
|
|
2186
|
+
template: "\n <DesignComponent\n v-model:selected=\"selectedValue\"\n :country-list=\"list\"\n is-selected-by-value\n >\n <template #control=\"{binds, selectedNames}\">\n <button class=\"wiki-storybook-button\" v-bind=\"binds\">\n Selected: {{ selectedNames.value[0] || 'None' }}\n </button>\n </template>\n </DesignComponent>\n "
|
|
2187
|
+
}],
|
|
2188
|
+
documentation: {
|
|
2189
|
+
body: "\n<StorybookDescriptions componentName={'MenuCountry'} type={'menuCountry'}/>\n<Canvas of={Component.MenuCountryFilter}/>\n ",
|
|
2190
|
+
events: "\n<StorybookDescriptions componentName={'Event'} type={'click'}/>\n<StorybookDescriptions componentName={'Menu'} type={'event.updateValue'}/>\n ",
|
|
2191
|
+
expose: "\n<StorybookDescriptions componentName={'Expose'} type={'selected'}/>\n<StorybookDescriptions componentName={'Menu'} type={'expose.navigation'}/>\n ",
|
|
2192
|
+
slots: "\n<StorybookDescriptions componentName={'Menu'} type={'slotsControl'}/>\n<StorybookDescriptions componentName={'Menu'} type={'slots'}/>\n "
|
|
2193
|
+
},
|
|
2194
|
+
ai: {
|
|
2195
|
+
render: "\n<div :class=\"classDemo.item\">\n <MenuCountry v-bind=\"args\">\n <template #control=\"{ binds }\">\n <button class=\"wiki-storybook-button\" v-bind=\"binds\">\n Select Country\n </button>\n </template>\n </MenuCountry>\n</div>\n ",
|
|
2196
|
+
description: "\nThe MenuCountry component is a specialized version of the Menu component, designed specifically for country selection.\nIt leverages the GeoFlagRef utility to automatically populate the menu with a list of countries, including their flags and localized names.\nIt supports all the standard Menu functionalities like Window-based popups, custom controls, and sophisticated focus management.\nUse the 'countryList' prop to restrict the selection to a specific subset of countries.\n "
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2028
2199
|
{
|
|
2029
2200
|
name: "Modal",
|
|
2030
2201
|
description: {
|
|
@@ -2502,7 +2673,7 @@ var e = [
|
|
|
2502
2673
|
"функция скрытия всех разделительных линий"
|
|
2503
2674
|
]
|
|
2504
2675
|
},
|
|
2505
|
-
render: "\n <
|
|
2676
|
+
render: "\n <DesignComponent\n class=\"wiki-storybook-item--widescreen wiki-storybook-item--squared--sm\"\n v-bind=\"args\"\n >\n <div class=\"wiki-storybook-scrollbar-content\">\n <h3>Modern Web Interfaces and User Experience Design</h3>\n <p>In today's digital landscape, creating high-quality user interfaces has become a critical aspect of web application development. User interface components must not only be functional but also provide intuitive interaction patterns that enhance the overall user experience. The evolution of web technologies has enabled developers to create more sophisticated and engaging interfaces.</p>\n\n <p>Scrollbars play a particularly important role in content navigation and information architecture. They allow users to easily navigate through large volumes of information while maintaining context and orientation within the document structure. Modern scrollbars should be adaptive, responsive, and visually appealing while providing consistent behavior across different platforms and devices.</p>\n\n <h4>Principles of Effective Design Implementation</h4>\n <p>Effective scrollbar design takes into account multiple factors ranging from performance optimization to accessibility compliance. It's essential to ensure smooth animations, proper handling of various input devices, and comprehensive keyboard navigation support. Cross-browser compatibility remains a top priority, especially when dealing with custom scrollbar implementations that need to work consistently across different rendering engines.</p>\n\n <p>Users expect scrollbars to work predictably and uniformly throughout all parts of an application. This requires thorough testing and optimization for various usage scenarios, including mobile devices, desktop computers, and touch-enabled interfaces. The component must handle edge cases gracefully and provide appropriate feedback for user interactions.</p>\n\n <h4>Technical Implementation Considerations</h4>\n <p>When developing scrollbar components, it's crucial to consider rendering performance, especially when working with large datasets or dynamically generated content. Content virtualization, lazy loading strategies, and DOM operation optimization help ensure smooth performance even on less powerful devices. Memory management becomes particularly important in single-page applications where components may be mounted and unmounted frequently.</p>\n\n <p>Modern frameworks provide numerous tools for creating customizable scrollbars, but it's important to find the right balance between functionality and ease of use. The component should be easily integrable into existing projects while supporting various configuration options and customization possibilities. API design should be intuitive and follow established patterns within the framework ecosystem.</p>\n\n <h4>Future Trends and Accessibility</h4>\n <p>The future of web development is moving towards creating more inclusive and accessible interfaces, where every element, including scrollbars, contributes to improving the overall user experience. This includes support for screen readers, high contrast modes, and reduced motion preferences. Progressive enhancement ensures that the scrollbar functionality works across all user scenarios.</p>\n\n <p>Emerging technologies like CSS container queries and new scrolling APIs continue to expand the possibilities for creating more sophisticated scrolling experiences. The integration of these technologies with existing design systems requires careful planning and consideration of backward compatibility.</p>\n </div>\n </DesignComponent>\n ",
|
|
2506
2677
|
import: [],
|
|
2507
2678
|
stories: [],
|
|
2508
2679
|
documentation: {
|
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/en/functional-basic/Functions/isTab - Check for Tab key press'/>
|
|
4
|
+
|
|
5
|
+
# `isTab`
|
|
6
|
+
|
|
7
|
+
Checks if the pressed key is `Tab`. This function is useful for handling keyboard events when you need to react to focus navigation or trap focus, while supporting accessibility (a11y) and older browsers.
|
|
8
|
+
|
|
9
|
+
**Parameters:**
|
|
10
|
+
- `event: KeyboardEvent` — the keyboard event object.
|
|
11
|
+
|
|
12
|
+
**Returns:**
|
|
13
|
+
`boolean` — `true` if the `Tab` key is pressed, otherwise `false`.
|
|
14
|
+
|
|
15
|
+
**Supported event properties:**
|
|
16
|
+
The function checks the following event properties for maximum compatibility:
|
|
17
|
+
- `code`: `'Tab'`
|
|
18
|
+
- `key`: `'Tab'`
|
|
19
|
+
- `keyCode`: `9`
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { isTab } from '@dxtmisha/functional-basic'
|
|
23
|
+
|
|
24
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
25
|
+
if (isTab(event)) {
|
|
26
|
+
console.log('Tab pressed')
|
|
27
|
+
// Perform action
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/ru/functional-basic/Functions/isTab - Проверка нажатия Tab'/>
|
|
4
|
+
|
|
5
|
+
# `isTab`
|
|
6
|
+
|
|
7
|
+
Проверяет, является ли нажатая клавиша `Tab`. Функция полезна для обработки событий клавиатуры, когда необходимо реагировать на навигацию по фокусу или захватывать фокус, поддерживая при этом доступность (a11y) и старые браузеры.
|
|
8
|
+
|
|
9
|
+
**Параметры:**
|
|
10
|
+
- `event: KeyboardEvent` — объект события клавиатуры.
|
|
11
|
+
|
|
12
|
+
**Возвращает:**
|
|
13
|
+
`boolean` — `true`, если нажата клавиша `Tab`, иначе `false`.
|
|
14
|
+
|
|
15
|
+
**Поддерживаемые свойства события:**
|
|
16
|
+
Функция проверяет следующие свойства события для максимальной совместимости:
|
|
17
|
+
- `code`: `'Tab'`
|
|
18
|
+
- `key`: `'Tab'`
|
|
19
|
+
- `keyCode`: `9`
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { isTab } from '@dxtmisha/functional-basic'
|
|
23
|
+
|
|
24
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
25
|
+
if (isTab(event)) {
|
|
26
|
+
console.log('Нажат Tab')
|
|
27
|
+
// Выполнить действие
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/vi/functional-basic/Functions/isTab - Kiểm tra nhấn phím Tab'/>
|
|
4
|
+
|
|
5
|
+
# `isTab`
|
|
6
|
+
|
|
7
|
+
Kiểm tra xem phím được nhấn có phải là `Tab` hay không. Hàm này hữu ích để xử lý các sự kiện bàn phím khi bạn cần phản ứng với việc điều hướng tiêu điểm (focus navigation) hoặc giữ tiêu điểm (trap focus), đồng thời hỗ trợ khả năng truy cập (a11y) và các trình duyệt cũ.
|
|
8
|
+
|
|
9
|
+
**Tham số:**
|
|
10
|
+
- `event: KeyboardEvent` — đối tượng sự kiện bàn phím.
|
|
11
|
+
|
|
12
|
+
**Trả về:**
|
|
13
|
+
`boolean` — `true` nếu phím `Tab` được nhấn, ngược lại là `false`.
|
|
14
|
+
|
|
15
|
+
**Các thuộc tính sự kiện được hỗ trợ:**
|
|
16
|
+
Hàm kiểm tra các thuộc tính sự kiện sau để đảm bảo khả năng tương thích tối đa:
|
|
17
|
+
- `code`: `'Tab'`
|
|
18
|
+
- `key`: `'Tab'`
|
|
19
|
+
- `keyCode`: `9`
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { isTab } from '@dxtmisha/functional-basic'
|
|
23
|
+
|
|
24
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
25
|
+
if (isTab(event)) {
|
|
26
|
+
console.log('Đã nhấn Tab')
|
|
27
|
+
// Thực hiện hành động
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/en/scripts/bin/dxt-build-packages - Build Packages'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-packages
|
|
6
|
+
|
|
7
|
+
The `dxt-build-packages` command provides automated building of changed npm packages across the workspace. It uses `BuildPackages` and `PackageFile` to scan for active library folders, track versions, and incrementally compile package structures when changes are detected.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
- **Automated Monorepo Scanning**: Automatically detects active package directories under `/packages/` that contain a valid `package.json`.
|
|
12
|
+
- **Incremental Version-Based Caching**: Avoids redundant builds by maintaining a local build cache in `./logs/ui-build.log.json`. It only triggers build operations if a package's version has changed compared to the cache.
|
|
13
|
+
- **Intelligent Script Resolution**: Automatically executes `"build-recovery"` script if it is defined in the package's scripts, falling back to the standard `"build"` script.
|
|
14
|
+
- **Test Package Exclusion**: Automatically skips packages marked as tests (`"ui-test": true` in `package.json`).
|
|
15
|
+
|
|
16
|
+
## How does it work?
|
|
17
|
+
|
|
18
|
+
The package compilation workflow automates checks and build dispatching:
|
|
19
|
+
|
|
20
|
+
1. **Scan Directories**: The `BuildPackages` class scans the target packages directory (by default, `/packages/`) and reads the build cache log `./logs/ui-build.log.json`.
|
|
21
|
+
2. **Filter & Validate**: For each directory, it instantiates a `PackageFile` wrapper to verify that it is a package, that it is not a test package, and that its current version differs from the version recorded in the build cache.
|
|
22
|
+
3. **Execute Build**: If an update is required, it checks the package's `package.json` scripts:
|
|
23
|
+
- If `"build-recovery"` script exists, it executes `npm run build-recovery`.
|
|
24
|
+
- Otherwise, if `"build"` script exists, it executes `npm run build`.
|
|
25
|
+
4. **Log Synchronization**: Upon successful compilation of a package, its version is updated in the in-memory cache.
|
|
26
|
+
5. **Persist Logs**: If one or more packages were successfully built, the updated cache is saved back to `./logs/ui-build.log.json`.
|
|
27
|
+
|
|
28
|
+
## Additional Information
|
|
29
|
+
|
|
30
|
+
### Log Caching File (`ui-build.log.json`)
|
|
31
|
+
|
|
32
|
+
The local cache is stored at:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-build.log.json
|
|
35
|
+
```
|
|
36
|
+
If you wish to force-rebuild all packages regardless of version consistency, you can delete this file or reset its contents to empty `{}`.
|
|
37
|
+
|
|
38
|
+
### Excluding Test Packages
|
|
39
|
+
|
|
40
|
+
If you want a package to be ignored by the builder, add the following property to its `package.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"ui-test": true
|
|
44
|
+
}
|
|
45
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/ru/scripts/bin/dxt-build-packages - Сборка пакетов'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-packages
|
|
6
|
+
|
|
7
|
+
Команда `dxt-build-packages` обеспечивает автоматическую сборку измененных npm-пакетов в рабочем пространстве. Инструмент использует `BuildPackages` и `PackageFile` для сканирования активных директорий библиотек, отслеживания версий и инкрементальной компиляции пакетов при обнаружении изменений.
|
|
8
|
+
|
|
9
|
+
## Ключевые возможности
|
|
10
|
+
|
|
11
|
+
- **Автоматическое сканирование монорепозитория**: Обнаруживает активные директории пакетов внутри папки `/packages/`, содержащие корректный файл `package.json`.
|
|
12
|
+
- **Инкрементальное кэширование на основе версий**: Избегает избыточных сборок благодаря ведению локального кэша сборок в файле `./logs/ui-build.log.json`. Сборка пакета запускается только в том случае, если его текущая версия в `package.json` изменилась по сравнению с сохраненной в кэше.
|
|
13
|
+
- **Интеллектуальный выбор скриптов**: Автоматически выполняет скрипт `"build-recovery"`, если он определен в скриптах пакета, с переходом на стандартный скрипт `"build"`, если первый отсутствует.
|
|
14
|
+
- **Исключение тестовых пакетов**: Автоматически пропускает пакеты, помеченные как тестовые (содержащие `"ui-test": true` в `package.json`).
|
|
15
|
+
|
|
16
|
+
## Как это работает?
|
|
17
|
+
|
|
18
|
+
Процесс компиляции пакетов автоматизирует проверки и вызовы команд сборки:
|
|
19
|
+
|
|
20
|
+
1. **Сканирование директорий**: Класс `BuildPackages` сканирует целевую директорию пакетов (по умолчанию `/packages/`) и считывает файл кэша сборок `./logs/ui-build.log.json`.
|
|
21
|
+
2. **Фильтрация и валидация**: Для каждой папки создается обертка `PackageFile` для проверки того, что она является пакетом, не является тестовым пакетом, и что ее текущая версия отличается от версии, записанной в кэше.
|
|
22
|
+
3. **Выполнение сборки**: Если требуется обновление, инструмент проверяет скрипты в `package.json`:
|
|
23
|
+
- Если существует скрипт `"build-recovery"`, выполняется `npm run build-recovery`.
|
|
24
|
+
- В противном случае, если существует скрипт `"build"`, выполняется `npm run build`.
|
|
25
|
+
4. **Синхронизация логов**: После успешной компиляции пакета его версия обновляется в кэше в оперативной памяти.
|
|
26
|
+
5. **Сохранение логов**: Если один или несколько пакетов были успешно собраны, обновленный кэш сохраняется обратно в `./logs/ui-build.log.json`.
|
|
27
|
+
|
|
28
|
+
## Дополнительная информация
|
|
29
|
+
|
|
30
|
+
### Файл кэширования логов (`ui-build.log.json`)
|
|
31
|
+
|
|
32
|
+
Локальный кэш хранится по пути:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-build.log.json
|
|
35
|
+
```
|
|
36
|
+
Если вы хотите принудительно пересобрать все пакеты независимо от их версий, вы можете удалить этот файл или сбросить его содержимое до пустых скобок `{}`.
|
|
37
|
+
|
|
38
|
+
### Исключение тестовых пакетов
|
|
39
|
+
|
|
40
|
+
Если вы хотите, чтобы сборщик игнорировал конкретный пакет, добавьте следующее свойство в его файл `package.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"ui-test": true
|
|
44
|
+
}
|
|
45
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/vi/scripts/bin/dxt-build-packages - Xây Dựng Gói'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-packages
|
|
6
|
+
|
|
7
|
+
Lệnh `dxt-build-packages` cung cấp khả năng tự động xây dựng (build) các gói npm đã thay đổi trong không gian làm việc. Công cụ này sử dụng `BuildPackages` và `PackageFile` để quét các thư mục thư viện hoạt động, theo dõi các phiên bản và biên dịch tăng dần các cấu trúc gói khi phát hiện thay đổi.
|
|
8
|
+
|
|
9
|
+
## Các tính năng chính
|
|
10
|
+
|
|
11
|
+
- **Tự động quét Monorepo**: Tự động phát hiện các thư mục gói đang hoạt động dưới `/packages/` có chứa tệp `package.json` hợp lệ.
|
|
12
|
+
- **Bộ nhớ đệm tăng dần dựa trên Phiên bản**: Tránh các hoạt động xây dựng dư thừa bằng cách duy trì bộ nhớ đệm xây dựng cục bộ trong `./logs/ui-build.log.json`. Nó chỉ kích hoạt các hoạt động xây dựng nếu phiên bản hiện tại của gói trong `package.json` thay đổi so với phiên bản được lưu trong bộ nhớ đệm.
|
|
13
|
+
- **Giải quyết Tập lệnh Thông minh**: Tự động thực thi tập lệnh `"build-recovery"` nếu nó được định nghĩa trong các tập lệnh của gói, và chuyển sang tập lệnh tiêu chuẩn `"build"` nếu không tìm thấy tập lệnh đầu tiên.
|
|
14
|
+
- **Loại trừ Gói Thử nghiệm**: Tự động bỏ qua các gói được đánh dấu là thử nghiệm (chứa `"ui-test": true` trong tệp `package.json`).
|
|
15
|
+
|
|
16
|
+
## Nó hoạt động như thế nào?
|
|
17
|
+
|
|
18
|
+
Quy trình biên dịch gói tự động hóa việc kiểm tra và gửi lệnh xây dựng:
|
|
19
|
+
|
|
20
|
+
1. **Quét Thư mục**: Lớp `BuildPackages` quét thư mục gói mục tiêu (mặc định là `/packages/`) và đọc tệp nhật ký bộ nhớ đệm xây dựng `./logs/ui-build.log.json`.
|
|
21
|
+
2. **Lọc & Xác thực**: Đối với mỗi thư mục, nó khởi tạo một trình bao bọc `PackageFile` để xác minh rằng đó là một gói hợp lệ, không phải là gói thử nghiệm và phiên bản hiện tại của nó khác với phiên bản được ghi lại trong bộ nhớ đệm xây dựng.
|
|
22
|
+
3. **Thực thi Xây dựng**: Nếu yêu cầu cập nhật, nó sẽ kiểm tra các tập lệnh trong tệp `package.json`:
|
|
23
|
+
- Nếu tồn tại tập lệnh `"build-recovery"`, nó sẽ thực thi `npm run build-recovery`.
|
|
24
|
+
- Ngược lại, nếu tồn tại tập lệnh `"build"`, nó sẽ thực thi `npm run build`.
|
|
25
|
+
4. **Đồng bộ hóa Nhật ký**: Sau khi biên dịch thành công một gói, phiên bản của nó được cập nhật trong bộ nhớ đệm trong bộ nhớ tạm (in-memory cache).
|
|
26
|
+
5. **Lưu trữ Nhật ký**: Nếu một hoặc nhiều gói được xây dựng thành công, bộ nhớ đệm cập nhật sẽ được lưu lại vào `./logs/ui-build.log.json`.
|
|
27
|
+
|
|
28
|
+
## Thông tin chi tiết bổ sung
|
|
29
|
+
|
|
30
|
+
### Tệp bộ nhớ đệm nhật ký (`ui-build.log.json`)
|
|
31
|
+
|
|
32
|
+
Bộ nhớ đệm cục bộ được lưu trữ tại:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-build.log.json
|
|
35
|
+
```
|
|
36
|
+
Nếu bạn muốn buộc xây dựng lại tất cả các gói bất kể tính nhất quán của phiên bản, bạn có thể xóa tệp này hoặc đặt lại nội dung của nó thành dấu ngoặc nhọn trống `{}`.
|
|
37
|
+
|
|
38
|
+
### Loại trừ các gói thử nghiệm
|
|
39
|
+
|
|
40
|
+
Nếu bạn muốn một gói được bỏ qua bởi trình xây dựng, hãy thêm thuộc tính sau vào tệp `package.json` của gói đó:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"ui-test": true
|
|
44
|
+
}
|
|
45
|
+
```
|
package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.en.mdx
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/en/scripts/bin/dxt-build-publish-packages - Publish Packages'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-publish-packages
|
|
6
|
+
|
|
7
|
+
The `dxt-build-publish-packages` command provides automated publishing of npm packages across the workspace. It uses `BuildPublishPackages` and `PackageFile` to scan active library folders, track versions, and publish packages to npm when new versions are detected.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
- **Automated Monorepo Scanning**: Automatically detects active package directories under `/packages/` that contain a valid `package.json`.
|
|
12
|
+
- **Incremental Version-Based Caching**: Avoids redundant publications by maintaining a local publication cache in `./logs/ui-publish.log.json`. It only triggers publish operations if a package's version has changed compared to the cache.
|
|
13
|
+
- **Intelligent Script Resolution**: Automatically executes the `"publish-to-npm"` script if it is defined in the package's scripts, falling back to standard `npm publish --access public`.
|
|
14
|
+
- **Publish Exclusion**: Automatically skips packages marked as private (`"private": true`) or explicitly flagged to prevent publication (`"ui-no-publish": true`).
|
|
15
|
+
|
|
16
|
+
## How does it work?
|
|
17
|
+
|
|
18
|
+
The package publication workflow automates checks and publish dispatching:
|
|
19
|
+
|
|
20
|
+
1. **Scan Directories**: The `BuildPublishPackages` class scans the target packages directory (by default, `/packages/`) and reads the publication cache log from `./logs/ui-publish.log.json`.
|
|
21
|
+
2. **Filter & Validate**: For each directory, it instantiates a `PackageFile` wrapper to verify that it is a package and that it is not excluded from publishing.
|
|
22
|
+
3. **Execute Publish**: If an update is required or the package is not yet logged:
|
|
23
|
+
- If `"publish-to-npm"` script exists, it executes `npm run publish-to-npm`.
|
|
24
|
+
- Otherwise, it falls back to executing `npm publish --access public`.
|
|
25
|
+
4. **Log Synchronization**: Upon successful publication of a package, its version is updated in the in-memory cache.
|
|
26
|
+
5. **Persist Logs**: If one or more packages were successfully published, the updated cache is saved back to `./logs/ui-publish.log.json`.
|
|
27
|
+
|
|
28
|
+
## Additional Information
|
|
29
|
+
|
|
30
|
+
### Log Caching File (`ui-publish.log.json`)
|
|
31
|
+
|
|
32
|
+
The local publication cache is stored at:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-publish.log.json
|
|
35
|
+
```
|
|
36
|
+
If you wish to force-republish all packages regardless of version consistency, you can delete this file or reset its contents to empty `{}`.
|
|
37
|
+
|
|
38
|
+
### Excluding Packages from Publishing
|
|
39
|
+
|
|
40
|
+
If you want a package to be ignored by the publisher, add one of the following properties to its `package.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"private": true
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
or:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"ui-no-publish": true
|
|
50
|
+
}
|
|
51
|
+
```
|
package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.ru.mdx
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/ru/scripts/bin/dxt-build-publish-packages - Публикация пакетов'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-publish-packages
|
|
6
|
+
|
|
7
|
+
Команда `dxt-build-publish-packages` обеспечивает автоматическую публикацию npm-пакетов в рабочем пространстве. Инструмент использует `BuildPublishPackages` и `PackageFile` для сканирования активных директорий библиотек, отслеживания версий и публикации пакетов при обнаружении новой версии.
|
|
8
|
+
|
|
9
|
+
## Ключевые возможности
|
|
10
|
+
|
|
11
|
+
- **Автоматическое сканирование монорепозитория**: Обнаруживает активные директории пакетов внутри папки `/packages/`, содержащие корректный файл `package.json`.
|
|
12
|
+
- **Инкрементальное кэширование на основе версий**: Избегает избыточных публикаций благодаря ведению локального кэша публикаций в файле `./logs/ui-publish.log.json`. Публикация пакета запускается только в том случае, если его текущая версия в `package.json` изменилась по сравнению с сохраненной в кэше.
|
|
13
|
+
- **Интеллектуальный выбор скриптов**: Автоматически выполняет скрипт `"publish-to-npm"`, если он определен в скриптах пакета, с переходом на стандартную команду `npm publish --access public`, если первый отсутствует.
|
|
14
|
+
- **Исключение из публикации**: Автоматически пропускает пакеты, помеченные как приватные (`"private": true` в `package.json`) или содержащие свойство `"ui-no-publish": true`.
|
|
15
|
+
|
|
16
|
+
## Как это работает?
|
|
17
|
+
|
|
18
|
+
Процесс публикации пакетов автоматизирует проверки и вызовы команд публикации:
|
|
19
|
+
|
|
20
|
+
1. **Сканирование директорий**: Класс `BuildPublishPackages` сканирует целевую директорию пакетов (по умолчанию `/packages/`) и считывает файл кэша публикаций `./logs/ui-publish.log.json`.
|
|
21
|
+
2. **Фильтрация и валидация**: Для каждой папки создается обертка `PackageFile` для проверки того, что она является пакетом и не исключена из публикации.
|
|
22
|
+
3. **Выполнение публикации**: Если версия пакета не зарегистрирована или отличается от кэшированной версии:
|
|
23
|
+
- Если существует скрипт `"publish-to-npm"`, выполняется `npm run publish-to-npm`.
|
|
24
|
+
- В противном случае выполняется команда `npm publish --access public`.
|
|
25
|
+
4. **Синхронизация логов**: После успешной публикации пакета его версия обновляется в кэше в оперативной памяти.
|
|
26
|
+
5. **Сохранение логов**: Если один или несколько пакетов были успешно опубликованы, обновленный кэш сохраняется обратно в `./logs/ui-publish.log.json`.
|
|
27
|
+
|
|
28
|
+
## Дополнительная информация
|
|
29
|
+
|
|
30
|
+
### Файл кэширования логов (`ui-publish.log.json`)
|
|
31
|
+
|
|
32
|
+
Локальный кэш хранится по пути:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-publish.log.json
|
|
35
|
+
```
|
|
36
|
+
Если вы хотите принудительно переопубликовать все пакеты независимо от их версий, вы можете удалить этот файл или сбросить его содержимое до пустых скобок `{}`.
|
|
37
|
+
|
|
38
|
+
### Исключение из публикации
|
|
39
|
+
|
|
40
|
+
Если вы хотите, чтобы публикатор игнорировал конкретный пакет, добавьте одно из следующих свойств в его файл `package.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"private": true
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
или:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"ui-no-publish": true
|
|
50
|
+
}
|
|
51
|
+
```
|
package/src/media/functional/scripts/bin/dxt-build-publish-packages/build-publish-packages.vi.mdx
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {Meta} from '@storybook/addon-docs/blocks'
|
|
2
|
+
|
|
3
|
+
<Meta title='@dxtmisha/vi/scripts/bin/dxt-build-publish-packages - Công Bố Gói'/>
|
|
4
|
+
|
|
5
|
+
# dxt-build-publish-packages
|
|
6
|
+
|
|
7
|
+
Lệnh `dxt-build-publish-packages` cung cấp khả năng tự động công bố (publish) các gói npm trong không gian làm việc. Công cụ này sử dụng `BuildPublishPackages` và `PackageFile` để quét các thư mục thư viện hoạt động, theo dõi các phiên bản và công bố gói lên npm khi phát hiện phiên bản mới.
|
|
8
|
+
|
|
9
|
+
## Các tính năng chính
|
|
10
|
+
|
|
11
|
+
- **Tự động quét Monorepo**: Tự động phát hiện các thư mục gói đang hoạt động dưới `/packages/` có chứa tệp `package.json` hợp lệ.
|
|
12
|
+
- **Bộ nhớ đệm tăng dần dựa trên Phiên bản**: Tránh các hoạt động công bố dư thừa bằng cách duy trì bộ nhớ đệm công bố cục bộ trong `./logs/ui-publish.log.json`. Nó chỉ kích hoạt các hoạt động công bố nếu phiên bản hiện tại của gói trong `package.json` thay đổi so với phiên bản được lưu trong bộ nhớ đệm.
|
|
13
|
+
- **Giải quyết Tập lệnh Thông minh**: Tự động thực thi tập lệnh `"publish-to-npm"` nếu nó được định nghĩa trong các tập lệnh của gói, và chuyển sang lệnh tiêu chuẩn `npm publish --access public` nếu không tìm thấy tập lệnh đầu tiên.
|
|
14
|
+
- **Loại trừ Công bố**: Tự động bỏ qua các gói được đánh dấu là riêng tư (`"private": true`) hoặc có thuộc tính `"ui-no-publish": true` trong tệp `package.json`.
|
|
15
|
+
|
|
16
|
+
## Nó hoạt động như thế nào?
|
|
17
|
+
|
|
18
|
+
Quy trình công bố gói tự động hóa việc kiểm tra và gửi lệnh công bố:
|
|
19
|
+
|
|
20
|
+
1. **Quét Thư mục**: Lớp `BuildPublishPackages` quét thư mục gói mục tiêu (mặc định là `/packages/`) và đọc tệp nhật ký bộ nhớ đệm công bố `./logs/ui-publish.log.json`.
|
|
21
|
+
2. **Lọc & Xác thực**: Đối với mỗi thư mục, nó khởi tạo một trình bao bọc `PackageFile` để xác minh rằng đó là một gói hợp lệ và không bị loại trừ khỏi quy trình công bố.
|
|
22
|
+
3. **Thực thi Công bố**: Nếu phát hiện phiên bản mới hoặc gói chưa được ghi nhận trong bộ nhớ đệm:
|
|
23
|
+
- Nếu tồn tại tập lệnh `"publish-to-npm"`, nó sẽ thực thi `npm run publish-to-npm`.
|
|
24
|
+
- Ngược lại, nó sẽ thực thi lệnh `npm publish --access public`.
|
|
25
|
+
4. **Đồng bộ hóa Nhật ký**: Sau khi công bố thành công một gói, phiên bản của nó được cập nhật trong bộ nhớ đệm trong bộ nhớ tạm (in-memory cache).
|
|
26
|
+
5. **Lưu trữ Nhật ký**: Nếu một hoặc nhiều gói được công bố thành công, bộ nhớ đệm cập nhật sẽ được lưu lại vào `./logs/ui-publish.log.json`.
|
|
27
|
+
|
|
28
|
+
## Thông tin chi tiết bổ sung
|
|
29
|
+
|
|
30
|
+
### Tệp bộ nhớ đệm nhật ký (`ui-publish.log.json`)
|
|
31
|
+
|
|
32
|
+
Bộ nhớ đệm cục bộ được lưu trữ tại:
|
|
33
|
+
```
|
|
34
|
+
./logs/ui-publish.log.json
|
|
35
|
+
```
|
|
36
|
+
Nếu bạn muốn buộc công bố lại tất cả các gói bất kể tính nhất quán của phiên bản, bạn có thể xóa tệp này hoặc đặt lại nội dung của nó thành dấu ngoặc nhọn trống `{}`.
|
|
37
|
+
|
|
38
|
+
### Loại trừ các gói khỏi quy trình công bố
|
|
39
|
+
|
|
40
|
+
Nếu bạn muốn một gói được bỏ qua bởi trình công bố, hãy thêm một trong các thuộc tính sau vào tệp `package.json` của gói đó:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"private": true
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
hoặc:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"ui-no-publish": true
|
|
50
|
+
}
|
|
51
|
+
```
|