Skip to content

Revert "feat: sync release-3.18.0 to dev" #1909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/auto-all-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:

- name: Run Build Sass Common
run: pnpm build:ui saas-common -t ${{ steps.parseTag.outputs.publishVersion }} -d saas

- name: Run Build Runtime
run: pnpm build:runtime

- name: Run Build Theme
run: pnpm build:theme
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
"private": true,
"packageManager": "pnpm@8.3.1",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
"license": "MIT",
"homepage": "https://opentiny.design/tiny-vue",
"repository": {
"type": "git",
"url": "git@github.com:opentiny/tiny-vue.git"
},
"bugs": {
"url": "https://github.com/opentiny/tiny-vue/issues"
},
"keywords": [
"vue",
"vue3",
Expand All @@ -25,6 +16,15 @@
"renderless-components",
"headless-components"
],
"author": "OpenTiny Team",
"license": "MIT",
"repository": {
"type": "git",
"url": "git@github.com:opentiny/tiny-vue.git"
},
"bugs": {
"url": "https://github.com/opentiny/tiny-vue/issues"
},
"main": "packages/index.js",
"engines": {
"node": ">=16",
Expand Down Expand Up @@ -81,7 +81,7 @@
"pub:themeSaas": "pnpm --filter=\"./packages/theme-saas/dist\" publish --no-git-checks --access=public",
"pub:renderless": "pnpm --filter=\"./packages/renderless/dist\" publish --no-git-checks --access=public",
"pub:runtime": "pnpm --filter=\"./packages/vue-runtime/\" publish --no-git-checks --access=public",
"pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless",
"pub:all": "pnpm pub2 && pnpm pub3 && pnpm pub:theme && pnpm pub:themeMobile && pnpm pub:themeSaas && pnpm pub:renderless && pnpm pub:runtime",
"pub:site": "pnpm -C examples/sites pub",
"// ---------- 自动化发测试包 ----------": "",
"auto-build-pub": "pnpm -C internals/automate auto-build-pub",
Expand Down Expand Up @@ -162,7 +162,6 @@
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.6",
"@commitlint/config-conventional": "^18.4.3",
"@types/color": "^3.0.3",
"@types/eslint": "^8.4.10",
"@types/node": "^18.11.18",
Expand All @@ -172,7 +171,6 @@
"@volar-plugins/prettier": "^2.0.0",
"@volar-plugins/prettyhtml": "^2.0.0",
"@vue/tsconfig": "^0.4.0",
"commitlint": "^18.4.3",
"depcheck": "1.4.3",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.8.0",
Expand All @@ -185,9 +183,11 @@
"gulp-less": "^5.0.0",
"gulp-svg-inline": "^1.0.1",
"gulp-transform": "^3.0.5",
"husky": "^8.0.3",
"lerna": "^6.4.0",
"lint-staged": "^15.2.0",
"husky": "^8.0.3",
"commitlint": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"minimist": "^1.2.8",
"node-xlsx": "^0.21.0",
"prettier": "^3.0.0",
Expand Down Expand Up @@ -265,4 +265,4 @@
"> 1%",
"last 2 versions"
]
}
}
9 changes: 2 additions & 7 deletions packages/renderless/src/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const handleScroll = (state: IAnchorRenderlessParams['state']) => () => {
state.scrollTimer = window.setTimeout(() => {
state.isScroll = false
clearTimeout(state.scrollTimer)
}, 200)
}, 2000)
}

// 设置滚动偏移量
Expand Down Expand Up @@ -183,11 +183,6 @@ export const onItersectionObserver =
return
}

if (state.isScroll) {
api.handleScroll()
return
}

for (let key in state.observerLinks) {
if (Object.prototype.hasOwnProperty.call(state.observerLinks, key)) {
const item = state.observerLinks[key]
Expand All @@ -207,7 +202,7 @@ export const onItersectionObserver =
}
}
},
{ root: scrollContainer, threshold: [0, 0.25, 0.5, 1] }
{ root: scrollContainer, threshold: [0] }
)

addObserver({ props, state })
Expand Down
151 changes: 0 additions & 151 deletions packages/theme-saas/src/anchor/index.less
Original file line number Diff line number Diff line change
@@ -1,151 +0,0 @@
/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';

@anchor-prefix-cls: ~'@{css-prefix}anchor';

.@{anchor-prefix-cls} {
@apply bg-transparent;
@apply w-50;
@apply relative;
@apply text-color-text-primary;
@apply text-sm;

&__affix {
@apply fixed;
z-index: 1;
}

&__line {
.@{anchor-prefix-cls}-link + .@{anchor-prefix-cls}-link {
margin-top: 0.5em;
}

.@{anchor-prefix-cls}-link-mask {
@apply absolute;
@apply max-w-0;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
left: 2px;
@apply w-full;
background-color: var(--ti-anchor-link-mask-bg-color);
}

.@{anchor-prefix-cls}-orbit {
@apply absolute;
left: 0;
top: 0;
bottom: 0;
@apply w-1;
@apply rounded;
@apply bg-color-border;

&-skid {
@apply absolute;
left: 0;
@apply w-1;
@apply bg-color-brand;
@apply rounded;
&--active {
@apply bg-color-brand;
}
}
}
}

&-link-title:hover {
@apply text-color-brand;
}

&-link {
@apply ml-4;
cursor: pointer;
@apply leading-9;

&-title {
display: block;
@apply max-w-full;
padding: var(--ti-anchor-link-title-padding-vertical) var(--ti-anchor-link-title-padding-right)
var(--ti-anchor-link-title-padding-vertical) var(--ti-anchor-link-title-padding-left);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
@apply text-color-text-primary;
@apply whitespace-nowrap;
&&--active {
@apply text-color-brand;
}
}
}

&__dot {
@apply w-50;

.@{anchor-prefix-cls} {
padding: 0 16px;
}

.@{anchor-prefix-cls}-link {
@apply relative;
padding-left: 10px;
margin-bottom: 16px;
}

.@{anchor-prefix-cls}-link-title {
padding-left: 16px;
padding-right: 0;
-webkit-line-clamp: 2;

&:before {
content: '';
display: block;
@apply w-2;
@apply h-2;
border: 1px solid var(--ti-anchor-dot-border-color);
@apply absolute;
border-radius: 50%;
left: 0px;
top: 6px;
}

&:after {
content: '';
display: block;
width: 1px;
background-color: var(--color-border-base);
@apply bg-color-bg-2;
@apply absolute;
border-radius: 50%;
left: 3.5px;
top: 20px;
bottom: -18px;
}

&:hover,
&--active {
color: var(--ti-anchor-link-active-text-color);

&:before {
border-color: var(--ti-anchor-link-active-text-color);
@apply opacity-100;
}
}
}

.@{anchor-prefix-cls}-link:last-child > .@{anchor-prefix-cls}-link-title:after {
@apply hidden;
}
}
}
1 change: 0 additions & 1 deletion packages/theme-saas/theme/defaultTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ module.exports = {
60: '15rem',
56: '14rem',
52: '13rem',
50: '12.5rem',
48: '12rem',
45: '11.25rem',
44: '11rem',
Expand Down
10 changes: 5 additions & 5 deletions packages/theme/build/edit‐dir‐theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const basePath = '/base/'

const emptyThemeContent = `@import '../../{{}}/index.less';`

const baseContent = fs.readFileSync('../src/base/basic-var.less', 'utf8')
const baseContent = `@import '../../base/index.less';
html:root`

const scopedTitle = `@import '../../custom.less';
@import '../../{{}}/index.less';
Expand Down Expand Up @@ -228,15 +229,14 @@ const createTheme = (callbackFn) => {
let newDataStr = dataStr.slice(startIndex, endIndex)
const lastIndex = newDataStr.lastIndexOf("'")
newDataStr =
baseContent +
newDataStr
.slice(0, lastIndex)
.replace(/\'ti-/g, '--ti-')
.replace(/\'/g, '')
.replace(/\,\n/g, ';\n')
.replace(/\, \/\//g, '; //')
.replace('{', '') + ';\n}'

newDataStr = baseContent.replace('}', newDataStr)
.replace(/\, \/\//g, '; //') +
';\n}'

writeFile(buildThemePathMap[fileDir] + '/index.less', newDataStr)
}
Expand Down
1 change: 1 addition & 0 deletions packages/theme/src/base/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
@import './reset.less';
@import './basic-var.less';
@import './transition.less';
@import '../error-page/index.less';
@import '../svg/index.less';
Loading
Loading