<commit_before>import { h } from 'preact';
import { Button } from './common';

function NotificationItem({ type, label, children }) {
	var strongTag;
	if (type === 'bug') {
		strongTag = <strong>🔧 {label || 'Bugfix'}</strong>;
	} else if (type === 'a11y') {
		strongTag = <strong>♿️ {label || 'Accessibility'}</strong>;
	} else if (type === 'ui') {
		strongTag = <strong>🖥 {label || 'Interface'}</strong>;
	}
	return (
		<li>
			{strongTag}: {children}
		</li>
	);
}

function ThanksTo({ name, url }) {
	return (
		<a href={url} target="_blank" rel="noopener noreferrer">
			{' '}
			{name}
		</a>
	);
}

function Notification({ version, isLatest, ...props }) {
	return (
		<div class="notification">
			<span class="notification__version">{version}</span>
			<ul>{props.children}</ul>
			{isLatest ? (
				<div class="mt-2">
					<p>
						<strong>🎉 New Product!</strong> If you like Web Maker, you'll
						probably also like a new product I launched. It's the first ever
						code-golfing game for CSS ->{' '}
						<a href="https://cssbattle.dev" target="_blank">
							CSSBattle
						</a>
						.
					</p>
					{/*<p>
						<strong>🚀 Announcement</strong>: Hi! I am <NAME> (creator of
						Web Maker) and I have launched a
						<a
							href="https://patreon.com/kushagra"
							target="_blank"
							rel="noopener noreferrer"
						>
							{' '}
							Patreon campaign
						</a>
						. If you love Web Maker, consider pledging to
						<a
							href="https://patreon.com/kushagra"
							target="_blank"
							rel="noopener noreferrer"
						>
							{' '}
							support me
						</a>{' '}
						:)
						</p>*/}
					<p>
						<a
							href="https://github.com/chinchang/web-maker/issues"
							target="_blank"
							rel="noopener noreferrer"
						>
							Suggest features or report bugs.
						</a>
					</p>
					<p>
						Web Maker now has more than 50K weekly active users! Thank you for
						being a part of this community of awesome developers. If you find
						Web Maker helpful,{' '}
						<a
							href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews"
							target="_blank"
							rel="noopener noreferrer"
							class="btn"
						>
							Please rate Web Maker <span class="star" />
						</a>
						&nbsp;
						<a
							href="http://twitter.com/share?url=https://webmaker.app/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension"
							target="_blank"
							rel="noopener noreferrer"
							class="btn"
						>
							Share it
						</a>
						&nbsp;
						<Button
							aria-label="Support the developer"
							onClick={props.onSupportBtnClick}
							data-event-action="supportDeveloperChangelogBtnClick"
							data-event-category="ui"
							class="btn btn-icon"
						>
							Support the developer
						</Button>
					</p>
				</div>
			) : null}
		</div>
	);
}
export function Notifications(props) {
	return (
		<div>
			<h1>Whats new?</h1>
			<Notification version="4.0.2" {...props} isLatest={true}>
				<li>
					You can now override settings through query parameters. Currently only{' '}
					<strong>autoPreview</strong> and <strong>isMonacoEditorOn</strong> are
					supported. Example:{' '}
					<code>
						https://webmaker.app/app?settings=autoPreview:false,isMonacoEditorOn:true
					</code>
				</li>
				<NotificationItem type="bug">
					"Settings" and "Create New" modals breaking on mobile.
				</NotificationItem>
			</Notification>

			<Notification version="4.0.1" {...props}>
				<NotificationItem type="bug">
					Buggy full-screen option in Files mode. The option is removed till it
					works correctly with Files mode
				</NotificationItem>
				<NotificationItem type="bug">
					File explorer sidebar taking too much width in Files mode.
				</NotificationItem>
				<NotificationItem type="bug">
					SASS/SCSS compiler updated to version 3.6.3 of Libsass.
				</NotificationItem>
				<NotificationItem type="bug">
					JavaScript evaluation failing randomly with errors like const cannot
					be reassigned.
				</NotificationItem>
				<NotificationItem type="bug">
					Command palette now opens with <code>F1</code> key instead of{' '}
					<code>Cmd/Ctrl + shift + P</code><commit_msg>add changelog<commit_after>import { h } from 'preact';
import { Button } from './common';

function NotificationItem({ type, label, children }) {
	var strongTag;
	if (type === 'bug') {
		strongTag = <strong>🔧 {label || 'Bugfix'}</strong>;
	} else if (type === 'a11y') {
		strongTag = <strong>♿️ {label || 'Accessibility'}</strong>;
	} else if (type === 'ui') {
		strongTag = <strong>🖥 {label || 'Interface'}</strong>;
	}
	return (
		<li>
			{strongTag}: {children}
		</li>
	);
}

function ThanksTo({ name, url }) {
	return (
		<a href={url} target="_blank" rel="noopener noreferrer">
			{' '}
			{name}
		</a>
	);
}

function Notification({ version, isLatest, ...props }) {
	return (
		<div class="notification">
			<span class="notification__version">{version}</span>
			<ul>{props.children}</ul>
			{isLatest ? (
				<div class="mt-2">
					<p>
						<strong>🎉 New Product!</strong> If you like Web Maker, you'll
						probably also like a new product I launched. It's the first ever
						code-golfing game for CSS ->{' '}
						<a href="https://cssbattle.dev" target="_blank">
							CSSBattle
						</a>
						.
					</p>
					{/*<p>
						<strong>🚀 Announcement</strong>: Hi! I am <NAME> (creator of
						Web Maker) and I have launched a
						<a
							href="https://patreon.com/kushagra"
							target="_blank"
							rel="noopener noreferrer"
						>
							{' '}
							Patreon campaign
						</a>
						. If you love Web Maker, consider pledging to
						<a
							href="https://patreon.com/kushagra"
							target="_blank"
							rel="noopener noreferrer"
						>
							{' '}
							support me
						</a>{' '}
						:)
						</p>*/}
					<p>
						<a
							href="https://github.com/chinchang/web-maker/issues"
							target="_blank"
							rel="noopener noreferrer"
						>
							Suggest features or report bugs.
						</a>
					</p>
					<p>
						Web Maker now has more than 50K weekly active users! Thank you for
						being a part of this community of awesome developers. If you find
						Web Maker helpful,{' '}
						<a
							href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews"
							target="_blank"
							rel="noopener noreferrer"
							class="btn"
						>
							Please rate Web Maker <span class="star" />
						</a>
						&nbsp;
						<a
							href="http://twitter.com/share?url=https://webmaker.app/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension"
							target="_blank"
							rel="noopener noreferrer"
							class="btn"
						>
							Share it
						</a>
						&nbsp;
						<Button
							aria-label="Support the developer"
							onClick={props.onSupportBtnClick}
							data-event-action="supportDeveloperChangelogBtnClick"
							data-event-category="ui"
							class="btn btn-icon"
						>
							Support the developer
						</Button>
					</p>
				</div>
			) : null}
		</div>
	);
}
export function Notifications(props) {
	return (
		<div>
			<h1>Whats new?</h1>
			<Notification version="4.0.3" {...props} isLatest={true}>
				<NotificationItem>
					Broken syntax highlighting in non-default Preprocessors.
				</NotificationItem>
			</Notification>

			<Notification version="4.0.2" {...props}>
				<li>
					You can now override settings through query parameters. Currently only{' '}
					<strong>autoPreview</strong> and <strong>isMonacoEditorOn</strong> are
					supported. Example:{' '}
					<code>
						https://webmaker.app/app?settings=autoPreview:false,isMonacoEditorOn:true
					</code>
				</li>
				<NotificationItem type="bug">
					"Settings" and "Create New" modals breaking on mobile.
				</NotificationItem>
			</Notification>

			<Notification version="4.0.1" {...props}>
				<NotificationItem type="bug">
					Buggy full-screen option in Files mode. The option is removed till it
					works correctly with Files mode
				</NotificationItem>
				<NotificationItem type="bug">
					File explorer sidebar taking too much width in Files mode.
				</NotificationItem>
				<NotificationItem type="bug">
					SASS/SCSS compiler updated to version 3.6.3 of Libsass.
				</NotificationItem>
				<NotificationItem type="bug">
					JavaScript evaluation failing randomly with errors like const cannot
					be reassigned.
				</NotificationItem>
				<NotificationItem type="bug">
					Command palette now opens with <code>F1</code> key instead of{' '}
					<code>Cmd/Ctrl + shift + P</code>
{'fraction_non_alphanumeric': 0.1422060164083865, 'fraction_numerical': 0.0046718322698268006, 'mean_word_length': 2.586841029832448, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 159, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4101271', 'n_tokens_mistral': 3914, 'n_tokens_neox': 2785, 'n_words': 722}