Dynamic, theme-driven, style props for vanilla-extract.

Overview

Rainbow Sprinkles 🧁

Dynamic, theme-driven, style props for vanilla-extract.

Release CI Contributor Covenant Maintainer

Rainbow sprinkles works similarly to @vanilla-extract/sprinkles. Like sprinkles, it generates custom CSS utility classes at build time. While sprinkles requires a pre-defined list of available values, Rainbow Sprinkles uses CSS custom properties to allow dynamic values using inline style variable assignments.

Compared to sprinkles:

  • Rainbow sprinkles ships a fraction of the CSS. For each property, Sprinkles produces CSS that's a factor of pre-defined values * possible conditions. Rainbow sprinkles produces CSS that only scales with the number of conditions.
  • Supports dynamic values. Rainbow Sprinkles uses dynamic inline style assignments to set the value of each property. You still get the TypeScript editor suggestions, but the ability to use any valid CSS value for that property.
  • Cannot be used in .css.ts files. Rainbow Sprinkles derives its values from inline style property assignments, which means it needs to be configured with a "host" element (see setup for details).

See a codesandbox demo here


Setup

Install Rainbow Sprinkles.

npm install rainbow-sprinkles

Create a rainbow-sprinkles.ts file, then export your configuration methods:

import { createRainbowSprinkles } from 'rainbow-sprinkles';

// or import a theme (e.g. `createTheme`, `createThemeContract`)
const vars = {
  space: {
    none: 0,
    small: '4px',
    medium: '8px',
    large: '16px',
    // etc.
  },
  colors: {
    blue50: '#eff6ff',
    blue100: '#dbeafe',
    blue200: '#bfdbfe',
    gray700: '#374151',
    gray800: '#1f2937',
    gray900: '#111827',
    // etc.
  },
};

export const {
  getBoxProps,
  createRainbowSprinklesCss,
  extractSprinklesFromProps,
} = createRainbowSprinkles({
  conditions: {
    mobile: {},
    tablet: { '@media': 'screen and (min-width: 768px)' },
    desktop: { '@media': 'screen and (min-width: 1024px)' },
  },
  defaultCondition: 'mobile',
  dynamicProperties: {
    // Define pre-determined values, which will be autosuggested
    color: vars.colors,
    backgroundColor: vars.colors,
    margin: vars.space,
    marginTop: vars.space,
    marginLeft: vars.space,
    marginRight: vars.space,
    marginBottom: vars.space,
    // Will work with any CSS value
    display: true,
    textAlign: true,
    flexDirection: true,
    justifyContent: true,
    alignItems: true,
  },
  staticProperties: {
    // Build out utility classes that don't use CSS variables
    display: ['block', 'flex', 'inline-block', 'inline-flex'],
  },
  shorthands: {
    bg: ['backgroundColor'],
    m: ['margin'],
    mr: ['marginRight'],
    ml: ['marginLeft'],
    mt: ['marginTop'],
    mb: ['marginBottom'],
    marginX: ['marginLeft', 'marginRight'],
    marginY: ['marginTop', 'marginBottom'],
    mx: ['marginLeft', 'marginRight'],
    my: ['marginTop', 'marginBottom'],
  },
});

export type Sprinkles = Parameters<typeof getBoxProps>[1];

Then set-up in your "host" component (in this case, a Box component):

// Box.css.ts
import { createRainbowSprinklesCss } from './rainbow-sprinkles';

export const rainbowSprinklesCss = createRainbowSprinklesCss();
// Box.tsx
import {
  getBoxProps,
  extractSprinklesFromProps,
  Sprinkles,
} from './rainbow-sprinkles';
import { rainbowSprinklesCss } from './Box.css';

interface BoxProps extends Sprinkles {
  children?: React.ReactNode;
}

export const Box = ({ children, ...props }: BoxProps) => {
  const { sprinkles, otherProps } = extractSprinklesFromProps(props);

  return (
    <div {...getBoxProps(rainbowSprinklesCss, sprinkles)} {...otherProps}>
      {children}
    </div>
  );
};

Good to go!

import { Box } from './Box';

function App() {
  return (
    // Use pre-defined values
    <Box backgroundColor="$blue50" m="$large">
      {/* Or any valid CSS value */}
      <Box textAlign="center">Hello world!</Box>
    </Box>
  );
}

dynamicProperties vs staticProperties

One trade off that's made for supporting dynamic values is that we have to increase the size of the document. Instead of just appending a single class to an element to add a style, both a utility class and an inline style assignment is added to an element. While this setup will still produce an overall smaller bundle in many cases, some large applications may observe frequent recurrence of specific combinations of CSS properties and values. In these cases, those combinations can be set-up in staticProperties in the initial configuration. staticProperties will produce typical CSS utility classes. The runtime portion of Rainbow Sprinkles will defer to the CSS classes created by staticProperties and not apply any inline style assignments.

Here's an example scenario in which this property could be valuable. Your organization sets up Rainbow Sprinkles and sees widespread adoption. Your metrics reveal that the most frequently used prop/value combinations is display="flex" and margin with the application's theme variables. You can run an experiment to evaluate whether making these property/values combination static improves the bundle size.

createRainbowSprinkles({
  dynamicProperties: {
    // Still support arbitrary values
    display: true,
    margin: true,
  },
  staticProperties: {
    // Also produce fixed CSS classes
    display: ['flex'],
    margin: vars.space,
  },
});

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see CONTRIBUTING.md

Thanks

  • Vanilla Extract for creating an inovative and configurable CSS preprocessor
  • Styled System for inventing theme-driven style props
  • Homebase, Wayfair's design system, for providing interesting problems to solve

License

Distributed under the MIT License. See LICENSE for more information.

Contact

The Homebase Engineering Team - email Rogin Farrer - @roginfarrer

Comments
  • Usage with the Recipe API from vanilla-extract

    Usage with the Recipe API from vanilla-extract

    First of all thanks a lot for the library, awesome solution!

    Description

    After doing the changes to rainbow-sprinkles I wanted to use with the recipes API but I get this error:

    Type 'RuntimeFnReturn' is not assignable to type 'RecipeStyleRule | undefined'.

    I already added the variables correctly but still ...

    Expected Behaviour

    Able to create recipes without any errors.

    Actual Behaviour

    Getting error on the recipe API

    Affected Version

    ^0.12.1

    opened by jesus-hernandezmoreno 6
  • Support multiple vars in shorthands

    Support multiple vars in shorthands

    Description

    This change adds support for multiple values in shorthand properties such as padding. In its extant form, rainbow sprinkles can only support shorthands with a single value:

    <Component
      padding="$500"
    />
    

    and due to the trimming logic, even putting multiple values will cause only the first to be used, so the following example winds up being equivalent to the preceding one:

    <Component
      padding="$500 $1000"
    />
    

    This change works for both variable values ($500) and static values (10px), and in both non-responsive and responsive values.

    I wanted to add tests for this functionality but wasn't quite sure how to implement; will continue to look into it

    Type of Change

    • [ ] Bug Fix
    • [x] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [x] I have read the contributing guidelines
    • [x] Existing issues have been referenced (where applicable)
    • [x] I have verified this change is not present in other open pull requests
    • [x] Functionality is documented
    • [x] All code style checks pass
    • [x] New code contribution is covered by automated tests
    • [x] All new and existing tests pass
    opened by mooronic 4
  • Bump actions/stale from 5 to 6

    Bump actions/stale from 5 to 6

    Bumps actions/stale from 5 to 6.

    Release notes

    Sourced from actions/stale's releases.

    v6.0.0

    :warning: Breaking change :warning:

    Issues/PRs default close-issue-reason is now not_planned(#789)

    V5.2.0

    Features: New option include-only-assigned enables users to process only issues/PRs that are already assigned. If there is no assignees and this option is set, issue will not be processed per: issue/596

    Fixes: Fix date comparison edge case PR/816

    Dependency Updates: PR/812

    Fix issue when days-before-close is more than days-before-stale

    fixes a bug introduced in #717

    fixed in #775

    v5.1.0

    [5.1.0]

    Don't process stale issues right after they're marked stale Add close-issue-reason option #764#772 Various dependabot/dependency updates

    Changelog

    Sourced from actions/stale's changelog.

    Changelog

    [6.0.0]

    :warning: Breaking change :warning:

    Issues/PRs default close-issue-reason is now not_planned(#789)

    [5.1.0]

    Don't process stale issues right after they're marked stale [Add close-issue-reason option]#764#772 Various dependabot/dependency updates

    4.1.0 (2021-07-14)

    Features

    4.0.0 (2021-07-14)

    Features

    Bug Fixes

    • dry-run: forbid mutations in dry-run (#500) (f1017f3), closes #499
    • logs: coloured logs (#465) (5fbbfba)
    • operations: fail fast the current batch to respect the operations limit (#474) (5f6f311), closes #466
    • label comparison: make label comparison case insensitive #517, closes #516
    • filtering comments by actor could have strange behavior: "stale" comments are now detected based on if the message is the stale message not who made the comment(#519), fixes #441, #509, #518

    Breaking Changes

    • The options skip-stale-issue-message and skip-stale-pr-message were removed. Instead, setting the options stale-issue-message and stale-pr-message will be enough to let the stale workflow add a comment. If the options are unset, a comment will not be added which was the equivalent of setting skip-stale-issue-message to true.
    • The operations-per-run option will be more effective. After migrating, you could face a failed-fast process workflow if you let the default value (30) or set it to a small number. In that case, you will see a warning at the end of the logs (if enabled) indicating that the workflow was stopped sooner to avoid consuming too much API calls. In most cases, you can just increase this limit to make sure to process everything in a single run.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies stale 
    opened by dependabot[bot] 4
  • Support responsiveArray

    Support responsiveArray

    Problem Statement

    allow responsiveArray option in defineProperties.

    probably need to attach the responsiveArray into each config, and loop propValue if it's array

    enhancement stale 
    opened by chef-jojo 3
  • Bump pnpm/action-setup from 2.2.2 to 2.2.3

    Bump pnpm/action-setup from 2.2.2 to 2.2.3

    Bumps pnpm/action-setup from 2.2.2 to 2.2.3.

    Release notes

    Sourced from pnpm/action-setup's releases.

    v2.2.3

    Bump Node.js version to 16 pnpm/action-setup#56

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Don't assign any variables if the propValue matches a static value

    Don't assign any variables if the propValue matches a static value

    Description

    Fix #38.

    Type of Change

    • [x] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [x] I have read the contributing guidelines
    • [x] Existing issues have been referenced (where applicable)
    • [x] I have verified this change is not present in other open pull requests
    • [x] Functionality is documented
    • [x] All code style checks pass
    • [x] New code contribution is covered by automated tests
    • [x] All new and existing tests pass
    opened by simontaisne 2
  • Fixed class creation being skipped when property values are zero

    Fixed class creation being skipped when property values are zero

    Description

    Addressing https://github.com/wayfair/rainbow-sprinkles/issues/89

    For numeric property types, such as FlexShrink, zero-values are sometimes useful, but were being evaluated as falsey in the assignClasses function, resulting in no classnames being created.

    Type of Change

    • [x] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [ ] I have read the contributing guidelines
    • [ ] Existing issues have been referenced (where applicable)
    • [ ] I have verified this change is not present in other open pull requests
    • [ ] Functionality is documented
    • [ ] All code style checks pass
    • [x ] New code contribution is covered by automated tests
    • [ ] All new and existing tests pass
    opened by skyesong 1
  • Update css type for Line Width

    Update css type for Line Width

    Description

    Update css type for Line Width

    Type of Change

    • [X] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [X] I have read the contributing guidelines
    • [X] Existing issues have been referenced (where applicable)
    • [X] I have verified this change is not present in other open pull requests
    • [X] Functionality is documented
    • [X] All code style checks pass
    • [X] New code contribution is covered by automated tests
    • [X] All new and existing tests pass
    opened by kbondanza 1
  • WIP Update types

    WIP Update types

    Description

    Updating the type for Line Width.

    Type of Change

    • [X] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [X] I have read the contributing guidelines
    • [X] Existing issues have been referenced (where applicable)
    • [X] I have verified this change is not present in other open pull requests
    • [X] Functionality is documented
    • [X] All code style checks pass
    • [X] New code contribution is covered by automated tests
    • [X] All new and existing tests pass
    opened by kbondanza 1
  • Fixed stringification of number values

    Fixed stringification of number values

    Description

    #80 was an ineffective fix. It fixed the error caused by passing numbers, but didn't actually support stringifying values when the classes and inline styles are created.

    Type of Change

    • [x] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [x] I have read the contributing guidelines
    • [x] Existing issues have been referenced (where applicable)
    • [x] I have verified this change is not present in other open pull requests
    • [x] Functionality is documented
    • [x] All code style checks pass
    • [x] New code contribution is covered by automated tests
    • [x] All new and existing tests pass
    opened by roginfarrer 1
  • Fix erroring with numbers

    Fix erroring with numbers

    Description

    We weren't properly handling number values. Intentionally not coercing to a pixel value like some other similar libraries do, since that can be confusing. Instead it just stringifies the value.

    This will support things like margin={0}, which will emit margin: 0

    Type of Change

    • [x] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [ ] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [x] I have read the contributing guidelines
    • [x] Existing issues have been referenced (where applicable)
    • [x] I have verified this change is not present in other open pull requests
    • [x] Functionality is documented
    • [x] All code style checks pass
    • [x] New code contribution is covered by automated tests
    • [x] All new and existing tests pass
    opened by roginfarrer 1
  • Update dependency @types/react-dom to v18.0.10

    Update dependency @types/react-dom to v18.0.10

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/react-dom (source) | 18.0.6 -> 18.0.10 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Bump actions/stale from 5 to 7

    Bump actions/stale from 5 to 7

    Bumps actions/stale from 5 to 7.

    Release notes

    Sourced from actions/stale's releases.

    v7.0.0

    ⚠️ This version contains breaking changes ⚠️

    What's Changed

    Breaking Changes

    • In this release we prevent this action from managing the stale label on items included in exempt-issue-labels and exempt-pr-labels
    • We decided that this is outside of the scope of this action, and to be left up to the maintainer

    New Contributors

    Full Changelog: https://github.com/actions/stale/compare/v6...v7.0.0

    v6.0.1

    Update @​actions/core to 1.10.0 #839

    Full Changelog: https://github.com/actions/stale/compare/v6.0.0...v6.0.1

    v6.0.0

    :warning: Breaking change :warning:

    Issues/PRs default close-issue-reason is now not_planned(#789)

    V5.2.0

    Features: New option include-only-assigned enables users to process only issues/PRs that are already assigned. If there is no assignees and this option is set, issue will not be processed per: issue/596

    Fixes: Fix date comparison edge case PR/816

    Dependency Updates: PR/812

    Fix issue when days-before-close is more than days-before-stale

    fixes a bug introduced in #717

    fixed in #775

    v5.1.0

    [5.1.0]

    ... (truncated)

    Changelog

    Sourced from actions/stale's changelog.

    Changelog

    [7.0.0]

    :warning: Breaking change :warning:

    [6.0.1]

    Update @​actions/core to v1.10.0 (#839)

    [6.0.0]

    :warning: Breaking change :warning:

    Issues/PRs default close-issue-reason is now not_planned(#789)

    [5.1.0]

    Don't process stale issues right after they're marked stale [Add close-issue-reason option]#764#772 Various dependabot/dependency updates

    4.1.0 (2021-07-14)

    Features

    4.0.0 (2021-07-14)

    Features

    Bug Fixes

    • dry-run: forbid mutations in dry-run (#500) (f1017f3), closes #499
    • logs: coloured logs (#465) (5fbbfba)
    • operations: fail fast the current batch to respect the operations limit (#474) (5f6f311), closes #466
    • label comparison: make label comparison case insensitive #517, closes #516
    • filtering comments by actor could have strange behavior: "stale" comments are now detected based on if the message is the stale message not who made the comment(#519), fixes #441, #509, #518

    Breaking Changes

    ... (truncated)

    Commits
    • 6f05e42 draft release for v7.0.0 (#888)
    • eed91cb Update how stale handles exempt items (#874)
    • 10dc265 Merge pull request #880 from akv-platform/update-stale-repo
    • 9c1eb3f Update .md files and allign build-test.yml with the current test.yml
    • bc357bd Update .github/workflows/release-new-action-version.yml
    • 690ede5 Update .github/ISSUE_TEMPLATE/bug_report.md
    • afbcabf Merge branch 'main' into update-stale-repo
    • e364411 Update name of codeql.yml file
    • 627cef3 fix print outputs step (#859)
    • 975308f Merge pull request #876 from jongwooo/chore/use-cache-in-check-dist
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Inline property styles if no conditions

    Inline property styles if no conditions

    Description

    Experiment of directly inlining styles if no conditions are used.

    For example:

    <Box mb="$2000" />
    

    would translate to

    <div style="margin-bottom: var(--space-2000);"></div>
    

    Instead of assigning a class and a CSS variable assignment on the inline style. If there are conditions, we use CSS to handle CSS specificity.

    Type of Change

    • [ ] Bug Fix
    • [ ] New Feature
    • [ ] Breaking Change
    • [x] Refactor
    • [ ] Documentation
    • [ ] Other (please describe)

    Checklist

    • [x] I have read the contributing guidelines
    • [x] Existing issues have been referenced (where applicable)
    • [x] I have verified this change is not present in other open pull requests
    • [x] Functionality is documented
    • [x] All code style checks pass
    • [x] New code contribution is covered by automated tests
    • [x] All new and existing tests pass
    opened by roginfarrer 1
  • Update Node.js to v16.19.0

    Update Node.js to v16.19.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | node | minor | 16.17.0 -> 16.19.0 |


    Release Notes

    nodejs/node

    v16.19.0: 2022-12-13, Version 16.19.0 'Gallium' (LTS), @​richardlau

    Compare Source

    Notable Changes
    OpenSSL 1.1.1s

    This update is a bugfix release and does not address any security vulnerabilities.

    Root certificates updated to NSS 3.85

    Certificates added:

    • Autoridad de Certificacion Firmaprofesional CIF A626340
    • Certainly Root E1
    • Certainly Root R1
    • D-TRUST BR Root CA 1 2020
    • D-TRUST EV Root CA 1 2020
    • DigiCert TLS ECC P384 Root G5
    • DigiCert TLS RSA4096 Root G5
    • E-Tugra Global Root CA ECC v3
    • E-Tugra Global Root CA RSA v3
    • HiPKI Root CA - G1
    • ISRG Root X2
    • Security Communication ECC RootCA1
    • Security Communication RootCA3
    • Telia Root CA v2
    • vTrus ECC Root CA
    • vTrus Root CA

    Certificates removed:

    • Cybertrust Global Root
    • DST Root CA X3
    • GlobalSign Root CA - R2
    • Hellenic Academic and Research Institutions RootCA 2011
    Time zone update to 2022f

    Time zone data has been updated to 2022f. This includes changes to Daylight Savings Time (DST) for Fiji and Mexico. For more information, see https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html.

    Other Notable Changes

    Dependency updates:

    Experimental features:

    Commits

    v16.18.1: 2022-11-04, Version 16.18.1 'Gallium' (LTS), @​BethGriggs

    Compare Source

    This is a security release.

    Notable changes

    The following CVEs are fixed in this release:

    • CVE-2022-43548: DNS rebinding in --inspect via invalid octal IP address (Medium)

    More detailed information on each of the vulnerabilities can be found in November 2022 Security Releases blog post.

    Commits

    v16.18.0: 2022-10-12, Version 16.18.0 'Gallium' (LTS), @​juanarbol

    Compare Source

    Notable changes
    • [1cc050eaa8] - (SEMVER-MINOR) assert: add getCalls and reset to callTracker (Moshe Atlow) #​44191
    • [e5c9975f11] - (SEMVER-MINOR) crypto: allow zero-length secret KeyObject (Filip Skokan) #​44201
    • [317cd051ce] - (SEMVER-MINOR) crypto: allow zero-length IKM in HKDF and in webcrypto PBKDF2 (Filip Skokan) #​44201
    • [f80bdc5ef3] - (SEMVER-MINOR) doc: deprecate modp1, modp2, and modp5 groups (Tobias Nießen) #​44588
    • [8398e98b1b] - (SEMVER-MINOR) http: make idle http parser count configurable (theanarkh) #​43974
    • [2cd2f56962] - (SEMVER-MINOR) http: throw error on content-length mismatch (sidwebworks) #​44378
    • [6be761e8a9] - (SEMVER-MINOR) lib: add diagnostics channel for process and worker (theanarkh) #​44045
    • [1400796cef] - (SEMVER-MINOR) net,tls: pass a valid socket on tlsClientError (Daeyeon Jeong) #​44021
    • [092239a7f1] - (SEMVER-MINOR) net: add local family (theanarkh) #​43975
    • [381e11e18e] - (SEMVER-MINOR) report: expose report public native apis (Chengzhong Wu) #​44255
    • [2ba547aa5b] - (SEMVER-MINOR) src: expose environment RequestInterrupt api (Chengzhong Wu) #​44362
    • [6ed3367155] - (SEMVER-MINOR) stream: add ReadableByteStream.tee() (Daeyeon Jeong) #​44505
    • [0fbedac6ce] - (SEMVER-MINOR) test_runner: add before/after/each hooks (Moshe Atlow) #​43730
    • [70563b53c5] - (SEMVER-MINOR) util: add maxArrayLength option to Set and Map (Kohei Ueno) #​43576
    Commits

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency @preconstruct/cli to v2.2.2

    Update dependency @preconstruct/cli to v2.2.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @preconstruct/cli (source) | 2.2.1 -> 2.2.2 | age | adoption | passing | confidence |


    Release Notes

    preconstruct/preconstruct

    v2.2.2

    Compare Source

    Patch Changes
    • #​495 4e90c2b Thanks @​mycroes! - The outDir and declarationDir tsconfig options are now ignored. These options are unnecessary for Preconstruct since it controls where the .d.ts files are emitted to. This fixes confusing errors if you had these options set.

    • eaa2fcc Thanks @​mitchellhamilton! - Improved error when importing something with an extension that can't be imported


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency @vanilla-extract/next-plugin to v2.1.1

    Update dependency @vanilla-extract/next-plugin to v2.1.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @vanilla-extract/next-plugin | 2.0.2 -> 2.1.1 | age | adoption | passing | confidence |


    Release Notes

    vanilla-extract-css/vanilla-extract

    v2.1.1

    Compare Source

    Patch Changes
    • #​852 dfc6405 Thanks @​mattcompiles! - Fix Cannot find module *.css.ts.vanilla.css issue

      Previously, CSS was being output on both the client and server builds. This fix ensure CSS is only output on the client build.

    v2.1.0

    Compare Source

    Minor Changes
    • #​827 9cfb9a1 Thanks @​mattcompiles! - Remove requirement for @vanilla-extract/babel-plugin

      Previously, to get automatic debug IDs you needed to use Babel with the @vanilla-extract/babel-plugin in your config. As this is no longer the case, the @vanilla-extract/babel-plugin should be removed completely from your project.

    Patch Changes

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • [email protected](Dec 15, 2022)

  • [email protected](Dec 6, 2022)

  • [email protected](Oct 27, 2022)

  • [email protected](Oct 24, 2022)

  • [email protected](Oct 21, 2022)

  • [email protected](Oct 19, 2022)

  • [email protected](Sep 2, 2022)

  • [email protected](Jun 21, 2022)

  • [email protected](May 29, 2022)

  • [email protected](May 27, 2022)

    Minor Changes

    • e9f8620: This is a big refactor to support composing multiple instances of properties. AKA, this makes the API match closer to @vanilla-extract/sprinkles, where you use defineProperties to create one or more sets of properties, then compose them with createRainbowSprinkles.

      Before:

      // rainbow-sprinkles.css.ts
      import {createRainbowSprinkles} from 'rainbow-sprinkles';
      
      export const rainbowSprinkles = createRainbowSprinkles({ ... })
      

      After:

      // rainbow-sprinkles.css.ts
      import {defineProperties, createRainbowSprinkles} from 'rainbow-sprinkles';
      
      const properties = defineProperties({ ... })
      
      export const rainbowSprinkles = createRainbowSprinkles(properties)
      ```tx
      
      
    Source code(tar.gz)
    Source code(zip)
  • [email protected](May 23, 2022)

    Patch Changes

    • 4d0158a: - Prevents scale values that do not have a `# rainbow-sprinkles prefix from evaluating to scale values.
      • Fixes the case where a configured CSS property had a defined scale for staticProperties, and allowed arbitrary values through dynamicProperties, and the incorrect classes were being generated
    Source code(tar.gz)
    Source code(zip)
  • [email protected](May 21, 2022)

  • [email protected](May 21, 2022)

    Minor Changes

    • de5a718: - createRainbowSprinkles can now (and should) be created in a .css.js file

      • createRainbowSprinkles now creates the CSS and returns just the runtime function: rainbowSprinkles
      • rainbowSprinkles works similarly to getBoxProps, but now it returns a new property, otherProps, which are the props filtered through the function that are not rainbow sprinkles.

      The runtime function produced by createRainbowSprinkles is now serialized, meaning it can be exported from a .css.js file. (Attempting to do so previously would throw an error when being compiled by vanilla-extract.). Subsequently, this allowed a larger refactor to simplify the set-up API.

      Before:

      // rainbow-sprinkles.ts
      export const {
        getBoxProps,
        extractSprinklesFromProps,
        createRainbowSprinklesCss
      } = createRainbowSprinkles({ ... })
      

      After:

      // rainbow-sprinkles.css.ts
      export const rainbowSprinkles = createRainbowSprinkles({ ... })
      

      rainbowSprinkles functions similarly to getBoxProps, with the notable addition of otherProps:

      // App.tsx
      import { rainbowSprinkles } from './rainbow-sprinkles.css';
      
      const Box = props => {
        const { className, style, otherProps } = rainbowSprinkles(props);
      
        return <div className={className} style={style} {...otherProps} />;
      };
      

    Patch Changes

    • b6931a1: Fixed processing of null or undefined prop values
    Source code(tar.gz)
    Source code(zip)
  • [email protected](May 3, 2022)

  • [email protected](May 3, 2022)

  • [email protected](May 2, 2022)

  • [email protected](Apr 25, 2022)

Owner
Wayfair Tech
Furnishing the future of technology with Wayfair.
Wayfair Tech
This is a starter file with base SvelteKit skeleton configurations with Open Props, Jit Props, and PostCSS configured.

create-svelte Everything you need to build a Svelte project, powered by create-svelte; Creating a project If you're seeing this, you've probably alrea

Brittney Postma 4 Jul 22, 2022
Any code using props of Express.

Some projects to test knowledge with express and nodejs SESSIONS AND COOCKIES Login Basic example use session, redirect and file manipulation. Views B

Mateus Nicolau 1 Jan 7, 2022
Airbnb-React - In this project, An Airbnb experience page clone is created to learn and implement React props concepts.

Create React Airbnb App In this project An airbnb experience page clone is created to learn and implement React props concepts. Objectives Learn about

Yogesh Gurjar 4 Jun 28, 2022
Convert a CSS linear gradient function to expo-linear-gradient props

@bacons/css-to-expo-linear-gradient Demo: snack Convert a CSS linear gradient function to expo-linear-gradient props. Add the package to your npm depe

Evan Bacon 15 Dec 15, 2022
Extract the JSON payload from SHC QR codes (i.e Québec Covid Vaccination QR Codes)

shc-extractor Extract the JSON payload from SHC QR Codes (i.e Québec COVID Vaccination QR Codes) Introduction Dans les prochains jours/semaines, les q

Olivier Brassard 160 Dec 16, 2022
:black_medium_small_square:React Move | Beautiful, data-driven animations for React

React-Move Beautiful, data-driven animations for React. Just 3.5kb (gzipped)! Documentation and Examples Features Animate HTML, SVG & React-Native Fin

Steve Hall 6.5k Jan 1, 2023
A forkable Next.js site w/ a blank custom Nextra theme (w/Tailwind)

Nextra Blank Custom Theme/Boilerplate Example A nearly blank MDX blog/content site powered by a custom Nextra theme (see components/layout.js) w/Tailw

Jared Palmer 91 Jan 6, 2023
This simple and small react component can check your repository stars and change theme on light/dark

Repository metrics for react This beauty and easy (4KB) react component can help you add metrics to your repositories also you can change component th

Koma Human 2 Jun 25, 2022
Starter kit with Next.js, Chakra-UI, Framer-Motion in Typescript. Internationalization, SEO, Components, Theme (dark/light) and more...

Typescript Next.js Chakra-UI Framer-Motion Starter Kit Start with a powerful template ⚡️ Table of contents Getting started Paths & Files Useful depend

Alexandre Gossard 40 Jan 7, 2023
Set of property utilities for Stitches with theme tokens support. Use the built-in utils, or easily build custom ones.

Stitches Mix Set of property utilities for Stitches with theme tokens support. Use the built-in utils, or easily build custom ones. Usage To import al

João Pedro Schmitz 12 Aug 8, 2022
Further split the React Native code based on Metro build to improve performance, providing `Dll` and `Dynamic Imports` features

React-Native Code Splitting Further split the React Native code based on Metro build to improve performance, providing Dll and Dynamic Imports feature

Wuba 126 Dec 29, 2022
HTML CSS & React - Client side dynamic e-commerce website (stripe integrated)

Furniture E-Commerce Project Description React front-end full operating dynamic and responsive E-Commerce shop including payment connection (stripe) B

Almog Wertzberger 15 Dec 27, 2022
A react native component that lets you build a dynamic expandable chips list.

React Native Expandable Chips List A react native component that lets you build a dynamic expandable chips list. Installation Run npm install react-na

Daniel Cocos 13 Sep 23, 2022
An open source application to create, manage and embed contact forms on static/dynamic sites with no code

Formify is an open source application that lets you create, manage and embed contact forms on any site without writing code. This project is done as a

Basharath 37 Dec 26, 2022
Isolated React component development environment with a living style guide

Isolated React component development environment with a living style guide React Styleguidist is a component development environment with hot reloaded

Styleguidist 10.6k Jan 5, 2023
An example of a travel style app built with Ionic React

ionic-react-travel-app An example of a travel style app built with Ionic React If you'd like to support, you can buy me a coffee ☕️ Included in this I

Alan Montgomery 29 Sep 27, 2022
Skia based squircle for React Native. draws with Figma squirce style

react-native-squircle-skia Disclaimer @shopify/react-native-skia is alpha release. Use with caution. This library dependes on figma's blog article. Wh

JB Paul 16 Dec 16, 2022
A style export tool that live edits and exports code ready to copy / paste

Awesome Title Generator A style export tool that live edits and exports code ready to copy / paste. Features Edits text and live previews it CSS and R

Crhistian de Oliveira 19 Oct 7, 2022
Terminal Styled Portfolio Website ˋ( ° ▽、° ) , a terminal style/styled portfolio website made with <3 using react.

AshTerm A Terminal Styled Portfolio Website. ??‍?? Made Using- ⚛ Framework ReactJS ?? Terminal react-console-emulator ?? Deployed using CloudFlare Run

ashish 67 Nov 22, 2022