Skip to content

Commit 5a51ba9

Browse files
committed
deploy: 606b7d0
1 parent 3b5635b commit 5a51ba9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1208
-128
lines changed

appConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ window.AppConfig = {
2626
"app_notification_url": "assets/notifications/dev/",
2727
"app_update_url": "https://updates.phcode.io/tauri/update-latest-experimental-build.json",
2828
"linting.enabled_by_default": true,
29-
"build_timestamp": "2024-12-25T06:07:45.665Z",
29+
"build_timestamp": "2024-12-25T16:15:20.010Z",
3030
"googleAnalyticsID": "G-P4HJFPDB76",
3131
"googleAnalyticsIDDesktop": "G-VE5BXWJ0HF",
3232
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
@@ -38,7 +38,7 @@ window.AppConfig = {
3838
"bugsnagEnv": "development"
3939
},
4040
"name": "Phoenix Code",
41-
"version": "3.11.0-20763",
41+
"version": "3.11.0-20767",
4242
"apiVersion": "3.11.0",
4343
"homepage": "https://core.ai",
4444
"issues": {

assets/default-project/en.zip

0 Bytes
Binary file not shown.

assets/sample-projects/HTML5.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

assets/sample-projects/explore.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

brackets-min.js

Lines changed: 107 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ define(function (require, exports, module) {
138138
require("language/JSONUtils");
139139
require("widgets/InlineMenu");
140140
require("thirdparty/tinycolor");
141+
require("utils/LocalizationUtils");
141142

142143
// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
143144
// expose our required CodeMirror globally so as to avoid breaking extensions in the
@@ -147602,15 +147603,13 @@ define("utils/KeyEvent", {
147602147603
*
147603147604
*/
147604147605

147605-
/**
147606-
* Utilities functions related to localization/i18n
147607-
*/
147608-
define("utils/LocalizationUtils", function (require, exports, module) {
147606+
// @INCLUDE_IN_API_DOCS
147609147607

147608+
define("utils/LocalizationUtils", function (require, exports, module) {
147610147609

147611-
var Strings = require("strings");
147610+
const Strings = require("strings");
147612147611

147613-
/*
147612+
/**
147614147613
* Converts a language code to its written name, if possible.
147615147614
* If not possible, the language code is simply returned.
147616147615
*
@@ -147624,9 +147623,111 @@ define("utils/LocalizationUtils", function (require, exports, module) {
147624147623
return i18n === undefined ? locale : i18n;
147625147624
}
147626147625

147626+
const DATE_TIME_STYLE = {
147627+
FULL: "full",
147628+
LONG: "long",
147629+
MEDIUM: "medium",
147630+
SHORT: "short"
147631+
};
147632+
147633+
/**
147634+
* Formats a given date object into a locale-aware date and time string.
147635+
*
147636+
* @param {Date} [date] - The date object to format. If not provided, the current date and time will be used.
147637+
* @param {string} [lang] - Optional language code to use for formatting (e.g., 'en', 'fr').
147638+
* If not provided, defaults to the application locale or 'en'.
147639+
* @param {Object} [dateTimeFormat] - Optional object specifying the date and time formatting options.
147640+
* Defaults to { dateStyle: 'medium', timeStyle: 'short' }.
147641+
* @param {string} [dateTimeFormat.dateStyle] - Specifies the date format style. One of: DATE_TIME_STYLE.*
147642+
* @param {string} [dateTimeFormat.timeStyle] - Specifies the time format style. One of: DATE_TIME_STYLE.*
147643+
* @returns {string} - The formatted date and time string (e.g., "Dec 24, 2024, 10:30 AM").
147644+
*/
147645+
function getFormattedDateTime(date, lang, dateTimeFormat) {
147646+
if(!date){
147647+
date = new Date();
147648+
}
147649+
if(!dateTimeFormat){
147650+
dateTimeFormat = {
147651+
dateStyle: DATE_TIME_STYLE.MEDIUM,
147652+
timeStyle: DATE_TIME_STYLE.SHORT
147653+
};
147654+
}
147655+
return Intl.DateTimeFormat([lang || brackets.getLocale() || "en", "en"], dateTimeFormat).format(date);
147656+
}
147657+
147658+
/**
147659+
* Returns a relative time string (e.g., "2 days ago", "in 3 hours") based on the difference between the given date and now.
147660+
*
147661+
* @param {Date} [date] - The date to compare with the current date and time. If not given, defaults to now.
147662+
* @param {string} [lang] - Optional language code to use for formatting (e.g., 'en', 'fr').
147663+
* If not provided, defaults to the application locale or 'en'.
147664+
* @returns {string} - A human-readable relative time string (e.g., "2 days ago", "in 3 hours").
147665+
*/
147666+
function dateTimeFromNow(date, lang) {
147667+
date = date || new Date();
147668+
const now = new Date();
147669+
const diffInSeconds = Math.floor((date - now) / 1000);
147670+
147671+
const rtf = new Intl.RelativeTimeFormat([lang || brackets.getLocale() || "en", "en"],
147672+
{ numeric: 'auto' });
147673+
147674+
if (Math.abs(diffInSeconds) < 60) {
147675+
return rtf.format(diffInSeconds, 'second');
147676+
} else if (Math.abs(diffInSeconds) < 3600) {
147677+
return rtf.format(Math.floor(diffInSeconds / 60), 'minute');
147678+
} else if (Math.abs(diffInSeconds) < 86400) {
147679+
return rtf.format(Math.floor(diffInSeconds / 3600), 'hour');
147680+
} else if (Math.abs(diffInSeconds) < 2592000) {
147681+
return rtf.format(Math.floor(diffInSeconds / 86400), 'day');
147682+
} else if (Math.abs(diffInSeconds) < 31536000) {
147683+
return rtf.format(Math.floor(diffInSeconds / 2592000), 'month');
147684+
} else {
147685+
return rtf.format(Math.floor(diffInSeconds / 31536000), 'year');
147686+
}
147687+
}
147688+
147689+
/**
147690+
* Returns an intelligent date string.
147691+
* - For dates within the last 30 days or the future: relative time (e.g., "2 days ago", "in 3 hours").
147692+
* - For dates earlier this year: formatted date (e.g., "Jan 5").
147693+
* - For dates not in the current year: formatted date with year (e.g., "Jan 5, 2023").
147694+
*
147695+
* @param {Date} date - The date to compare and format.
147696+
* @param {string} [lang] - Optional language code to use for formatting (e.g., 'en', 'fr').
147697+
* @returns {string} - An intelligently formatted date string.
147698+
*/
147699+
function dateTimeFromNowFriendly(date, lang) {
147700+
const now = new Date();
147701+
const diffInMilliseconds = date - now;
147702+
const diffInDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24));
147703+
147704+
// If within the last 30 days or the future, use relative time
147705+
if (Math.abs(diffInDays) <= 30) {
147706+
return dateTimeFromNow(date, lang);
147707+
}
147708+
147709+
// If in the current year, format as "MMM DD"
147710+
const currentYear = now.getFullYear();
147711+
const dateYear = date.getFullYear();
147712+
147713+
const languageOption = [lang || brackets.getLocale() || "en", "en"];
147714+
147715+
if (currentYear === dateYear) {
147716+
return new Intl.DateTimeFormat(languageOption, { month: "short", day: "numeric" }).format(date);
147717+
}
147718+
147719+
// For dates in previous years, format as "MMM DD, YYYY"
147720+
return new Intl.DateTimeFormat(languageOption,
147721+
{ month: "short", day: "numeric", year: "numeric" }).format(date);
147722+
}
147627147723

147628147724
// Define public API
147629147725
exports.getLocalizedLabel = getLocalizedLabel;
147726+
exports.getFormattedDateTime = getFormattedDateTime;
147727+
exports.dateTimeFromNow = dateTimeFromNow;
147728+
exports.dateTimeFromNowFriendly = dateTimeFromNowFriendly;
147729+
// public constants
147730+
exports.DATE_TIME_STYLE = DATE_TIME_STYLE;
147630147731
});
147631147732

147632147733
/*

brackets.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ define(function (require, exports, module) {
138138
require("language/JSONUtils");
139139
require("widgets/InlineMenu");
140140
require("thirdparty/tinycolor");
141+
require("utils/LocalizationUtils");
141142

142143
// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
143144
// expose our required CodeMirror globally so as to avoid breaking extensions in the

cacheManifest.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"appConfig.js": "5d4f126050419ef4ad65486743cc821f41cf8e91038dac5821e1402699d92c59",
3-
"assets/default-project/en.zip": "46d88cdccf07581782081414e342fb219228ba229e2e60dca8cb90dadfd11378",
2+
"appConfig.js": "4f81c209755e9d7d5c51054fa16a54da08dec471e3d6ad21c6798dc1dfed4292",
3+
"assets/default-project/en.zip": "a4b4cdf07d94cd2d09c2db06a66309eeadafab9a8a78c12ec59ae1080cec7600",
44
"assets/default-project/en/images/cloud1.svg": "527399dadfa3357c3ee1a63d6c1c7dda81ecebb832f7383db26f1aaeaf722a8d",
55
"assets/default-project/en/images/cloud2.svg": "8127c63c0987bc674e2d25f7d24ead017853326c1e43d07706fec46091904418",
66
"assets/default-project/en/images/cloud3.svg": "15de53aa41dea3b0f685292814563f97213a9736c3cec2f8e17b5d9d45b3ae3d",
@@ -125,7 +125,7 @@
125125
"assets/pwa/32x32.png": "4f8f75bfcdb6efbbed1732f49edab4e292274cdeb1841e285ccc8194f4c9d8ac",
126126
"assets/pwa/phoenix.png": "d292bf76d6d61fdece2f97fb4cd71b8b0060d1058e9c1d02c94bfb20da8b7f0d",
127127
"assets/pwa/Square284x284Logo.png": "9887c2967039b4fae1214817925f1fb4f9227cba12d37612457c1c8ee1110c67",
128-
"assets/sample-projects/bootstrap-blog.zip": "c3e5e30c0cd9c79301e94b2d5c2206d1e43aa7b2ec502becee6faa25013ca71e",
128+
"assets/sample-projects/bootstrap-blog.zip": "8f31abc76cf9d001c0b986bffc7697ab501be5ab7f55245929672297ee9526ab",
129129
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo-white.svg": "203d56e7e5e15d8203e596d4a711cec986f6380064591de21850f4563fb840bf",
130130
"assets/sample-projects/bootstrap-blog/assets/brand/bootstrap-logo.svg": "df11d37a123e36a768f2a6064973c4c6ab17d1e3c6501c8bf434ca5c0134c9a2",
131131
"assets/sample-projects/bootstrap-blog/assets/dist/css/bootstrap.min.css": "fb1763b59f9f5764294b5af9fa5250835ae608282fe6f2f2213a5952aacf1fbf",
@@ -135,7 +135,7 @@
135135
"assets/sample-projects/bootstrap-blog/blog.rtl.css": "33f49d02bbcb2e78f019b7582408fad2b5a76a2ecf79fe09d5b3c08c6ee3872b",
136136
"assets/sample-projects/bootstrap-blog/index-rtl.html": "c582278884060098ff51b9d350b0739e1a0396debdc76772c62b6ec375b6efcb",
137137
"assets/sample-projects/bootstrap-blog/index.html": "f4716c2affa299a27ab6f8c74c22fe67564f1b1d36ff2f0b322672bf0479d739",
138-
"assets/sample-projects/dashboard.zip": "baedbd094a1f8eb45162ded4d6bec163859a099830ab74df980d9cea4ccadf73",
138+
"assets/sample-projects/dashboard.zip": "d7f540c0b2e18f9867a500f1a1d1b2cb370f560f2e0a9230ef62641e678531cb",
139139
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo-white.svg": "203d56e7e5e15d8203e596d4a711cec986f6380064591de21850f4563fb840bf",
140140
"assets/sample-projects/dashboard/assets/brand/bootstrap-logo.svg": "df11d37a123e36a768f2a6064973c4c6ab17d1e3c6501c8bf434ca5c0134c9a2",
141141
"assets/sample-projects/dashboard/assets/dist/css/bootstrap.min.css": "fb1763b59f9f5764294b5af9fa5250835ae608282fe6f2f2213a5952aacf1fbf",
@@ -147,7 +147,7 @@
147147
"assets/sample-projects/dashboard/index.html": "1fb0c934f816d728cad85e180f78369679dc9edb1eca2d5c625b9360e6264235",
148148
"assets/sample-projects/dashboard/signin.css": "083bef710a6170a5112ce257c2ecf8580ca97ce19136d770f10460e5b85862de",
149149
"assets/sample-projects/dashboard/signin.html": "8c602e656631aeee624673397c0dc00c339498914ed930ab177478c4662a8d26",
150-
"assets/sample-projects/explore.zip": "b427c2faed851753a6aad5e9de6ce53d9ca7ccb96a7968d42d58d5ea3a81a05e",
150+
"assets/sample-projects/explore.zip": "7829aa6a5248ee12a6cc5c96b8a1b9dbfa4f6c0af3bc684b4f2a27930d865b95",
151151
"assets/sample-projects/explore/A-tribute-page.html": "bd510c60f444058b7fcb71d83841f32b1cb5193c1a39421d7739bd6af9fef248",
152152
"assets/sample-projects/explore/adjustable-fireworks.html": "11e69bb2dd8708ed8fbf1acc62b0aaaf88c7ffec859ee958dc1ae51cd53ddac8",
153153
"assets/sample-projects/explore/ant_colony.html": "bc9435ed1b9868f2fbc7212d526f7532c533a5fdf45da988fa5e575bc5f363b7",
@@ -236,7 +236,7 @@
236236
"assets/sample-projects/explore/watermelon-pixel.html": "765a3fbffb5db97910512fbabaa7c55c0b52dc8eedfcc630811be39d0af98663",
237237
"assets/sample-projects/explore/webmine.html": "6b808f52812dc03db28483411500c04daf8ee0226f535c600a36999d6b7837c0",
238238
"assets/sample-projects/explore/whack-a-mole.html": "25be94a3640553b4801f80edd49998bae3a360988e8a26ff3bdfdc2a76b77191",
239-
"assets/sample-projects/home-pages.zip": "2efb8b701ab279e4ffb6789eb7c948b4ef34cf9d3f335c62f04520a002634bd3",
239+
"assets/sample-projects/home-pages.zip": "12fb2a5e69c6720fd32a087d7bb9784d2628dd2158db85739cc7261d2a83c757",
240240
"assets/sample-projects/home-pages/album/index.html": "e29a1e96644bc17bab1a7e3724e822d65a479e10df182725ee1afa916efbfdc1",
241241
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo-white.svg": "203d56e7e5e15d8203e596d4a711cec986f6380064591de21850f4563fb840bf",
242242
"assets/sample-projects/home-pages/assets/brand/bootstrap-logo.svg": "df11d37a123e36a768f2a6064973c4c6ab17d1e3c6501c8bf434ca5c0134c9a2",
@@ -248,19 +248,19 @@
248248
"assets/sample-projects/home-pages/carousel/index.html": "235d650043a09f2954f24e4659f64d99ef3988858567fb2221fb1cf34df057e6",
249249
"assets/sample-projects/home-pages/cover/cover.css": "2fbb596077c570cad7ee9e98fb88f5665e0ecfc11e7085c3e04639ad03f7bc10",
250250
"assets/sample-projects/home-pages/cover/index.html": "759214701ff759432711b3421d80aca692c7a2b4c978c516a0bcd0c81a43f381",
251-
"assets/sample-projects/HTML5.zip": "c0d1e251f0c811abf6745add24670650b99c2378ed0a92ac97029a1b19c0a30f",
251+
"assets/sample-projects/HTML5.zip": "0ce0a22b39db4583aa086450919130e86438c824773d8c22e849034ec54b95d7",
252252
"assets/sample-projects/HTML5/index.html": "2dc94c7d3e33aeeb44ec4f75bc7df86a5fd19f3121f2fd3638636fbf7c476c6a",
253253
"assets/sample-projects/HTML5/script.js": "c49e4b01cded4defbc21f5d5d0102719ce4cccbe1b9cb19f9232c5a05df658da",
254254
"assets/sample-projects/HTML5/styles.css": "744b85a9c31affbb00976694c4b9c9149b31e575ed9efdec386231d062ae93f2",
255255
"assets/sample-projects/new-project-list.json": "be1c907279163610779b000aa9ea6e4b035e07429203f16445a914c7045f2d64",
256256
"assets/sample-projects/zips/bootstrap.zip": "6f10407c00ce5d598e77f890528743dc645bc28014335483992b481e63fd7b97",
257257
"base-config/keyboard.json": "f3380c609a293a95644965958286b31863d733293824d56b7087fa0ce4c2d618",
258258
"base-config/readme-keyboard.md": "27e98128176dbd060e93b1f321a4ddcd609571b7b8eb8c9112588f4767d08a03",
259-
"brackets-min.js": "66ebb3443d55d85430c2ecc0f629c39cf7f2426757540e01c7a62b1d50d2271f",
259+
"brackets-min.js": "4b75806ab1d82b4d2340e5d233bef80748390c77eb87694802a2a61eb84778dc",
260260
"brackets.config.dist.json": "8faa5c0a82bb4f49784e93d1225dbd5e1fd8ec6ab07b95f5f874c7c7bd7bb234",
261261
"brackets.config.staging.json": "c0e1f22c772c80f4f5756ab947e40538bcaf7fb7f8925834cfd4ef57c55e477a",
262-
"brackets.js": "7b59afe54ff7bd1ae6892f04a8201407ba85439d225ab4c9ae1ed79ecad12fc9",
263-
"cacheManifest.json": "bbe3f205750e1eafa2b4d757f813dd81ef493650858233f3207c725f2f34ac3c",
262+
"brackets.js": "6dee2717d91f84c60a3afa8e6427a96fbcdba0363fbcd0a8d8baea74f13f20bc",
263+
"cacheManifest.json": "ae538e93cb1118051f97dac5b97ef049ef9b84360976bcdef4f9e52ccdbc3076",
264264
"command/ChangeShortcutTemplate.html": "345d682d8bde29380822824778cf09acc79affae6e82b9db00c6205b2b3dd2ee",
265265
"command/CommandManager.js": "10181902fc2e55a780981a17b95c7b579427fdfd12c92ed49df35d3b70f64c15",
266266
"command/Commands.js": "5c9cf28a050af9c156d6cc2e22fdbba6cec1b6e2a2fc5db53799b3fc8bb61b84",
@@ -269,7 +269,7 @@
269269
"command/KeyboardOverlayMode.js": "7170dfcfca59b41252146ef8a5ca4f652c666e33b7a4b411e30e72951bd35b49",
270270
"command/Keys.js": "36545bbbca56d2a909779c5873fa860bf737977588ad61a398acb86f6bcbe4ee",
271271
"command/Menus.js": "b0c5031f13e4ca6efd594e9fcb973f0e591a1af6cc0c0df8ec32024f6bdd0f08",
272-
"config.json": "94a817b621a21ef3fb8674962355e6efff5b1740a86856859a75ed3e05007f28",
272+
"config.json": "900d1d0b34a601f4ce95be180273fa0645e9239c181abe3a763f320d8a01e2f2",
273273
"desktop-metrics.html": "66f87550ddf04f284a6c1e81567b7dfbefb2b8007f48f0bad7d8f7aacdb11bac",
274274
"devEnable.html": "44aa1a496a8be413299f651e6b0c3e62ac50cd5d40126ad1bb6b70b9b2b818c4",
275275
"document/ChangedDocumentTracker.js": "03b0eaf0995fee6d27c782a8028a1314f61214e383f5f5e198320b2faac4cf40",
@@ -516,9 +516,9 @@
516516
"extensions/default/UrlCodeHints/requirejs-config.json": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
517517
"extensions/default/UrlCodeHints/unittests.js": "c60ecbe81555d435437dc5b7294f4e89b3befb7b34d60c44285c6009807c29c2",
518518
"extensions/dev/README.md": "3fd897e55e0e05e503c898555cfa3b20e820b32946fc7c426ea9bb2afbed449f",
519-
"extensions/registry/popularity.json": "76aa4d53cbcbcf2d4210224182661c058b19448b6301b2f0362e787d8e9d461f",
519+
"extensions/registry/popularity.json": "a76002aa58c44e695a6f427548f93b55ff98a4bc14ed6d7b5bc7a69a86130a01",
520520
"extensions/registry/registry_version.json": "a8ca8a3f794537c31fea35762e2df5b506215df51a899ff8f439ea20aa508eb6",
521-
"extensions/registry/registry.json": "6a18e0703de8bf31dbbdfae72a336c630989c26ad9065b7a7c1f4b5aa2762097",
521+
"extensions/registry/registry.json": "75b5b547ed2ca899029fd85bd686b8e562d342c6398755e63ebe1efe88fe1307",
522522
"extensions/samples/BracketsConfigCentral/htmlContent/Config.html": "6ac3ce03e2fb8913ec5da3e8835c0646894f242600c64d95b77c7d7dc0a156f7",
523523
"extensions/samples/BracketsConfigCentral/htmlContent/logo-sm.png": "006f025fecd24c292e87a1eb0e123ee21178ec9c09517a1f16fe362fe2fbcbb5",
524524
"extensions/samples/BracketsConfigCentral/main.js": "f2c36decadb7d98e2a89cfdb9aff8a74cc130ea8c3ad084b7af62ee21e3a8181",
@@ -1747,7 +1747,7 @@
17471747
"utils/FeatureGate.js": "5dd72e889df733efc992a2236c5d09dd7587203244712266318ed7e4521dc29c",
17481748
"utils/Global.js": "5eaa3f2022b20668b0c2a37b201f5db8cfb3c692ecb3079d9ebffdb1306fbd18",
17491749
"utils/KeyEvent.js": "701155ac32f5bf05f7d2ad24f825ae3a6d4313a387ae4bb01cf8aff6bd3e616f",
1750-
"utils/LocalizationUtils.js": "ba39bfb6d3f788fa5b9ad4b74dd291c9531284d2d4e95d3d674c837d38db89d8",
1750+
"utils/LocalizationUtils.js": "41bd7fb7da71d07e782c21bec7ff29ee8157fba83ae7ac65e7de763b8fff3293",
17511751
"utils/Metrics.js": "7954e37700796acff0ee78235776ca650a91b9ae13c07fdd7a50b27636836c56",
17521752
"utils/NativeApp.js": "2e26094168aaba67ce86fb90cfc57bb69957e0e08582ac34a1f4506c64cdfee6",
17531753
"utils/NodeConnection.js": "e57de9190f6ffa6941224df69bd1fa45d6d98756c609704fd9d2f250c2576306",

0 commit comments

Comments
 (0)