Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into add/welcome-flow-tra…
Browse files Browse the repository at this point in the history
…cks-events
  • Loading branch information
robertsreberski committed Aug 5, 2024
2 parents a17a572 + e2ce031 commit f958965
Show file tree
Hide file tree
Showing 357 changed files with 12,995 additions and 588 deletions.
658 changes: 444 additions & 214 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

AI Logo Generator: update upgrade message.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

AI Logo Generator: fix small UI issues.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const FeatureFetchFailureScreen: React.FC< {
onRetry: () => void;
} > = ( { onCancel, onRetry } ) => {
const errorMessage = __(
'We are sorry. There was an error loading your Jetpack AI account settings. Please, try again.',
'We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.',
'jetpack-ai-client'
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const GeneratorModal: React.FC< GeneratorModalProps > = ( {
/>
{ logoAccepted ? (
<div className="jetpack-ai-logo-generator__accept">
<VisitSiteBanner onVisitBlankTarget={ closeModal } />
<VisitSiteBanner />
<div className="jetpack-ai-logo-generator__accept-actions">
<Button variant="primary" onClick={ closeModal }>
{ __( 'Close', 'jetpack-ai-client' ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const UpgradeScreen: React.FC< {
const { tracks } = useAnalytics();
const { recordEvent: recordTracksEvent } = tracks;
const upgradeMessageFeature = __(
'Upgrade your Jetpack AI for access to exclusive features, including logo generation. This upgrade will also increase the amount of requests you can use in all AI-powered features.',
'The logo generator requires a paid Jetpack AI plan. Upgrade your plan to access exclusive features, including logo generation. The upgrade will also increase the amount of requests you can use in all AI-powered features.',
'jetpack-ai-client'
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type React from 'react';

export const VisitSiteBanner: React.FC< {
className?: string;
onVisitBlankTarget: () => void;
onVisitBlankTarget?: () => void;
} > = ( { className = null, onVisitBlankTarget } ) => {
return (
<div className={ clsx( 'jetpack-ai-logo-generator-modal-visit-site-banner', className ) }>
Expand All @@ -42,7 +42,7 @@ export const VisitSiteBanner: React.FC< {
variant="link"
href="https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai"
target="_blank"
onClick={ onVisitBlankTarget }
onClick={ onVisitBlankTarget ? onVisitBlankTarget : null }
>
{ __( 'Learn more about Jetpack AI', 'jetpack-ai-client' ) }
<Icon icon={ external } size={ 20 } />
Expand Down
5 changes: 5 additions & 0 deletions projects/js-packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### This is a list detailing changes for the Jetpack RNA Components package releases.

## [0.55.4] - 2024-08-01
### Added
- Update Welcome Banner and set async site-only connection [#38534]

## [0.55.3] - 2024-07-30
### Changed
- React: Changing global JSX namespace to React.JSX [#38585]
Expand Down Expand Up @@ -1106,6 +1110,7 @@
### Changed
- Update node version requirement to 14.16.1

[0.55.4]: https://github.com/Automattic/jetpack-components/compare/0.55.3...0.55.4
[0.55.3]: https://github.com/Automattic/jetpack-components/compare/0.55.2...0.55.3
[0.55.2]: https://github.com/Automattic/jetpack-components/compare/0.55.1...0.55.2
[0.55.1]: https://github.com/Automattic/jetpack-components/compare/0.55.0...0.55.1
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion projects/js-packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/jetpack-components",
"version": "0.55.4-alpha",
"version": "0.55.4",
"description": "Jetpack Components Package",
"author": "Automattic",
"license": "GPL-2.0-or-later",
Expand Down
15 changes: 15 additions & 0 deletions projects/js-packages/critical-css-gen/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Files not needed to be distributed in the package.
.gitattributes export-ignore
node_modules export-ignore

# Files to include in the mirror repo
/build-browser/** production-include
/build-node/** production-include

# Files to exclude from the mirror repo
/changelog/** production-exclude
/src/** production-exclude
/tests/** production-exclude
/rollup.config.js production-exclude
/jest.config.cjs production-exclude
/tsconfig.browser.json production-exclude
4 changes: 4 additions & 0 deletions projects/js-packages/critical-css-gen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor
/node_modules
/build-node
/build-browser
7 changes: 7 additions & 0 deletions projects/js-packages/critical-css-gen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

24 changes: 24 additions & 0 deletions projects/js-packages/critical-css-gen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# critical-css-gen

A flexible Critical CSS Generator that supports multiple URLs and viewports, with both server-side and client-side generation capabilities.

## How to install critical-css-gen

### Installation From Git Repo

## Contribute

## Get Help

## Using this package in your WordPress plugin

If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.

## Security

Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).

## License

critical-css-gen is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: minor
Type: added

Adds global statistics
Add package files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Initial version.
44 changes: 44 additions & 0 deletions projects/js-packages/critical-css-gen/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "automattic/jetpack-critical-css-gen",
"description": "A flexible Critical CSS Generator that supports multiple URLs and viewports, with both server-side and client-side generation capabilities.",
"type": "library",
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
],
"build-production": [
"NODE_ENV=production pnpm run build"
],
"test-js": [
"pnpm exec playwright install && pnpm run test"
]
},
"repositories": [
{
"type": "path",
"url": "../../packages/*",
"options": {
"monorepo": true
}
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"autotagger": true,
"changelogger": {
"link-template": "https://github.com/Automattic/jetpack-critical-css-gen/compare/v${old}...v${new}"
},
"mirror-repo": "Automattic/jetpack-critical-css-gen"
}
}
5 changes: 5 additions & 0 deletions projects/js-packages/critical-css-gen/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const baseConfig = require( 'jetpack-js-tools/jest/config.base.js' );

module.exports = {
...baseConfig,
};
78 changes: 78 additions & 0 deletions projects/js-packages/critical-css-gen/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"private": true,
"type": "module",
"name": "@automattic/jetpack-critical-css-gen",
"version": "0.1.0-alpha",
"description": "A flexible Critical CSS Generator that supports multiple URLs and viewports, with both server-side and client-side generation capabilities.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/critical-css-gen/#readme",
"bugs": {
"url": "https://github.com/Automattic/jetpack/labels/[JS Package] Critical Css Gen"
},
"repository": {
"type": "git",
"url": "https://github.com/Automattic/jetpack.git",
"directory": "projects/js-packages/critical-css-gen"
},
"license": "GPL-2.0-or-later",
"author": "Automattic",
"scripts": {
"build:browser": "rollup -c",
"build:node": "tsc",
"build": "pnpm run clean && pnpm run build:browser && pnpm run build:node",
"clean": "rm -rf build-node/ && rm -rf build-browser/",
"test": "pnpm build && NODE_ENV=test NODE_PATH=./node_modules jest --forceExit --config=tests/config/jest.config.js"
},
"main": "./build-node/node.js",
"browser": "./build-browser/bundle.js",
"devDependencies": {
"@babel/core": "7.24.7",
"@babel/preset-env": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@rollup/plugin-commonjs": "26.0.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"@rollup/plugin-terser": "0.4.3",
"@rollup/plugin-typescript": "8.3.3",
"@types/clean-css": "4.2.5",
"@types/css-tree": "2.0.1",
"@types/node": "^20.4.2",
"express": "4.19.2",
"jest": "29.7.0",
"playwright": "1.45.1",
"playwright-core": "^1.45.1",
"prettier": "npm:[email protected]",
"rollup": "2.79.1",
"rollup-plugin-polyfill-node": "0.13.0",
"source-map": "0.7.4",
"source-map-js": "1.2.0",
"tslib": "2.5.0",
"typescript": "5.0.4",
"webpack": "5.76.0",
"webpack-dev-middleware": "5.3.4"
},
"exports": {
".": {
"jetpack:src": "./src/node.ts",
"types": "./build-node/node.d.ts",
"browser": "./build-browser/bundle.js",
"import": "./build-node/node.js",
"require": "./build-node/node.js",
"default": "./build-node/node.js"
}
},
"dependencies": {
"clean-css": "^5.3.1",
"css-tree": "^2.3.1"
},
"peerDependencies": {
"playwright-core": "^1.45.1"
},
"peerDependenciesMeta": {
"playwright-core": {
"optional": true
}
},
"engines": {
"node": ">=18.0.0"
}
}
47 changes: 47 additions & 0 deletions projects/js-packages/critical-css-gen/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import nodePolyfills from 'rollup-plugin-polyfill-node';

const sharedPlugins = [
resolve( {
browser: true,
preferBuiltins: false,
modulesOnly: false,
} ),
typescript( {
tsconfig: 'tsconfig.browser.json',
sourceMap: true,
inlineSources: false,
declaration: false,
} ),
commonjs(),
nodePolyfills(),
json(),
];

export default {
input: 'src/browser.ts',
output: [
{
sourcemap: true,
format: 'iife',
name: 'CriticalCSSGenerator',
file: 'build-browser/bundle.full.js',
},
{
sourcemap: true,
format: 'iife',
name: 'CriticalCSSGenerator',
file: 'build-browser/bundle.js',
plugins: [ terser() ],
},
],
plugins: sharedPlugins,
preserveSymlinks: true,
watch: {
clearScreen: false,
},
};
Loading

0 comments on commit f958965

Please sign in to comment.