Skip to content
Open
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
2 changes: 1 addition & 1 deletion .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"outFileExtension": "js"
},
"sourceMaps": true,
"exclude": ["\\.(stories|test)\\."]
"exclude": ["\\.(stories|test)\\.", "\\.d\\.ts$"]
}
22 changes: 17 additions & 5 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,22 @@
"import": "./dist/next/primitives/index.js",
"require": "./dist/cjs/next/primitives/index.js"
},
"./next/css": "./dist/next/css/index.css",
"./next/primitives/system/layout.css": "./dist/next/primitives/system/layout.css",
"./next/primitives/system/spacing.css": "./dist/next/primitives/system/spacing.css",
"./next/primitives/system/radius.css": "./dist/next/primitives/system/radius.css",
"./next/css": {
"types": "./dist/next/css/index.d.ts",
"default": "./dist/next/css/index.css"
},
"./next/primitives/system/layout.css": {
"types": "./dist/next/css/index.d.ts",
"default": "./dist/next/primitives/system/layout.css"
},
"./next/primitives/system/spacing.css": {
"types": "./dist/next/css/index.d.ts",
"default": "./dist/next/primitives/system/spacing.css"
},
"./next/primitives/system/radius.css": {
"types": "./dist/next/css/index.d.ts",
"default": "./dist/next/primitives/system/radius.css"
},
"./next/primitives/defaults": {
"types": "./dist/next/primitives/defaults.d.ts",
"import": "./dist/next/primitives/defaults.js",
Expand All @@ -46,7 +58,7 @@
"build": "concurrently \"npm:build:*\"",
"build:esm": "swc ./src -d dist --strip-leading-paths --config-file ../.swcrc",
"build:types": "tsc --project tsconfig.build.json",
"build:next-css": "copyfiles -u 1 \"src/next/**/*.css\" dist",
"build:next-css": "copyfiles -u 1 \"src/next/**/*.css\" \"src/next/css/*.d.ts\" dist",
"ladle": "ladle serve",
"ladle:build": "ladle build",
"type-check": "tsc --noEmit",
Expand Down
18 changes: 18 additions & 0 deletions components/src/next/css/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright The Perses Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* Type stub for the CSS entry points so consumers can `import '@perses-dev/components/next/css'`
* (and the `./next/primitives/system/*.css` entries) without declaring the modules themselves.
*/
export {};
27 changes: 21 additions & 6 deletions design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,26 @@
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./css": "./dist/css/index.css",
"./css/layers": "./dist/css/layers.css",
"./css/reset": "./dist/css/reset.css",
"./css/tokens": "./dist/css/tokens.css",
"./css/semantic": "./dist/css/semantic.css"
"./css": {
"types": "./dist/css/index.d.ts",
"default": "./dist/css/index.css"
},
"./css/layers": {
"types": "./dist/css/index.d.ts",
"default": "./dist/css/layers.css"
},
"./css/reset": {
"types": "./dist/css/index.d.ts",
"default": "./dist/css/reset.css"
},
"./css/tokens": {
"types": "./dist/css/index.d.ts",
"default": "./dist/css/tokens.css"
},
"./css/semantic": {
"types": "./dist/css/index.d.ts",
"default": "./dist/css/semantic.css"
}
},
"sideEffects": [
"*.css"
Expand All @@ -34,7 +49,7 @@
"build": "concurrently \"npm:build:*\"",
"build:esm": "swc ./src -d dist --strip-leading-paths --config-file ../.swcrc --ignore '**/test/**'",
"build:types": "tsc --project tsconfig.build.json",
"build:css": "mkdir -p dist/css && cp -f src/css/*.css dist/css/",
"build:css": "mkdir -p dist/css && cp -f src/css/*.css src/css/*.d.ts dist/css/",
"type-check": "tsc --noEmit",
"start": "concurrently -P \"npm:build:* -- {*}\" -- --watch",
"test": "cross-env TZ=UTC vitest run",
Expand Down
18 changes: 18 additions & 0 deletions design-tokens/src/css/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright The Perses Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* Type stub for the CSS entry points so consumers can `import '@perses-dev/design-tokens/css'`
* (and the `./css/*` subpaths) without declaring the modules themselves.
*/
export {};
Loading