New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shiftbrainstd/harmonic-modular-scale

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shiftbrainstd/harmonic-modular-scale - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

dist/demo/index.d.ts

86

package.json
{
"name": "@shiftbrainstd/harmonic-modular-scale",
"description": "Polyrhythm Modular Scale",
"author": "Shiftbrain Inc. (https://www.shiftbrain.com/)",
"version": "1.0.1",
"main": "_index.scss",
"description": "Harmonic Modular Scale Typography",
"author": "Shiftbrain Standard Design Unit (https://standard.shiftbrain.com/)",
"version": "1.1.0",
"main": "dist/index.js",
"module": "dist/harmomic-modular-scale.esm.js",
"unpkg": "dist/harmomic-modular-scale.umd.production.min.js",
"typings": "dist/index.d.ts",
"files": [
"_index.scss",
"dist",
"types",
"scss/**/*"

@@ -21,22 +26,60 @@ ],

"scripts": {
"prepublishOnly": "run-s lint test build",
"sass:watch": "chokidar '**/*.scss' -c 'npm run sass:build' --initial",
"sass:build": "sass demo/main.scss demo/main.css",
"sass:build": "sass demo/main.scss:demo/main.css",
"sass:lint": "stylelint \"**/*.scss\"",
"ts:lint": "eslint \"src/**/*.ts\"",
"ts:watch": "tsdx watch --entry demo/index.ts --format umd",
"ts:build": "tsdx build --format cjs,esm,umd --entry src/index.ts",
"serve": "browser-sync start -c ./.config/browser-sync.js",
"start": "npm-run-all -p sass:watch serve",
"build": "npm run sass:build",
"lint": "stylelint **/*.scss",
"start": "run-p sass:watch ts:watch serve",
"build": "run-s sass:build ts:build",
"lint": "run-s sass:lint ts:lint",
"test": "jest"
},
"dependencies": {
"tiny-invariant": "^1.0.6",
"csstype": "^2.6.7"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"browser-sync": "^2.26.7",
"chokidar-cli": "^2.1.0",
"fast-glob": "^3.1.0",
"emotion": "^10.0.23",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.0.1",
"fast-glob": "^3.1.1",
"husky": "^3.1.0",
"jest": "^24.9.0",
"lint-staged": "^9.5.0",
"npm-run-all": "^4.1.5",
"sass": "^1.23.2",
"prettier": "^1.19.0",
"sass": "^1.23.7",
"sass-true": "^5.0.0",
"stylelint": "^11.1.1",
"stylelint-config-recommended-scss": "^4.0.0",
"stylelint-scss": "^3.12.0"
"stylelint": "^12.0.0",
"stylelint-config-recommended-scss": "^4.1.0",
"stylelint-scss": "^3.13.0",
"ts-jest": "^24.2.0",
"tsdx": "^0.11.0",
"tslib": "^1.10.0",
"typescript": "^3.6.4"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
],
"*.{css,scss}": [
"stylelint --fix",
"git add"
]
},
"publishConfig": {

@@ -48,7 +91,14 @@ "access": "public"

"rules": {
"string-quotes": "double"
"string-quotes": "double",
"property-no-unknown": [
true,
{
"ignoreProperties": "/scale./"
}
]
}
},
"jest": {
"testEnvironment": "node"
"testEnvironment": "node",
"preset": "ts-jest"
},

@@ -62,3 +112,7 @@ "prettier": {

{
"files": "*.js",
"files": [
"*.js",
"*.ts",
"*.md"
],
"options": {

@@ -65,0 +119,0 @@ "singleQuote": true

24

README.md

@@ -15,6 +15,8 @@ # Harmonic Modular Scale

A Sass module to manage your project’s typographic scale using a [harmonic progression](https://en.wikipedia.org/wiki/Harmonic_progression_(mathematics)).
A Sass module to manage your project’s typographic scale using a [harmonic progression](<https://en.wikipedia.org/wiki/Harmonic_progression_(mathematics)>).
See the [explanatory article](https://standard.shiftbrain.com/blog/harmonious-proportions-in-type-sizes) for details (Japanese).
**This documentation refers to the Sass APIs. To use the library with JavaScript read the [documentation here](docs/javascript-api.md).**
<!-- TOC -->

@@ -48,3 +50,3 @@

```scss
@use "harmonic-modular-scale" as hms;
@use "@shiftbrainstd/harmonic-modular-scale" as hms;
```

@@ -90,8 +92,8 @@

| argument | type | default | description |
| --------------------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `$font-size-degree` | number | 0 | An integer indicating the font size in the harmonic scale. The returned value will be relative to the base font size. |
| `$line-height-degree` | number | null | The increments of line height relative to the minimum height that can contain the current font size. It must be an integer. |
| `$lines` | number | 1 | The number to multiply the line height for. |
| `$as-line-height` | boolean | false | If true, returns the value relative to the current font-size. If false, returns the value relative to the root font size. |
| argument | type | default | description |
| --------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `$font-size-degree` | number | 0 | An integer indicating the font size in the harmonic scale. The returned value will be relative to the base font size. |
| `$line-height-degree` | number | null | The increments of line height relative to the minimum height that can contain the current font size. It must be an integer. |
| `$lines` | number | 1 | The number to multiply the line height for. |
| `$as-line-height` | boolean | false | If true, returns the value relative to the current font-size. If false, returns the value relative to the root font size. |

@@ -168,5 +170,5 @@ It will returns `line-hieght` value related to the `$base-font-size`. It is helpful when you need to set sizes based on typographic scale.

@use "sass:meta";
@use "harmonic-modular-scale";
@use "@shiftbrainstd/harmonic-modular-scale";
@use "polyrhythm-typography" as pt with (
@use "@shiftbrainstd/polyrhythm-typography" as pt with (
$type-scaler: meta.get-function("get-sizes", $module: "harmonic-modular-scale")

@@ -199,3 +201,3 @@ );

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/devjam/harmonic-modular-scale/issues).
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/ShiftbrainStd/harmonic-modular-scale/issues).

@@ -202,0 +204,0 @@ ## 📝 License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc