Skip to content

Commit 8a189dd

Browse files
committed
Merge branch 'main' of https://github.com/NotePlan/plugins
2 parents bdf58be + 135d246 commit 8a189dd

25 files changed

Lines changed: 607 additions & 302 deletions

‎flow-typed/Noteplan.js‎

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,30 +2567,28 @@ static + htmlWindows: Array < HTMLView >;
25672567
* const weather = await NotePlan.getWeather("imperial", 0, 0);
25682568
* console.log(weather.formatted);
25692569
*
2570-
* @returns {Object} weather - Weather data object
2571-
* @returns {string} weather.formatted - Pre-formatted markdown weather output with emojis
2572-
* @returns {string} weather.cityName - City name (from IP location or reverse geocoding)
2573-
* @returns {number} weather.temperature - Current temperature
2574-
* @returns {string} weather.temperatureUnit - Temperature unit symbol (°C or °F)
2575-
* @returns {number} weather.apparentTemperature - Feels-like temperature
2576-
* @returns {number} weather.humidity - Humidity percentage
2577-
* @returns {number} weather.windSpeed - Wind speed
2578-
* @returns {string} weather.windSpeedUnit - Wind speed unit (m/s or mph)
2579-
* @returns {number} weather.windDirection - Wind direction in degrees
2580-
* @returns {number} weather.uvIndex - UV index
2581-
* @returns {string} weather.condition - Weather condition description
2582-
* @returns {string} weather.emoji - Weather emoji based on condition
2583-
* @returns {string} weather.iconCode - OpenWeatherMap icon code
2584-
* @returns {number} weather.visibility - Visibility distance
2585-
* @returns {string} weather.visibilityUnit - Visibility unit (km)
2586-
* @returns {number} weather.highTemp - Today's high temperature
2587-
* @returns {number} weather.lowTemp - Today's low temperature
2588-
* @returns {string} weather.sunrise - Sunrise time (formatted as h:mm AM/PM)
2589-
* @returns {string} weather.sunset - Sunset time (formatted as h:mm AM/PM)
2590-
* @returns {Object} weather.location - Location coordinates
25912570
* @returns {number} weather.location.latitude - Latitude
25922571
* @returns {number} weather.location.longitude - Longitude
25932572
* @returns {string} weather.location.cityName - City name
2573+
* @returns {string} weather.location.state - State/administrative area
2574+
* @returns {string} weather.location.region - Region/sub-administrative area
2575+
* @returns {string} weather.location.country - Country name
2576+
* @returns {string} weather.location.countryCode - ISO country code
2577+
* @returns {string} weather.location.postalCode - Postal/ZIP code
2578+
* @returns {string} weather.location.subLocality - Sub-locality
2579+
* @returns {string} weather.location.thoroughfare - Street address
2580+
* @returns {string} weather.location.ipAddress - IP address (only when using IP-based detection)
2581+
* @returns {number} weather.location.ipVersion - IP version (only when using IP-based detection)
2582+
* @returns {string} weather.location.capital - Capital city (only when using IP-based detection)
2583+
* @returns {Array<string>} weather.location.phoneCodes - Phone country codes (only when using IP-based detection)
2584+
* @returns {Array<string>} weather.location.timeZones - Time zones (only when using IP-based detection)
2585+
* @returns {string} weather.location.continent - Continent name (only when using IP-based detection)
2586+
* @returns {string} weather.location.continentCode - Continent code (only when using IP-based detection)
2587+
* @returns {Array<string>} weather.location.currencies - Currency codes (only when using IP-based detection)
2588+
* @returns {Array<string>} weather.location.languages - Language codes (only when using IP-based detection)
2589+
* @returns {string} weather.location.asn - Autonomous System Number (only when using IP-based detection)
2590+
* @returns {string} weather.location.asnOrganization - ASN organization name (only when using IP-based detection)
2591+
* @returns {boolean} weather.location.isProxy - Whether the IP is a proxy (only when using IP-based detection)
25942592
*/
25952593
static getWeather(units: string, latitude: number, longitude: number): Promise < Object >;
25962594
}

‎helpers/NPnote.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const defaultNoteIconDetails = { icon: 'file-lines', color: 'gray-500', alpha: 0
3838
const noteIconsToUse: Array<TFolderIcon> = [
3939
{ firstLevelFolder: '<DAY>', icon: 'calendar-star', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },
4040
{ firstLevelFolder: '<WEEK>', icon: 'calendar-week', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },
41-
{ firstLevelFolder: '<MONTH>', icon: 'calendar', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 }, // TODO: can't find the right icon for this
41+
{ firstLevelFolder: '<MONTH>', icon: 'calendar-range', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },
4242
{ firstLevelFolder: '<QUARTER>', icon: 'calendar-days', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },
4343
{ firstLevelFolder: '<YEAR>', icon: 'calendar-days', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },
4444
{ firstLevelFolder: '@Archive', icon: 'box-archive', color: 'gray-500', alpha: 0.7, darkAlpha: 0.7 },

‎helpers/react/reactDev.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ const logWithColorConsole = (logType: string, componentName: string, detail?: st
123123
}
124124
}
125125

126+
/**
127+
* Logs with flexible support for both string details and an object as the detail.
128+
* If the 'detail' parameter is an object, it is appended to the args and detail becomes empty.
129+
* Otherwise, if 'detail' is a string, it will be joined into the componentName for context.
130+
* Delegates to the standard 'log' function.
131+
*
132+
* @param {string} logType - The type of log message ('DEBUG', 'ERROR', 'INFO', 'WARN', etc.)
133+
* @param {string} componentName - Name of the component or context originating the log.
134+
* @param {string|Object} [detail] - Optional detail as a string (will be appended to componentName) or as an object (will be logged in args).
135+
* @param {...any} args - Additional arguments to include in the log call.
136+
* @returns {void}
137+
*/
126138
export const logWithObjectsMaybe = (logType: string, componentName: string, detail?: string | TAnyObject, ...args: any[]): void => {
127139
let componentNameAndInfo = componentName
128140
let detailToSend = detail || ''

0 commit comments

Comments
 (0)