Commit graph

16 commits

Author SHA1 Message Date
Marc Durdin
23b5dca1b3 fix(developer): remove package version if FollowKeyboardVersion is set in Package Editor
To reduce confusion when 'Follow Keyboard Version' is set, clear the
cached package version data from UI and .kps source when saving the
package or making changes to it.

Fixes: #11892
Test-bot: skip
2025-11-03 10:54:44 +01:00
Marc Durdin
fa5278a361 fix(developer): transform slashes to backslashes in paths in Package Editor
When loading package files generated by kmc or edited on non-Windows
systems, the Package Editor will now convert any forward slashes in the
path to backslashes. This is necessary because the path manipulation
functions in Keyman Developer work only with backslashes.

Fixes: #14719
Build-bot: skip release:developer
2025-09-10 14:58:13 +02:00
Marc Durdin
0f05da957f fix(developer): remove redundant Name and RTL fields from .kps LexicalModel
Follows on from the similar changes to `Keyboard` fields in #13600. This
deprecates the `RTL` and `Name` fields. `RTL` was never used. `Name` was
written but never presented to end users, so effectively irrelevant.
`Name` also was present in `File.Description` (already deprecated) for
the corresponding model.js _and_ `Info.Name`, so doubly redundant.

Also updates the schema documentation to mark the deprecated fields.

Relates-to: #13600
2025-04-02 05:39:09 +07:00
Marc Durdin
9dabcc0306 fix(developer): remove redundant keyboard fields from .kps
The fields 'name', 'version', and 'rtl' were defined in the .kps file,
but were not actually used by the compiler, as kmc-package reads the
metadata from the keyboard file rather than relying on this data, which
often is out of date. This led to confusion for keyboard authors, so
this change removes that metadata from the package.

The one visible side-effect (apart from the data disappearing from
future .kps files) is that the package editor no longer shows this
metadata in the Keyboards view (but as it may be out-of-date, this is
probably a good thing).

Fixes: #13576
Fixes: #13593
2025-03-28 14:07:23 +07:00
Marc Durdin
374955d838 fix(developer): suppress emission of new empty fields in package editor
Fixes #11002.

The fields `<RelatedPackages/>` and `<Examples/>` should not be emitted
if they have no content, to improve file backward-compatibility.
2024-03-15 18:41:56 -05:00
Marc Durdin
400444933c feat(developer): introduce WelcomeFile property to packages
Fixes #9478.

This adds a property WelcomeFile to .kps and kmp.json, which allows us
to move away from the hardcoded welcome.htm filename in the future, and
makes transform from Markdown (#9477) a simpler operation, and just
generally starts the cleanup of the messiness of hard-coded filenames.

The package compiler will fallback to injecting welcome.htm into this
property if (a) welcome.htm is present, and (b) the property does not
already have a value. This doesn't buy us much because we still need to
support welcome.htm for existing legacy packages, but does mean that
our .kmp package metadata will be more consistent for packages compiled
with 17.0+ compilers.
2023-10-08 07:22:57 +07:00
Marc Durdin
3af9f6d610 chore(developer): fixup license vs graphic file error 2023-08-17 11:22:28 +07:00
Marc Durdin
158bc28e85 feat(developer): add LicenseFile as property of package
Adds license file to .kps, kmp.json, kmc-package, package editor, and
new project templates. The intent is for LICENSE.md to be the file used,
and for any keyboards on keymanapp/keyboards, it should always be a
standard MIT license.
2023-08-16 09:13:38 +07:00
Marc Durdin
fea10f0eeb feat(developer): add web font references to package
While a package supports a .ttf or .otf font for the OSK and Display
fonts for use within the Keyman apps, on websites it also supports .woff
and .woff2. This change makes it possible to specify a set of fonts for
a package which will be provided through api.keyman.com to websites.

This means that .woff and .woff2 fonts may also be included in the
package and may not be used on target devices at this time, it further
opens the pathway to deploying .kmp packages to web in the future.

The deployment stage of keymanapp/keyboards will require a new phase to
copy web fonts from packages to s.keyman.com.
2023-08-15 15:13:24 +07:00
Marc Durdin
8a9243eba5 chore(developer): tweak Relationship values 2023-08-14 14:31:17 +07:00
Marc Durdin
38c3415eed feat(developer): add relatedPackages metadata
Adds relatedPackages support to:
* .kps schema
* .kps file format for Typescript
* kmp.json file format for Typescript
* kmc-package compiler
* Package Editor
2023-08-14 14:18:01 +07:00
Marc Durdin
d838df1c00 feat(developer): add editor of Package Description and Examples 2023-08-14 12:12:08 +07:00
Marc Durdin
66a7a6fc4e feat(developer): support FollowKeyboardVersion in kmc-package
Fixes #7340.

Removes the unused <Version> element from <LexicalModel> element in the
.kps schema. (This needs to be copied to api.keyman.com also.)

Updates compiler to check for <FollowKeyboardVersion> and read the
version data from the .kmx in that case.

Unit tests updated. Some of the fixtures were incorrect as they had
<FollowKeyboardVersion> set for model-type packages or packages that
contained no keyboards. Fixed.
2023-04-21 14:04:06 +07:00
Marc Durdin
b58ac8fe4a fix(developer): package editor no longer loses RTL flag for LMs
Fixes #8595.
2023-04-18 05:40:50 +07:00
Marc Durdin
8ee8325c74 feat(developer): check for duplicated language codes in package editor and compiler
Fixes #8119.
2023-02-02 15:06:15 +07:00
Marc Durdin
8cbebf7ade chore(windows): move general package units to common 2022-06-23 06:36:23 +10:00